Bug 22442 - ThinkPad HDAPS accelerometer gets recognized as MOUSE and makes Xorg unusable
Summary: ThinkPad HDAPS accelerometer gets recognized as MOUSE and makes Xorg unusable
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-23 11:31 UTC by Matze Grünbaum
Modified: 2009-07-26 13:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Matze Grünbaum 2009-06-23 11:31:11 UTC
Hi, 
since about 14 days "ThinkPad HDAPS accelerometer data" is being treated as a mouse input device, which logically results in strange mousepointer behaviour. mousepointer gets centered suddenly, selection of clickable elements is nearly impossible because m.pointer is flipping back and forth. sometimes xorg segfaults while a mouseclick'in just 2-5 seconds after startup.

system information:
IBM Thinkpad T43
Gentoo Linux 2.6.30
most but not all parts of xorg (drivers/libs/server) 
are git master-branch based.

relevant part of xorg.log:

###
(II) config/hal: Adding input device ThinkPad HDAPS joystick emulation
(**) ThinkPad HDAPS joystick emulation: always reports core events
(**) ThinkPad HDAPS joystick emulation: Device: "/dev/input/event10"
(II) ThinkPad HDAPS joystick emulation: found absolute axes
(II) ThinkPad HDAPS joystick emulation: Found x and y absolute axes
(II) ThinkPad HDAPS joystick emulation: Configuring as mouse
(II) XINPUT: Adding extended input device "ThinkPad HDAPS joystick emulation" (type: MOUSE)
(**) ThinkPad HDAPS joystick emulation: (accel) keeping acceleration scheme 1
(**) ThinkPad HDAPS joystick emulation: (accel) acceleration profile 0
(II) config/hal: Adding input device ThinkPad HDAPS accelerometer data
(**) ThinkPad HDAPS accelerometer data: always reports core events
(**) ThinkPad HDAPS accelerometer data: Device: "/dev/input/event11"
(II) ThinkPad HDAPS accelerometer data: found absolute axes
(II) ThinkPad HDAPS accelerometer data: Found x and y absolute axes
(II) ThinkPad HDAPS accelerometer data: Configuring as mouse
(II) XINPUT: Adding extended input device "ThinkPad HDAPS accelerometer data" (type: MOUSE)
(**) ThinkPad HDAPS accelerometer data: (accel) keeping acceleration scheme 1
(**) ThinkPad HDAPS accelerometer data: (accel) acceleration profile 0
###

relevant part of dmesg, after loading hdaps kernel module:

###
hdaps: initial mode latch is 0x01
hdaps: setting ec_rate=250, filter_order=2
hdaps: device successfully initialized.
input: ThinkPad HDAPS joystick emulation as /class/input/input17
input: ThinkPad HDAPS accelerometer data as /class/input/input18
hdaps: driver successfully loaded.
###

possible workaround: to get back an useful xorg-environment again its necessary to unload hdaps kernel driver.

please notice me if you need more information.

thanks in advance
Matze
Comment 1 Peter Hutterer 2009-06-23 15:00:17 UTC
please run evtest against the device and attach the output here. http://people.freedesktop.org/~whot/evtest.c

you can stop the evdev driver being loaded for this device by creating an appropriate fdi file in /etc/hal/fdi/policy:

<?xml version="1.0" encoding="ISO-8859-1"?>
  <deviceinfo version="0.2">
    <device>
      <match key="input.product" contains="Random String">
         <remove key="input.x11_driver"></remove>
      </match>
     </device>
  </deviceinfo>

then restart hal, restart X and you're good to go.

see also http://fedoraproject.org/wiki/Input_device_configuration
Comment 2 Matze Grünbaum 2009-06-24 07:04:35 UTC
evtest output:

###
Input driver version is 1.0.0
Input device ID: bus 0x19 vendor 0x1014 product 0x5054 version 0x4801
Input device name: "ThinkPad HDAPS accelerometer data"
Supported events:
  Event type 0 (Sync)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value    505
      Min   -32768
      Max    32767
    Event code 1 (Y)
      Value    481
      Min   -32768
      Max    32767
Grab succeeded, ungrabbing.
Testing ... (interrupt to exit)
Event: time 1245850886.889297, type 3 (Absolute), code 0 (X), value 505
Event: time 1245850886.889305, -------------- Report Sync ------------
Event: time 1245850886.909296, type 3 (Absolute), code 0 (X), value 504
Event: time 1245850886.909299, type 3 (Absolute), code 1 (Y), value 480
Event: time 1245850886.909301, -------------- Report Sync ------------
Event: time 1245850886.969305, type 3 (Absolute), code 1 (Y), value 481
Event: time 1245850886.969313, -------------- Report Sync ------------
Event: time 1245850886.989304, type 3 (Absolute), code 0 (X), value 503
Event: time 1245850886.989311, -------------- Report Sync ------------
Event: time 1245850887.009322, type 3 (Absolute), code 0 (X), value 505
Event: time 1245850887.009329, -------------- Report Sync ------------
Event: time 1245850887.029308, type 3 (Absolute), code 1 (Y), value 482
Event: time 1245850887.029315, -------------- Report Sync ------------
Event: time 1245850887.049324, type 3 (Absolute), code 0 (X), value 504
Event: time 1245850887.049330, type 3 (Absolute), code 1 (Y), value 481
Event: time 1245850887.049333, -------------- Report Sync ------------
Event: time 1245850887.069309, type 3 (Absolute), code 0 (X), value 505
Event: time 1245850887.069315, type 3 (Absolute), code 1 (Y), value 480
Event: time 1245850887.069317, -------------- Report Sync ------------
Event: time 1245850887.089305, type 3 (Absolute), code 0 (X), value 504
Event: time 1245850887.089311, type 3 (Absolute), code 1 (Y), value 482
Event: time 1245850887.089314, -------------- Report Sync ------------
Event: time 1245850887.109311, type 3 (Absolute), code 1 (Y), value 481
Event: time 1245850887.109317, -------------- Report Sync ------------
Event: time 1245850887.129308, type 3 (Absolute), code 0 (X), value 505
Event: time 1245850887.129315, -------------- Report Sync ------------
Event: time 1245850887.149324, type 3 (Absolute), code 0 (X), value 504
Event: time 1245850887.149332, -------------- Report Sync ------------

[snip]
###
Comment 3 Peter Hutterer 2009-06-24 16:45:24 UTC
right, so it actually outputs the data as x/y absolute axes. the problem is that X doesn't have a way of knowing that that's a bogus device, so you will need to keep this as a blacklist (as described above). sorry.
Comment 4 Peter Hutterer 2009-07-01 18:49:06 UTC
I'm closing the bug as WONTFIX. Since the device looks like any pointing device to X it cannot decide to ignore it. The configuration for that needs to be in the surrounding bits (currently HAL). Sorry.
Comment 5 Keith Packard 2009-07-26 13:53:13 UTC
Looks like current HAL bits classify devices with absolute axes into four groups depending on what kinds of other inputs they have:

BTN_STYLUS -> input.tablet
BTN_TOUCH -> input.touchpad
BTN_TRIGGER | BTN_A | BTN_1 -> input.joystick
BTN_MOUSE -> input.mouse

ABS_PRESSURE -> input.touchpad

So, if the accelerometer doesn't have any buttons or a pressure sensor, it shouldn't get picked up by the X server anymore. You can check in /sys/class/input/<device>/capabilities to check what hal should be doing with your device.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.