Debian Bug report logs - #562052
hald-probe-input: does not correctly identify synaptics touchpads with mixed 64bit kernel / 32bit userland

version graph

Package: hal; Maintainer for hal is Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>; Source for hal is src:hal.

Reported by: A Mennucc <mennucc1@debian.org>

Date: Tue, 22 Dec 2009 09:36:01 UTC

Severity: important

Found in version hal/0.5.14-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#562052; Package xserver-xorg-input-synaptics. (Tue, 22 Dec 2009 09:36:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to A Mennucc <mennucc1@debian.org>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Tue, 22 Dec 2009 09:36:13 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: A Mennucc <mennucc1@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xserver-xorg-input-synaptics: does not work anymore
Date: Tue, 22 Dec 2009 10:31:06 +0100
Package: xserver-xorg-input-synaptics
Version: 1.2.0-2
Severity: important

hi,

I use Debian/sid in this MacBook5,1 
(the aluminum type, with no mouse buttons below the touchpad);

up to some days ago , the touchpad was working in a wonderful way:
if I clicked the touchpad using 2 (or 3) fingers, it would 
emit the mouse button 2nd (or 3rd); I could scroll documents
using two-finger scrolling (both horizontal and vertical!).

Then yesterday I rebooted, and, lo and behold, all was gone.
Now I can only move the mouse around and 1st button mouse click.

Moreover , the commands
$ synclient -l
prints: Couldn't find synaptics properties. No synaptics driver loaded?

Short history of my upgrades:
on nov 21 my sid box did an upgrade of xserver-xorg-input-synaptics
1.1.2-1 -> 1.2.0-1 ; then on nov 23, to 1.2.0-2 ; I did 
reboot from time to time, all was fine.

I have looked at the recent package upgrades, cant see anything
that IMHO may have broken the touchpad drivers.

a.


-- Package-specific info:
/var/lib/x11/X.roster does not exist.

/var/lib/x11/X.md5sum does not exist.

X server symlink status:
lrwxrwxrwx 1 root root 13 Apr 18  2009 /etc/X11/X -> /usr/bin/Xorg
-rwxr-xr-x 1 root root 1695728 Oct 13 13:31 /usr/bin/Xorg

/var/lib/x11/xorg.conf.roster does not exist.

VGA-compatible devices on PCI bus:
02:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M] (rev b1)

/var/lib/x11/xorg.conf.md5sum does not exist.

Xorg X server configuration file status:
-rw-r--r-- 1 root root 1095 Jun 23 15:18 /etc/X11/xorg.conf

Contents of /etc/X11/xorg.conf:
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
EndSection

Section "Device"
	Identifier	"Configured Video Device"
	Driver		"nvidia"
EndSection

Section "Monitor"
	Identifier	"Configured Monitor"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
EndSection


Xorg X server log files on system:
-rw-r--r-- 1 root root 14338 Oct 10 16:10 /var/log/Xorg.21.log
-rw-r--r-- 1 root root 16564 Dec 20 16:51 /var/log/Xorg.20.log
-rw-r--r-- 1 root root 14180 Dec 22 10:04 /var/log/Xorg.0.log

Contents of most recent Xorg X server log file
/var/log/Xorg.0.log:

X.Org X Server 1.6.5
Release Date: 2009-10-11
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.30.8-dsa-ia32 i686 Debian
Current Operating System: Linux kytty-fresh 2.6.31-1-amd64 #1 SMP Sun Nov 15 22:05:44 UTC 2009 x86_64
Build Date: 13 October 2009  11:25:51AM
xorg-server 2:1.6.5-1 (buildd@murphy.debian.org) 
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 22 10:02:43 2009
(==) Using config file: "/etc/X11/xorg.conf"
(==) No Layout section.  Using the first Screen section.
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Configured Monitor"
(==) No device specified for screen "Default Screen".
	Using the first device section listed.
(**) |   |-->Device "Configured Video Device"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
	Entry deleted from font path.
(==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/100dpi/:unscaled,
	/usr/share/fonts/X11/75dpi/:unscaled,
	/usr/share/fonts/X11/Type1,
	/usr/share/fonts/X11/100dpi,
	/usr/share/fonts/X11/75dpi,
	/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,
	built-ins
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) Cannot locate a core pointer device.
(II) Cannot locate a core keyboard device.
(II) The server relies on HAL to provide the list of input devices.
	If no devices become available, reconfigure HAL or disable AllowEmptyInput.
(II) Loader magic: 0x6c0
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.4
	X.Org Video Driver: 5.0
	X.Org XInput driver : 4.0
	X.Org Server Extension : 2.0
(II) Loader running on linux
(++) using VT number 7

(--) PCI:*(0:2:0:0) 10de:0863:106b:00aa nVidia Corporation C79 [GeForce 9400M] rev 177, Mem @ 0x92000000/16777216, 0x80000000/268435456, 0x90000000/33554432, I/O @ 0x00001000/128, BIOS @ 0x????????/131072
(II) Open ACPI successful (/var/run/acpid.socket)
(II) System resource ranges:
	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
(II) LoadModule: "extmod"
(II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension SELinux
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "dbe"
(II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions//libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Server Extension
(II) NVIDIA GLX Module  190.42  Tue Oct 20 20:55:08 PDT 2009
(II) Loading extension GLX
(II) LoadModule: "record"
(II) Loading /usr/lib/xorg/modules/extensions//librecord.so
(II) Module record: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.13.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "dri"
(II) Loading /usr/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/lib/xorg/modules/extensions//libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.1.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "nvidia"
(II) Loading /usr/lib/xorg/modules/drivers//nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Video Driver
(II) NVIDIA dlloader X Driver  190.42  Tue Oct 20 20:26:00 PDT 2009
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: PCI 02@00:00:0
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules//libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/lib/xorg/modules//libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
	compiled for 1.6.5, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(II) resource ranges after probing:
	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
(II) NVIDIA(0): Creating default Display subsection in Screen section
	"Default Screen" for depth/fbbpp 24/32
(==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) Dec 22 10:02:45 NVIDIA(0): Enabling RENDER acceleration
(II) Dec 22 10:02:45 NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(II) Dec 22 10:02:45 NVIDIA(0):     enabled.
(II) Dec 22 10:02:46 NVIDIA(0): NVIDIA GPU GeForce 9400M (C79) at PCI:2:0:0 (GPU-0)
(--) Dec 22 10:02:46 NVIDIA(0): Memory: 524288 kBytes
(--) Dec 22 10:02:46 NVIDIA(0): VideoBIOS: 62.79.40.00.01
(--) Dec 22 10:02:46 NVIDIA(0): Interlaced video modes are supported on this GPU
(--) Dec 22 10:02:46 NVIDIA(0): Connected display device(s) on GeForce 9400M at PCI:2:0:0:
(--) Dec 22 10:02:46 NVIDIA(0):     Apple (DFP-0)
(--) Dec 22 10:02:46 NVIDIA(0): Apple (DFP-0): 165.0 MHz maximum pixel clock
(--) Dec 22 10:02:46 NVIDIA(0): Apple (DFP-0): Internal Single Link LVDS
(II) Dec 22 10:02:46 NVIDIA(0): Assigned Display Device: DFP-0
(==) Dec 22 10:02:46 NVIDIA(0): 
(==) Dec 22 10:02:46 NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
(==) Dec 22 10:02:46 NVIDIA(0):     will be used as the requested mode.
(==) Dec 22 10:02:46 NVIDIA(0): 
(II) Dec 22 10:02:46 NVIDIA(0): Validated modes:
(II) Dec 22 10:02:46 NVIDIA(0):     "nvidia-auto-select"
(II) Dec 22 10:02:46 NVIDIA(0): Virtual screen size determined to be 1280 x 800
(--) Dec 22 10:02:47 NVIDIA(0): DPI set to (112, 112); computed from "UseEdidDpi" X config
(--) Dec 22 10:02:47 NVIDIA(0):     option
(==) Dec 22 10:02:47 NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
(--) Depth 24 pixmap format is 32 bpp
(II) do I need RAC?  No, I don't.
(II) resource ranges after preInit:
	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
(II) Dec 22 10:02:47 NVIDIA(0): Initialized GPU GART.
(II) Dec 22 10:02:47 NVIDIA(0): Setting mode "nvidia-auto-select"
(II) Loading extension NV-GLX
(II) Dec 22 10:02:47 NVIDIA(0): Initialized OpenGL Acceleration
(==) NVIDIA(0): Disabling shared memory pixmaps
(II) Dec 22 10:02:47 NVIDIA(0): Initialized X Rendering Acceleration
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(II) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(II) Loading extension XINERAMA
(==) RandR enabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
SELinux: Disabled on system, not enabling in X server
(II) Initializing extension GLX
(II) config/hal: Adding input device ACPI Virtual Keyboard Device
(II) LoadModule: "evdev"
(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
	compiled for 1.6.3, module version = 2.2.5
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 4.0
(**) ACPI Virtual Keyboard Device: always reports core events
(**) ACPI Virtual Keyboard Device: Device: "/dev/input/event13"
(II) ACPI Virtual Keyboard Device: Found keys
(II) ACPI Virtual Keyboard Device: Configuring as keyboard
(II) XINPUT: Adding extended input device "ACPI Virtual Keyboard Device" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(II) config/hal: Adding input device Macintosh mouse button emulation
(**) Macintosh mouse button emulation: always reports core events
(**) Macintosh mouse button emulation: Device: "/dev/input/event0"
(II) Macintosh mouse button emulation: Found 3 mouse buttons
(II) Macintosh mouse button emulation: Found x and y relative axes
(II) Macintosh mouse button emulation: Configuring as mouse
(**) Macintosh mouse button emulation: YAxisMapping: buttons 4 and 5
(**) Macintosh mouse button emulation: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
(**) Macintosh mouse button emulation: (accel) keeping acceleration scheme 1
(**) Macintosh mouse button emulation: (accel) filter chain progression: 2.00
(**) Macintosh mouse button emulation: (accel) filter stage 0: 20.00 ms
(**) Macintosh mouse button emulation: (accel) set acceleration profile 0
(II) Macintosh mouse button emulation: initialized for relative axes.
(II) config/hal: Adding input device Built-in iSight
(**) Built-in iSight: always reports core events
(**) Built-in iSight: Device: "/dev/input/event10"
(II) Built-in iSight: Found keys
(II) Built-in iSight: Configuring as keyboard
(II) XINPUT: Adding extended input device "Built-in iSight" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(II) config/hal: Adding input device Power Button
(**) Power Button: always reports core events
(**) Power Button: Device: "/dev/input/event4"
(II) Power Button: Found keys
(II) Power Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(II) config/hal: Adding input device bcm5974
(**) bcm5974: always reports core events
(**) bcm5974: Device: "/dev/input/event9"
(II) bcm5974: Found 1 mouse buttons
(II) bcm5974: Found x and y absolute axes
(II) bcm5974: Found absolute touchpad
(II) bcm5974: Configuring as touchpad
(**) bcm5974: YAxisMapping: buttons 4 and 5
(**) bcm5974: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "bcm5974" (type: TOUCHPAD)
(**) bcm5974: (accel) keeping acceleration scheme 1
(**) bcm5974: (accel) filter chain progression: 2.00
(**) bcm5974: (accel) filter stage 0: 20.00 ms
(**) bcm5974: (accel) set acceleration profile 0
(II) bcm5974: initialized for absolute axes.
(II) config/hal: Adding input device Apple, Inc. Apple Internal Keyboard / Trackpad
(**) Apple, Inc. Apple Internal Keyboard / Trackpad: always reports core events
(**) Apple, Inc. Apple Internal Keyboard / Trackpad: Device: "/dev/input/event1"
(II) Apple, Inc. Apple Internal Keyboard / Trackpad: Found keys
(II) Apple, Inc. Apple Internal Keyboard / Trackpad: Configuring as keyboard
(II) XINPUT: Adding extended input device "Apple, Inc. Apple Internal Keyboard / Trackpad" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(II) config/hal: Adding input device Power Button
(**) Power Button: always reports core events
(**) Power Button: Device: "/dev/input/event6"
(II) Power Button: Found keys
(II) Power Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(II) config/hal: Adding input device Sleep Button
(**) Sleep Button: always reports core events
(**) Sleep Button: Device: "/dev/input/event7"
(II) Sleep Button: Found keys
(II) Sleep Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch"
(WW) bcm5974: unable to handle keycode 333
(WW) bcm5974: unable to handle keycode 328
(WW) bcm5974: unable to handle keycode 334

HAL Information (lshal):
udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Power Button'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input'  (string)
  input.device = '/dev/input/event4'  (string)
  input.product = 'Power Button'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event4'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input4/event4'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Power Button'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'  (string)
  input.device = '/dev/input/event6'  (string)
  input.product = 'Power Button'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event6'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input6/event6'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_1'
  button.has_state = false  (bool)
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'button', 'input.keys'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Sleep Button'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_1'  (string)
  input.device = '/dev/input/event7'  (string)
  input.product = 'Sleep Button'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event7'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input7/event7'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_2'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keys', 'input.mouse', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Macintosh mouse button emulation'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_2'  (string)
  input.device = '/dev/input/event0'  (string)
  input.product = 'Macintosh mouse button emulation'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/virtual/input/input0/event0'  (string)

udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'ACPI Virtual Keyboard Device'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'  (string)
  input.device = '/dev/input/event13'  (string)
  input.product = 'ACPI Virtual Keyboard Device'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event13'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/virtual/input/input13/event13'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if0_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if0'  (string)
  info.product = 'Apple, Inc. Apple Internal Keyboard / Trackpad'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if0_logicaldev_input'  (string)
  input.device = '/dev/input/event1'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if0'  (string)
  input.product = 'Apple, Inc. Apple Internal Keyboard / Trackpad'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event1'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/input/input1/event1'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2'  (string)
  info.product = 'bcm5974'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2_logicaldev_input'  (string)
  input.device = '/dev/input/event9'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2'  (string)
  input.product = 'bcm5974'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event9'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.2/input/input9/event9'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8507_8H933017940V3A00_if0_logicaldev_input'
  button.has_state = false  (bool)
  button.type = 'power'  (string)
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'button', 'input.keys'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_8507_8H933017940V3A00_if0'  (string)
  info.product = 'Built-in iSight'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8507_8H933017940V3A00_if0_logicaldev_input'  (string)
  input.device = '/dev/input/event10'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_8507_8H933017940V3A00_if0'  (string)
  input.product = 'Built-in iSight'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'pc104'  (string)
  input.xkb.options = 'lv3:ralt_switch'  (string)
  linux.device_file = '/dev/input/event10'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.1/usb1/1-4/1-4:1.0/input/input10/event10'  (string)

DRM Information from dmesg:
[    0.000000] No AGP bridge found
[    0.606288] Linux agpgart interface v0.103


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xserver-xorg-input-synaptics depends on:
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  libpciaccess0                 0.10.9-1   Generic PCI access library for X
ii  libpixman-1-0                 0.16.2-1   pixel-manipulation library for X a
ii  libx11-6                      2:1.3.2-1  X11 client-side library
ii  libxi6                        2:1.2.1-2  X11 Input extension library
ii  xserver-xorg-core             2:1.6.5-1  Xorg X server - core server

xserver-xorg-input-synaptics recommends no packages.

Versions of packages xserver-xorg-input-synaptics suggests:
pn  gpointing-device-settings     <none>     (no description available)
pn  touchfreeze                   <none>     (no description available)

-- no debconf information

-- 
Andrea Mennucc
 "E' un mondo difficile. Che vita intensa!" (Tonino Carotone)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#562052; Package xserver-xorg-input-synaptics. (Tue, 22 Dec 2009 10:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Tue, 22 Dec 2009 10:36:04 GMT) Full text and rfc822 format available.

Message #10 received at 562052@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: A Mennucc <mennucc1@debian.org>, 562052@bugs.debian.org
Subject: Re: Bug#562052: xserver-xorg-input-synaptics: does not work anymore
Date: Tue, 22 Dec 2009 11:35:03 +0100
On Tue, Dec 22, 2009 at 10:31:06 +0100, A Mennucc wrote:

> udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2_logicaldev_input'
>   info.addons.singleton = {'hald-addon-input'} (string list)
>   info.callouts.add = {'debian-setup-keyboard'} (string list)
>   info.capabilities = {'input', 'input.keys', 'button'} (string list)
>   info.category = 'input'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2'  (string)
>   info.product = 'bcm5974'  (string)
>   info.subsystem = 'input'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2_logicaldev_input'  (string)
>   input.device = '/dev/input/event9'  (string)
>   input.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_237_noserial_if2'  (string)
>   input.product = 'bcm5974'  (string)
>   input.x11_driver = 'evdev'  (string)
>   input.xkb.layout = 'us'  (string)
>   input.xkb.model = 'pc104'  (string)
>   input.xkb.options = 'lv3:ralt_switch'  (string)
>   linux.device_file = '/dev/input/event9'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'input'  (string)
>   linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.2/input/input9/event9'  (string)
> 
The device doesn't have input.touchpad capabilities in hal.  This is
either a hal or a kernel bug, not X's fault.

Cheers,
Julien




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#562052; Package xserver-xorg-input-synaptics. (Tue, 22 Dec 2009 12:42:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gavin Kinsey <gavin.kinsey@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Tue, 22 Dec 2009 12:42:05 GMT) Full text and rfc822 format available.

Message #15 received at 562052@bugs.debian.org (full text, mbox):

From: Gavin Kinsey <gavin.kinsey@gmail.com>
To: 562052@bugs.debian.org
Subject: Re: xserver-xorg-input-synaptics: does not work anymore
Date: Tue, 22 Dec 2009 12:40:59 +0000
It's a hal bug, I had the same problem.  Downgrading hal to v0.5.13-6 fixed 
it for me, restoring the input.touchpad property to info.capabilities.




Bug reassigned from package 'xserver-xorg-input-synaptics' to 'hal'. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Tue, 22 Dec 2009 15:45:03 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions xserver-xorg-input-synaptics/1.2.0-2. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Tue, 22 Dec 2009 15:45:04 GMT) Full text and rfc822 format available.

Bug Marked as found in versions hal/0.5.14-1. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Tue, 22 Dec 2009 15:45:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 13:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 13:00:03 GMT) Full text and rfc822 format available.

Message #26 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: 562052@bugs.debian.org
Subject: Re: xserver-xorg-input-synaptics: does not work anymore
Date: Thu, 24 Dec 2009 15:53:08 +0300
I've similar prob here too.

Synaptics Touchpad, model: 1, fw: 6.2, id: 0x1280b1, caps: 0xa04713/0x204000

I: Bus=0011 Vendor=0002 Product=0007 Version=12b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/devices/platform/i8042/serio4/input/input7
U: Uniq=
H: Handlers=mouse1 event7
B: EV=b
B: KEY=6420 7000f 0 0 0 0
B: ABS=11000003

udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.callouts.add = {'debian-setup-keyboard'} (string list)
  info.capabilities = {'input', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port'  (string)
  info.product = 'SynPS/2 Synaptics TouchPad'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'  (string)
  input.device = '/dev/input/event7'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port'  (string)
  input.product = 'SynPS/2 Synaptics TouchPad'  (string)
  input.x11_driver = 'evdev'  (string)
  linux.device_file = '/dev/input/event7'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/devices/platform/i8042/serio4/input/input7/event7'  (string)


So hal does not list 'input.touchpad' in capabilities and
hence assigns evdev driver instead of synaptics.

Manually setting input.x11_driver property to synaptics
with hal-set-property restores synaptics functionality.

In 0.5.13 it worked ok.
Kernels tried are 2.6.31 or 2.6.32

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 13:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 13:06:03 GMT) Full text and rfc822 format available.

Message #31 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: 562052@bugs.debian.org
Subject: Re: xserver-xorg-input-synaptics: does not work anymore
Date: Thu, 24 Dec 2009 16:05:24 +0300
Michael Tokarev пишет:
> I've similar prob here too.
> 
> Synaptics Touchpad, model: 1, fw: 6.2, id: 0x1280b1, caps: 0xa04713/0x204000
> 
> I: Bus=0011 Vendor=0002 Product=0007 Version=12b1
> N: Name="SynPS/2 Synaptics TouchPad"
> P: Phys=isa0060/serio4/input0
> S: Sysfs=/devices/platform/i8042/serio4/input/input7
> U: Uniq=
> H: Handlers=mouse1 event7
> B: EV=b
> B: KEY=6420 7000f 0 0 0 0
> B: ABS=11000003
> 
> udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'
>   info.capabilities = {'input', 'input.keys', 'button'} (string list)
>   info.product = 'SynPS/2 Synaptics TouchPad'  (string)
> In 0.5.13 it worked ok.

Here's the relevant changes in hal between 0.5.13 and 0.5.14:

--- hal-0.5.13/hald/linux/device.c      2009-07-15 10:54:11.000000000 +0400
+++ hal-0.5.14/hald/linux/device.c      2009-12-01 01:01:10.000000000 +0300
@@ -1160,10 +1158,10 @@ input_test_abs (HalDevice *d, const char
                        num_bits_key = input_str_to_bitmask (s, bitmask_key, sizeof (bitmask_key));

-                       if (test_bit (BTN_STYLUS, bitmask_key)) {
+                       if (test_bit (BTN_STYLUS, bitmask_key) || test_bit (BTN_TOOL_PEN, bitmask_key)) {
                                hal_device_add_capability (d, "input.tablet");
                                goto out;
                        }

-                       if (test_bit (BTN_TOUCH, bitmask_key)) {
+                       if (test_bit (BTN_TOOL_FINGER, bitmask_key) && !test_bit (BTN_TOOL_PEN, bitmask_key)) {
                                hal_device_add_capability (d, "input.touchpad");
                                goto out;
@@ -1184,9 +1182,4 @@ input_test_abs (HalDevice *d, const char
                        }
                }
-
-               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
-                       hal_device_add_capability (d, "input.touchpad");
-                       goto out;
-               }
        }
 out:


So what's "6420 7000f 0 0 0 0" in terms of BTN_* above?

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 18:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to mennucc1@debian.org:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 18:00:03 GMT) Full text and rfc822 format available.

Message #36 received at 562052@bugs.debian.org (full text, mbox):

From: A Mennucc <mennucc1@debian.org>
To: 562052@bugs.debian.org
Subject: Re: Bug#562052: xserver-xorg-input-synaptics: does not work anymore
Date: Thu, 24 Dec 2009 18:58:11 +0100
hi,

I downloaded the source of hal 0.5.14-1

and reversed the patch that is in
http://cgit.freedesktop.org/hal/patch/?id=52e039f3b0a5749f706b97491087b9632d30512f

and compiled and installed, and it works here.

a.





Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 18:03:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 18:03:05 GMT) Full text and rfc822 format available.

Message #41 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dtor@mail.ru>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Thu, 24 Dec 2009 20:59:47 +0300
[commit 52e039f3b0a5749f706b97491087b9632d30512f in hal git tree,
http://cgit.freedesktop.org/hal/commit/?id=52e039f3b0a5749f706b97491087b9632d30512f]

That commit in hal (released as 0.5.14) - apparently -
causes some breakage.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562052
is one example (with my comments, Cc'd).

Basically, in some cases synaptics touchpad is not
recognized as touchpad by hal and hence wrong driver
gets loaded.

My example:

I: Bus=0011 Vendor=0002 Product=0007 Version=12b1
N: Name="SynPS/2 Synaptics TouchPad"
B: EV=b
B: KEY=6420 7000f 0 0 0 0
B: ABS=11000003

(it's an Acer Aspire 9300 notebook, the touchpad has
3 buttons, middle of which is like the main "ok"
button on a typical cell phone -- one can press it
to center and to any of 4 other directions).

With this hunk:

@@ -1184,9 +1182,4 @@ input_test_abs (HalDevice *d, const char
                        }
                }
-
-               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
-                       hal_device_add_capability (d, "input.touchpad");
-                       goto out;
-               }
        }
 out:

(ie, without the ABS_PRESSURE test) the device is not recognized
as a touchpad.  Adding this test back restores things to normal.
The other change in that patch, BTN_TOUCH => BTN_TOOL_FINGER,
has no effect.

The kernel is 2.6.32 currently.

What's wrong? ;)

Thanks!

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 20:06:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 20:06:05 GMT) Full text and rfc822 format available.

Message #46 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Thu, 24 Dec 2009 12:04:41 -0800
On Thu, Dec 24, 2009 at 08:59:47PM +0300, Michael Tokarev wrote:
> [commit 52e039f3b0a5749f706b97491087b9632d30512f in hal git tree,
> http://cgit.freedesktop.org/hal/commit/?id=52e039f3b0a5749f706b97491087b9632d30512f]
> 
> That commit in hal (released as 0.5.14) - apparently -
> causes some breakage.
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562052
> is one example (with my comments, Cc'd).
> 
> Basically, in some cases synaptics touchpad is not
> recognized as touchpad by hal and hence wrong driver
> gets loaded.
> 
> My example:
> 
> I: Bus=0011 Vendor=0002 Product=0007 Version=12b1
> N: Name="SynPS/2 Synaptics TouchPad"
> B: EV=b
> B: KEY=6420 7000f 0 0 0 0
> B: ABS=11000003
> 
> (it's an Acer Aspire 9300 notebook, the touchpad has
> 3 buttons, middle of which is like the main "ok"
> button on a typical cell phone -- one can press it
> to center and to any of 4 other directions).
> 
> With this hunk:
> 
> @@ -1184,9 +1182,4 @@ input_test_abs (HalDevice *d, const char
>                         }
>                 }
> -
> -               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
> -                       hal_device_add_capability (d, "input.touchpad");
> -                       goto out;
> -               }
>         }
>  out:
> 
> (ie, without the ABS_PRESSURE test) the device is not recognized
> as a touchpad.  Adding this test back restores things to normal.
> The other change in that patch, BTN_TOUCH => BTN_TOOL_FINGER,
> has no effect.
> 
> The kernel is 2.6.32 currently.
> 
> What's wrong? ;)
>

Not sure, seems to be working here... Keying on ABS_PRESSURE is
definitely not correct as some touchpads to not report it and many
touchscreens do. Is this on 32 or 64 bit kernels? What about userspace?

-- 
Dmitry




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 20:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 20:33:03 GMT) Full text and rfc822 format available.

Message #51 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Thu, 24 Dec 2009 23:32:27 +0300
Dmitry Torokhov wrote:
[]
>> B: KEY=6420 7000f 0 0 0 0
>> B: ABS=11000003
>>
[]
>> -               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
[]
>> What's wrong? ;)
> 
> Not sure, seems to be working here... Keying on ABS_PRESSURE is

It apparently works on some laptops here and fails on others.

> definitely not correct as some touchpads to not report it and many
> touchscreens do. Is this on 32 or 64 bit kernels? What about userspace?

32bit userspace, either 32 or 64bit kernel.  But since the string
as read from sysfs does not depend on kernel bitness, both should
be irrelevant... I hope.

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 20:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 20:51:03 GMT) Full text and rfc822 format available.

Message #56 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Thu, 24 Dec 2009 12:48:24 -0800
On Thu, Dec 24, 2009 at 11:32:27PM +0300, Michael Tokarev wrote:
> Dmitry Torokhov wrote:
> []
> >> B: KEY=6420 7000f 0 0 0 0
> >> B: ABS=11000003
> >>
> []
> >> -               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
> []
> >> What's wrong? ;)
> > 
> > Not sure, seems to be working here... Keying on ABS_PRESSURE is
> 
> It apparently works on some laptops here and fails on others.
> 
> > definitely not correct as some touchpads to not report it and many
> > touchscreens do. Is this on 32 or 64 bit kernels? What about userspace?
> 
> 32bit userspace, either 32 or 64bit kernel.  But since the string
> as read from sysfs does not depend on kernel bitness, both should
> be irrelevant... I hope.
> 

Not really :( We print in groups of longs so it is either 32 or 64 bits
worth of data per number.

-- 
Dmitry




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 24 Dec 2009 22:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 22:54:02 GMT) Full text and rfc822 format available.

Message #61 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Fri, 25 Dec 2009 01:51:27 +0300
Dmitry Torokhov wrote:
> On Thu, Dec 24, 2009 at 11:32:27PM +0300, Michael Tokarev wrote:
>> Dmitry Torokhov wrote:
>> []
>>>> B: KEY=6420 7000f 0 0 0 0
>>>> B: ABS=11000003
>>>>
>> []
>>>> -               if (test_bit (ABS_PRESSURE, bitmask_abs)) {
>> []
>>>> What's wrong? ;)
>>> Not sure, seems to be working here... Keying on ABS_PRESSURE is
>> It apparently works on some laptops here and fails on others.
>>
>>> definitely not correct as some touchpads to not report it and many
>>> touchscreens do. Is this on 32 or 64 bit kernels? What about userspace?
>> 32bit userspace, either 32 or 64bit kernel.  But since the string
>> as read from sysfs does not depend on kernel bitness, both should
>> be irrelevant... I hope.
> 
> Not really :( We print in groups of longs so it is either 32 or 64 bits
> worth of data per number.

Ok, I stand corrected.  I verified the issue with 32bit kernel, and
there, hald works as expected, listing `synaptics' as x11_driver
and correct input.touchpad capability.

Oh well.

/mjt






Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Fri, 25 Dec 2009 10:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Fri, 25 Dec 2009 10:57:03 GMT) Full text and rfc822 format available.

Message #66 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: hal@lists.freedesktop.org, 562052@bugs.debian.org
Subject: Re: Correctly identify touchpads
Date: Fri, 25 Dec 2009 13:52:52 +0300
Michael Tokarev wrote:
> Dmitry Torokhov wrote:
>> On Thu, Dec 24, 2009 at 11:32:27PM +0300, Michael Tokarev wrote:

>>>>> B: KEY=6420 7000f 0 0 0 0
>>>>> B: ABS=11000003
[]
>> Not really :( We print in groups of longs so it is either 32 or 64 bits
>> worth of data per number.
> 
> Ok, I stand corrected.  I verified the issue with 32bit kernel, and
> there, hald works as expected, listing `synaptics' as x11_driver
> and correct input.touchpad capability.

So the question is how userspace can detect the right size.

The above example shows 6 groups of numbers.  With 32bit kernel that
turns into 12 groups.  Is that enough clue?

How about changing kernel interface to print whole number in one go?

And the bug appears to be in kernel really, but assigning it to hal
at this point makes sense.

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Wed, 30 Dec 2009 10:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Wed, 30 Dec 2009 10:03:03 GMT) Full text and rfc822 format available.

Message #71 received at 562052@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Michael Tokarev <mjt@tls.msk.ru>, 562052@bugs.debian.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Wed, 30 Dec 2009 11:00:43 +0100
Michael Tokarev [2009-12-25  1:51 +0300]:
> > Not really :( We print in groups of longs so it is either 32 or 64 bits
> > worth of data per number.
> 
> Ok, I stand corrected.  I verified the issue with 32bit kernel, and
> there, hald works as expected, listing `synaptics' as x11_driver
> and correct input.touchpad capability.

Just to have all the data, could you please find the input device
number (from lshal, as you did before), and send the output of

  cat /sys/class/input/inputX/capabilities/key

(replace X with the particular input device number) under a 32 and 64
bit system?

Also, do you get correct or wrong ID_INPUT_* flags for the synaptics
device in "udevadm info --export-db|less"? I expect it to be wrong as
well, since it's pretty much the same code.

udev/hal already use sizeof(long) to determine the length of a long
word length, and it doesn't seem to happen everywhere. (I am running a
64 bit kernel/userspace and get correct results).

I might have misunderstood you, but did you actually try to run a 64
bit kernel under 32 bit userspace? That would explain the bug, since
hal/udev were compiled with the assumption that sizeof(long) == 4,
while the kernel prints those in groups of 8 bytes.

So if we want to support mixed kernel/userspace word lenghts, we need
to change the logic to do a dynamic word size detection based on
uname().

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Wed, 30 Dec 2009 11:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Wed, 30 Dec 2009 11:03:02 GMT) Full text and rfc822 format available.

Message #76 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Michael Tokarev <mjt@tls.msk.ru>, 562052@bugs.debian.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Wed, 30 Dec 2009 14:01:09 +0300
Martin Pitt wrote:
> Michael Tokarev [2009-12-25  1:51 +0300]:
>>> Not really :( We print in groups of longs so it is either 32 or 64 bits
>>> worth of data per number.
>> Ok, I stand corrected.  I verified the issue with 32bit kernel, and
>> there, hald works as expected, listing `synaptics' as x11_driver
>> and correct input.touchpad capability.
> 
> Just to have all the data, could you please find the input device
> number (from lshal, as you did before), and send the output of
> 
>   cat /sys/class/input/inputX/capabilities/key
> 
> (replace X with the particular input device number) under a 32 and 64
> bit system?

It's shown in /proc/bus/input/devices too.  Sure I can, here we go:

32bit: 6420 0 7000f 0 0 0 0 0 0 0 0
64bit: 6420 7000f 0 0 0 0

> Also, do you get correct or wrong ID_INPUT_* flags for the synaptics
> device in "udevadm info --export-db|less"? I expect it to be wrong as
> well, since it's pretty much the same code.

in both cases userspace is 32bit, but kernel bitness is different:

32bit:
P: /devices/platform/i8042/serio4/input/input9
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio4/input/input9
E: PRODUCT=11/2/7/12b1
E: NAME="SynPS/2 Synaptics TouchPad"
E: PHYS="isa0060/serio4/input0"
E: EV==b
E: KEY==6420 0 7000f 0 0 0 0 0 0 0 0
E: ABS==11000003
E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw
E: SUBSYSTEM=input

64bit:
P: /devices/platform/i8042/serio4/input/input9
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio4/input/input9
E: PRODUCT=11/2/7/12b1
E: NAME="SynPS/2 Synaptics TouchPad"
E: PHYS="isa0060/serio4/input0"
E: EV==b
E: KEY==6420 7000f 0 0 0 0
E: ABS==11000003
E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw
E: SUBSYSTEM=input

Udev merely collects text attributes from sysfs, so it's expected
that all the attributes are the same as kernel says they are.

> udev/hal already use sizeof(long) to determine the length of a long
> word length, and it doesn't seem to happen everywhere. (I am running a
> 64 bit kernel/userspace and get correct results).

It works correctly with 32bit userspace and 32bit kernel too.

> I might have misunderstood you, but did you actually try to run a 64
> bit kernel under 32 bit userspace? That would explain the bug, since
> hal/udev were compiled with the assumption that sizeof(long) == 4,
> while the kernel prints those in groups of 8 bytes.

This is exactly what happens, to me and to the original bug reporter --
we both are running 32bit userspace and 64bit kernel.

Note that the difference between ioctl and sysfs is exactly in this
kind of issues: to be independent of word size... ;)

> So if we want to support mixed kernel/userspace word lenghts, we need
> to change the logic to do a dynamic word size detection based on
> uname().

Not uname please.  There should be a better way :)

For example, see the number of words shown in "key" attribute:
for 32bits it's two times of 64bits...

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Wed, 30 Dec 2009 11:12:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Wed, 30 Dec 2009 11:12:03 GMT) Full text and rfc822 format available.

Message #81 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Wed, 30 Dec 2009 03:08:42 -0800
On Wed, Dec 30, 2009 at 02:01:09PM +0300, Michael Tokarev wrote:
> Martin Pitt wrote:
> > Michael Tokarev [2009-12-25  1:51 +0300]:
> >>> Not really :( We print in groups of longs so it is either 32 or 64 bits
> >>> worth of data per number.
> >> Ok, I stand corrected.  I verified the issue with 32bit kernel, and
> >> there, hald works as expected, listing `synaptics' as x11_driver
> >> and correct input.touchpad capability.
> > 
> > Just to have all the data, could you please find the input device
> > number (from lshal, as you did before), and send the output of
> > 
> >   cat /sys/class/input/inputX/capabilities/key
> > 
> > (replace X with the particular input device number) under a 32 and 64
> > bit system?
> 
> It's shown in /proc/bus/input/devices too.  Sure I can, here we go:
> 
> 32bit: 6420 0 7000f 0 0 0 0 0 0 0 0
> 64bit: 6420 7000f 0 0 0 0
> 
> > Also, do you get correct or wrong ID_INPUT_* flags for the synaptics
> > device in "udevadm info --export-db|less"? I expect it to be wrong as
> > well, since it's pretty much the same code.
> 
> in both cases userspace is 32bit, but kernel bitness is different:
> 
> 32bit:
> P: /devices/platform/i8042/serio4/input/input9
> E: UDEV_LOG=3
> E: DEVPATH=/devices/platform/i8042/serio4/input/input9
> E: PRODUCT=11/2/7/12b1
> E: NAME="SynPS/2 Synaptics TouchPad"
> E: PHYS="isa0060/serio4/input0"
> E: EV==b
> E: KEY==6420 0 7000f 0 0 0 0 0 0 0 0
> E: ABS==11000003
> E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw
> E: SUBSYSTEM=input
> 
> 64bit:
> P: /devices/platform/i8042/serio4/input/input9
> E: UDEV_LOG=3
> E: DEVPATH=/devices/platform/i8042/serio4/input/input9
> E: PRODUCT=11/2/7/12b1
> E: NAME="SynPS/2 Synaptics TouchPad"
> E: PHYS="isa0060/serio4/input0"
> E: EV==b
> E: KEY==6420 7000f 0 0 0 0
> E: ABS==11000003
> E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw
> E: SUBSYSTEM=input
> 
> Udev merely collects text attributes from sysfs, so it's expected
> that all the attributes are the same as kernel says they are.
> 
> > udev/hal already use sizeof(long) to determine the length of a long
> > word length, and it doesn't seem to happen everywhere. (I am running a
> > 64 bit kernel/userspace and get correct results).
> 
> It works correctly with 32bit userspace and 32bit kernel too.
> 
> > I might have misunderstood you, but did you actually try to run a 64
> > bit kernel under 32 bit userspace? That would explain the bug, since
> > hal/udev were compiled with the assumption that sizeof(long) == 4,
> > while the kernel prints those in groups of 8 bytes.
> 
> This is exactly what happens, to me and to the original bug reporter --
> we both are running 32bit userspace and 64bit kernel.
> 
> Note that the difference between ioctl and sysfs is exactly in this
> kind of issues: to be independent of word size... ;)
> 
> > So if we want to support mixed kernel/userspace word lenghts, we need
> > to change the logic to do a dynamic word size detection based on
> > uname().
> 
> Not uname please.  There should be a better way :)
> 
> For example, see the number of words shown in "key" attribute:
> for 32bits it's two times of 64bits...
> 

I think we'll just have to make kernel output in 32 bits for compat
processes.

-- 
Dmitry




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Wed, 30 Dec 2009 12:24:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Wed, 30 Dec 2009 12:24:07 GMT) Full text and rfc822 format available.

Message #86 received at 562052@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Michael Tokarev <mjt@tls.msk.ru>, 562052@bugs.debian.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Wed, 30 Dec 2009 13:23:07 +0100
Michael Tokarev [2009-12-30 14:01 +0300]:
> in both cases userspace is 32bit, but kernel bitness is different:

Ah, thanks.

> Udev merely collects text attributes from sysfs, 

No, it also stores properties set in udev rules. I was particularly
interested in the ID_INPUT_* properties set by
/lib/udev/rules.d/60-persistent-input.rules, but they are not in your
dump.

> This is exactly what happens, to me and to the original bug reporter --
> we both are running 32bit userspace and 64bit kernel.

OK, thanks. Then it's quite clear why this happens.

> > So if we want to support mixed kernel/userspace word lenghts, we need
> > to change the logic to do a dynamic word size detection based on
> > uname().
> 
> Not uname please.  There should be a better way :)

I don't like it either, since you have to compare with a lot of fixed
strings, for each supported architecture. Do you know a better way of
asking the kernel for its word size?

> For example, see the number of words shown in "key" attribute:
> for 32bits it's two times of 64bits...

Not really. The attribute has as many words as necessary for the
highest bit set. E. g. many input devices have a single "0" there.
Check "cat /sys/class/input*/capabilities/key".

If the kernel would have an architecture independent representation of
those bits in the sys attribute, that would help a lot indeed. Right
now, I don't think we can sanely support mixed kernel/userspace
architectures.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Changed Bug title to 'hald-probe-input: does not correctly identify synaptics touchpads with mixed 64bit kernel / 32bit userland' from 'xserver-xorg-input-synaptics: does not work anymore' Request was from Michael Biebl <biebl@debian.org> to control@bugs.debian.org. (Wed, 30 Dec 2009 17:09:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Mon, 04 Jan 2010 09:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Mon, 04 Jan 2010 09:21:05 GMT) Full text and rfc822 format available.

Message #93 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>, 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Mon, 4 Jan 2010 01:18:43 -0800
On Wed, Dec 30, 2009 at 01:23:07PM +0100, Martin Pitt wrote:
> Michael Tokarev [2009-12-30 14:01 +0300]:
> > in both cases userspace is 32bit, but kernel bitness is different:
> 
> Ah, thanks.
> 
> > Udev merely collects text attributes from sysfs, 
> 
> No, it also stores properties set in udev rules. I was particularly
> interested in the ID_INPUT_* properties set by
> /lib/udev/rules.d/60-persistent-input.rules, but they are not in your
> dump.
> 
> > This is exactly what happens, to me and to the original bug reporter --
> > we both are running 32bit userspace and 64bit kernel.
> 
> OK, thanks. Then it's quite clear why this happens.
> 
> > > So if we want to support mixed kernel/userspace word lenghts, we need
> > > to change the logic to do a dynamic word size detection based on
> > > uname().
> > 
> > Not uname please.  There should be a better way :)
> 
> I don't like it either, since you have to compare with a lot of fixed
> strings, for each supported architecture. Do you know a better way of
> asking the kernel for its word size?
> 
> > For example, see the number of words shown in "key" attribute:
> > for 32bits it's two times of 64bits...
> 
> Not really. The attribute has as many words as necessary for the
> highest bit set. E. g. many input devices have a single "0" there.
> Check "cat /sys/class/input*/capabilities/key".
> 
> If the kernel would have an architecture independent representation of
> those bits in the sys attribute, that would help a lot indeed. Right
> now, I don't think we can sanely support mixed kernel/userspace
> architectures.
> 

Does the following patch fixes it for you guys?

Thanks.

-- 
Dmitry


Input: add compat support for sysfs and /proc capabilities output

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input core displays capabilities bitmasks in form of one or more longs printed
in hex form and separated by spaces. Unfortunately it does not work well
for 32-bit applications running on 64-bit kernels since applications expect
that number is "worth" only 32 bits when kernel advances by 64 bits.

Fix that by ensuring that output produced for compat tasks uses 32-bit units.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/input-compat.h |    2 +
 drivers/input/input.c        |   74 +++++++++++++++++++++++++++++++++---------
 2 files changed, 61 insertions(+), 15 deletions(-)


diff --git a/drivers/input/input-compat.h b/drivers/input/input-compat.h
index 47cd9ea..0ef5dcd 100644
--- a/drivers/input/input-compat.h
+++ b/drivers/input/input-compat.h
@@ -75,6 +75,8 @@ static inline size_t input_event_size(void)
 
 #else
 
+#define INPUT_COMPAT_TEST (0)
+
 static inline size_t input_event_size(void)
 {
 	return sizeof(struct input_event);
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 910d7be..13b1d26 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -24,6 +24,7 @@
 #include <linux/mutex.h>
 #include <linux/rcupdate.h>
 #include <linux/smp_lock.h>
+#include "input-compat.h"
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("Input core");
@@ -831,18 +832,51 @@ static void input_seq_stop(struct seq_file *seq, void *v)
 		mutex_unlock(&input_mutex);
 }
 
+static int input_bits_to_string(char *buf, int buf_size,
+				unsigned long bits, bool skip_empty)
+{
+	int len = 0;
+
+	if (INPUT_COMPAT_TEST) {
+		u32 dword = (bits & 0xffffffff00000000UL) >> 32;
+		if (dword || !skip_empty)
+			len += snprintf(buf, buf_size, "%x ", dword);
+
+		dword = (bits & 0xffffffffUL);
+		if (dword || !skip_empty || len)
+			len += snprintf(buf + len, min(buf_size - len, 0),
+					"%x", dword);
+	} else {
+		if (bits || !skip_empty)
+			len += snprintf(buf, buf_size, "%lx", bits);
+	}
+
+	return len;
+}
+
 static void input_seq_print_bitmap(struct seq_file *seq, const char *name,
 				   unsigned long *bitmap, int max)
 {
 	int i;
-
-	for (i = BITS_TO_LONGS(max) - 1; i > 0; i--)
-		if (bitmap[i])
-			break;
+	bool skip_empty = true;
+	char buf[18];
 
 	seq_printf(seq, "B: %s=", name);
-	for (; i >= 0; i--)
-		seq_printf(seq, "%lx%s", bitmap[i], i > 0 ? " " : "");
+
+	for (i = BITS_TO_LONGS(max) - 1; i >= 0; i--) {
+		if (input_bits_to_string(buf, sizeof(buf),
+					 bitmap[i], skip_empty)) {
+			skip_empty = false;
+			seq_printf(seq, "%s%s", buf, i > 0 ? " " : "");
+		}
+	}
+
+	/*
+	 * If no output was produced print a single 0.
+	 */
+	if (skip_empty)
+		seq_puts(seq, "0");
+
 	seq_putc(seq, '\n');
 }
 
@@ -1131,14 +1165,23 @@ static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
 {
 	int i;
 	int len = 0;
+	bool skip_empty = true;
+
+	for (i = BITS_TO_LONGS(max) - 1; i >= 0; i--) {
+		len += input_bits_to_string(buf + len, max(buf_size - len, 0),
+					    bitmap[i], skip_empty);
+		if (len) {
+			skip_empty = false;
+			if (i > 0)
+				len += snprintf(buf + len, max(buf_size - len, 0), " ");
+		}
+	}
 
-	for (i = BITS_TO_LONGS(max) - 1; i > 0; i--)
-		if (bitmap[i])
-			break;
-
-	for (; i >= 0; i--)
-		len += snprintf(buf + len, max(buf_size - len, 0),
-				"%lx%s", bitmap[i], i > 0 ? " " : "");
+	/*
+	 * If no output was produced print a single 0.
+	 */
+	if (len == 0)
+		len = snprintf(buf, buf_size, "%d", 0);
 
 	if (add_cr)
 		len += snprintf(buf + len, max(buf_size - len, 0), "\n");
@@ -1153,7 +1196,8 @@ static ssize_t input_dev_show_cap_##bm(struct device *dev,		\
 {									\
 	struct input_dev *input_dev = to_input_dev(dev);		\
 	int len = input_print_bitmap(buf, PAGE_SIZE,			\
-				     input_dev->bm##bit, ev##_MAX, 1);	\
+				     input_dev->bm##bit, ev##_MAX,	\
+				     true);				\
 	return min_t(int, len, PAGE_SIZE);				\
 }									\
 static DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL)
@@ -1217,7 +1261,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
 
 	len = input_print_bitmap(&env->buf[env->buflen - 1],
 				 sizeof(env->buf) - env->buflen,
-				 bitmap, max, 0);
+				 bitmap, max, false);
 	if (len >= (sizeof(env->buf) - env->buflen))
 		return -ENOMEM;
 




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Thu, 07 Jan 2010 08:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Thu, 07 Jan 2010 08:03:03 GMT) Full text and rfc822 format available.

Message #98 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Martin Pitt <mpitt@debian.org>, 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Wed, 6 Jan 2010 23:58:51 -0800
On Mon, Jan 04, 2010 at 01:18:43AM -0800, Dmitry Torokhov wrote:
> On Wed, Dec 30, 2009 at 01:23:07PM +0100, Martin Pitt wrote:
> > Michael Tokarev [2009-12-30 14:01 +0300]:
> > > in both cases userspace is 32bit, but kernel bitness is different:
> > 
> > Ah, thanks.
> > 
> > > Udev merely collects text attributes from sysfs, 
> > 
> > No, it also stores properties set in udev rules. I was particularly
> > interested in the ID_INPUT_* properties set by
> > /lib/udev/rules.d/60-persistent-input.rules, but they are not in your
> > dump.
> > 
> > > This is exactly what happens, to me and to the original bug reporter --
> > > we both are running 32bit userspace and 64bit kernel.
> > 
> > OK, thanks. Then it's quite clear why this happens.
> > 
> > > > So if we want to support mixed kernel/userspace word lenghts, we need
> > > > to change the logic to do a dynamic word size detection based on
> > > > uname().
> > > 
> > > Not uname please.  There should be a better way :)
> > 
> > I don't like it either, since you have to compare with a lot of fixed
> > strings, for each supported architecture. Do you know a better way of
> > asking the kernel for its word size?
> > 
> > > For example, see the number of words shown in "key" attribute:
> > > for 32bits it's two times of 64bits...
> > 
> > Not really. The attribute has as many words as necessary for the
> > highest bit set. E. g. many input devices have a single "0" there.
> > Check "cat /sys/class/input*/capabilities/key".
> > 
> > If the kernel would have an architecture independent representation of
> > those bits in the sys attribute, that would help a lot indeed. Right
> > now, I don't think we can sanely support mixed kernel/userspace
> > architectures.
> > 
> 
> Does the following patch fixes it for you guys?
> 

*ping* Any luck with this one? I'd like to get it into .33.

Thanks!

> Thanks.
> 
> -- 
> Dmitry
> 
> 
> Input: add compat support for sysfs and /proc capabilities output
> 
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> Input core displays capabilities bitmasks in form of one or more longs printed
> in hex form and separated by spaces. Unfortunately it does not work well
> for 32-bit applications running on 64-bit kernels since applications expect
> that number is "worth" only 32 bits when kernel advances by 64 bits.
> 
> Fix that by ensuring that output produced for compat tasks uses 32-bit units.
> 
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> ---
> 
>  drivers/input/input-compat.h |    2 +
>  drivers/input/input.c        |   74 +++++++++++++++++++++++++++++++++---------
>  2 files changed, 61 insertions(+), 15 deletions(-)
> 
> 
> diff --git a/drivers/input/input-compat.h b/drivers/input/input-compat.h
> index 47cd9ea..0ef5dcd 100644
> --- a/drivers/input/input-compat.h
> +++ b/drivers/input/input-compat.h
> @@ -75,6 +75,8 @@ static inline size_t input_event_size(void)
>  
>  #else
>  
> +#define INPUT_COMPAT_TEST (0)
> +
>  static inline size_t input_event_size(void)
>  {
>  	return sizeof(struct input_event);
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 910d7be..13b1d26 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -24,6 +24,7 @@
>  #include <linux/mutex.h>
>  #include <linux/rcupdate.h>
>  #include <linux/smp_lock.h>
> +#include "input-compat.h"
>  
>  MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
>  MODULE_DESCRIPTION("Input core");
> @@ -831,18 +832,51 @@ static void input_seq_stop(struct seq_file *seq, void *v)
>  		mutex_unlock(&input_mutex);
>  }
>  
> +static int input_bits_to_string(char *buf, int buf_size,
> +				unsigned long bits, bool skip_empty)
> +{
> +	int len = 0;
> +
> +	if (INPUT_COMPAT_TEST) {
> +		u32 dword = (bits & 0xffffffff00000000UL) >> 32;
> +		if (dword || !skip_empty)
> +			len += snprintf(buf, buf_size, "%x ", dword);
> +
> +		dword = (bits & 0xffffffffUL);
> +		if (dword || !skip_empty || len)
> +			len += snprintf(buf + len, min(buf_size - len, 0),
> +					"%x", dword);
> +	} else {
> +		if (bits || !skip_empty)
> +			len += snprintf(buf, buf_size, "%lx", bits);
> +	}
> +
> +	return len;
> +}
> +
>  static void input_seq_print_bitmap(struct seq_file *seq, const char *name,
>  				   unsigned long *bitmap, int max)
>  {
>  	int i;
> -
> -	for (i = BITS_TO_LONGS(max) - 1; i > 0; i--)
> -		if (bitmap[i])
> -			break;
> +	bool skip_empty = true;
> +	char buf[18];
>  
>  	seq_printf(seq, "B: %s=", name);
> -	for (; i >= 0; i--)
> -		seq_printf(seq, "%lx%s", bitmap[i], i > 0 ? " " : "");
> +
> +	for (i = BITS_TO_LONGS(max) - 1; i >= 0; i--) {
> +		if (input_bits_to_string(buf, sizeof(buf),
> +					 bitmap[i], skip_empty)) {
> +			skip_empty = false;
> +			seq_printf(seq, "%s%s", buf, i > 0 ? " " : "");
> +		}
> +	}
> +
> +	/*
> +	 * If no output was produced print a single 0.
> +	 */
> +	if (skip_empty)
> +		seq_puts(seq, "0");
> +
>  	seq_putc(seq, '\n');
>  }
>  
> @@ -1131,14 +1165,23 @@ static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
>  {
>  	int i;
>  	int len = 0;
> +	bool skip_empty = true;
> +
> +	for (i = BITS_TO_LONGS(max) - 1; i >= 0; i--) {
> +		len += input_bits_to_string(buf + len, max(buf_size - len, 0),
> +					    bitmap[i], skip_empty);
> +		if (len) {
> +			skip_empty = false;
> +			if (i > 0)
> +				len += snprintf(buf + len, max(buf_size - len, 0), " ");
> +		}
> +	}
>  
> -	for (i = BITS_TO_LONGS(max) - 1; i > 0; i--)
> -		if (bitmap[i])
> -			break;
> -
> -	for (; i >= 0; i--)
> -		len += snprintf(buf + len, max(buf_size - len, 0),
> -				"%lx%s", bitmap[i], i > 0 ? " " : "");
> +	/*
> +	 * If no output was produced print a single 0.
> +	 */
> +	if (len == 0)
> +		len = snprintf(buf, buf_size, "%d", 0);
>  
>  	if (add_cr)
>  		len += snprintf(buf + len, max(buf_size - len, 0), "\n");
> @@ -1153,7 +1196,8 @@ static ssize_t input_dev_show_cap_##bm(struct device *dev,		\
>  {									\
>  	struct input_dev *input_dev = to_input_dev(dev);		\
>  	int len = input_print_bitmap(buf, PAGE_SIZE,			\
> -				     input_dev->bm##bit, ev##_MAX, 1);	\
> +				     input_dev->bm##bit, ev##_MAX,	\
> +				     true);				\
>  	return min_t(int, len, PAGE_SIZE);				\
>  }									\
>  static DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL)
> @@ -1217,7 +1261,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
>  
>  	len = input_print_bitmap(&env->buf[env->buflen - 1],
>  				 sizeof(env->buf) - env->buflen,
> -				 bitmap, max, 0);
> +				 bitmap, max, false);
>  	if (len >= (sizeof(env->buf) - env->buflen))
>  		return -ENOMEM;
>  

-- 
Dmitry




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Sat, 09 Jan 2010 23:03:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Sat, 09 Jan 2010 23:03:11 GMT) Full text and rfc822 format available.

Message #103 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Sun, 10 Jan 2010 02:01:08 +0300
Dmitry Torokhov wrote:
[]
>>> This is exactly what happens, to me and to the original bug reporter --
>>> we both are running 32bit userspace and 64bit kernel.
[]
> Does the following patch fixes it for you guys?

No, Dmitry, it does not.  It's buggy.

With this patch applied, the bits are all completely wrong.

# hexdump -C /sys/devices/platform/i8042/serio4/input/input6/capabilities/key
00000000  00 00 00 00 20 30 20 00  00 00 00 00 20 30 20 00  |.... 0 ..... 0 .|
00000010  20 30 20 00 20 30 20 00  20 30 20 00 0a           | 0 . 0 . 0 ..|
0000001d
# hexdump -C /sys/devices/platform/i8042/serio4/input/input6/capabilities/ev
00000000  00 0a                                             |..|
00000002

The same's in /proc/bus/input/devices, obviously.

I'll try to take a look at the patch tomorrow.

Thanks!

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Sun, 10 Jan 2010 07:03:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Sun, 10 Jan 2010 07:03:06 GMT) Full text and rfc822 format available.

Message #108 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Sat, 9 Jan 2010 22:59:32 -0800
On Sun, Jan 10, 2010 at 02:01:08AM +0300, Michael Tokarev wrote:
> Dmitry Torokhov wrote:
> []
> >>> This is exactly what happens, to me and to the original bug reporter --
> >>> we both are running 32bit userspace and 64bit kernel.
> []
> > Does the following patch fixes it for you guys?
> 
> No, Dmitry, it does not.  It's buggy.
> 
> With this patch applied, the bits are all completely wrong.
> 
> # hexdump -C /sys/devices/platform/i8042/serio4/input/input6/capabilities/key
> 00000000  00 00 00 00 20 30 20 00  00 00 00 00 20 30 20 00  |.... 0 ..... 0 .|
> 00000010  20 30 20 00 20 30 20 00  20 30 20 00 0a           | 0 . 0 . 0 ..|
> 0000001d
> # hexdump -C /sys/devices/platform/i8042/serio4/input/input6/capabilities/ev
> 00000000  00 0a                                             |..|
> 00000002
> 
> The same's in /proc/bus/input/devices, obviously.
> 
> I'll try to take a look at the patch tomorrow.
> 
> Thanks!
> 

Doh, amazing what min/max mixup will do. The patch below should fix
that.

-- 
Dmitry

input compat fixup.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/input.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/input/input.c b/drivers/input/input.c
index 687ea63..94385b9 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -838,13 +838,13 @@ static int input_bits_to_string(char *buf, int buf_size,
 	int len = 0;
 
 	if (INPUT_COMPAT_TEST) {
-		u32 dword = (bits & 0xffffffff00000000UL) >> 32;
+		u32 dword = bits >> 32;
 		if (dword || !skip_empty)
 			len += snprintf(buf, buf_size, "%x ", dword);
 
-		dword = (bits & 0xffffffffUL);
+		dword = bits & 0xffffffffUL;
 		if (dword || !skip_empty || len)
-			len += snprintf(buf + len, min(buf_size - len, 0),
+			len += snprintf(buf + len, max(buf_size - len, 0),
 					"%x", dword);
 	} else {
 		if (bits || !skip_empty)




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Sun, 10 Jan 2010 12:33:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Sun, 10 Jan 2010 12:33:06 GMT) Full text and rfc822 format available.

Message #113 received at 562052@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Sun, 10 Jan 2010 15:27:02 +0300
Dmitry Torokhov wrote:
> On Sun, Jan 10, 2010 at 02:01:08AM +0300, Michael Tokarev wrote:
>> Dmitry Torokhov wrote:
>> []
>>>>> This is exactly what happens, to me and to the original bug reporter --
>>>>> we both are running 32bit userspace and 64bit kernel.
>> []
>>> Does the following patch fixes it for you guys?
>> No, Dmitry, it does not.  It's buggy.
>>
>> With this patch applied, the bits are all completely wrong.
>>
[]
> Doh, amazing what min/max mixup will do. The patch below should fix
> that.

With the fixup applied on top of previous patch, the whole thing
appears to work correctly.  2.6.32-amd64:

32bit grep:
/sys/devices/platform/i8042/serio4/input/input6/capabilities# grep . *
abs:11000003
ev:b
ff:0
key:6420 0 7000f 0 0 0 0 0 0 0 0
led:0
msc:0
rel:0
snd:0
sw:0

64bit grep:
/sys/devices/platform/i8042/serio4/input/input6/capabilities# ~/grep . *
abs:11000003
ev:b
ff:0
key:6420 7000f 0 0 0 0
led:0
msc:0
rel:0
snd:0
sw:0

A few questions still:

o I think the 'key' attribute used to be shorter previously, eliminating
  unnecessary trailing zeros, but it is not anymore.  Just curious.

o How about other systems such as sparc 32/64 or power 32/64?  I'm not
  sure the patch is endian-clean.

Thanks!

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#562052; Package hal. (Sun, 10 Jan 2010 20:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Torokhov <dmitry.torokhov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Sun, 10 Jan 2010 20:03:03 GMT) Full text and rfc822 format available.

Message #118 received at 562052@bugs.debian.org (full text, mbox):

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 562052@bugs.debian.org, hal@lists.freedesktop.org
Subject: Re: Bug#562052: Correctly identify touchpads
Date: Sun, 10 Jan 2010 12:01:20 -0800
On Sun, Jan 10, 2010 at 03:27:02PM +0300, Michael Tokarev wrote:
> Dmitry Torokhov wrote:
> > On Sun, Jan 10, 2010 at 02:01:08AM +0300, Michael Tokarev wrote:
> >> Dmitry Torokhov wrote:
> >> []
> >>>>> This is exactly what happens, to me and to the original bug reporter --
> >>>>> we both are running 32bit userspace and 64bit kernel.
> >> []
> >>> Does the following patch fixes it for you guys?
> >> No, Dmitry, it does not.  It's buggy.
> >>
> >> With this patch applied, the bits are all completely wrong.
> >>
> []
> > Doh, amazing what min/max mixup will do. The patch below should fix
> > that.
> 
> With the fixup applied on top of previous patch, the whole thing
> appears to work correctly.  2.6.32-amd64:

Great! Thank you very much for testing.

> 
> 32bit grep:
> /sys/devices/platform/i8042/serio4/input/input6/capabilities# grep . *
> abs:11000003
> ev:b
> ff:0
> key:6420 0 7000f 0 0 0 0 0 0 0 0
> led:0
> msc:0
> rel:0
> snd:0
> sw:0
> 
> 64bit grep:
> /sys/devices/platform/i8042/serio4/input/input6/capabilities# ~/grep . *
> abs:11000003
> ev:b
> ff:0
> key:6420 7000f 0 0 0 0
> led:0
> msc:0
> rel:0
> snd:0
> sw:0
> 
> A few questions still:
> 
> o I think the 'key' attribute used to be shorter previously, eliminating
>   unnecessary trailing zeros, but it is not anymore.  Just curious.

No, you can only eliminate leading zeroes, otherwise how would you know
which is the starting bit?

> 
> o How about other systems such as sparc 32/64 or power 32/64?  I'm not
>   sure the patch is endian-clean.

I believe it is endian clean because I am using shifts to get dwords out
of u64 instead of trying to address them directly (which would require
different handling on LE vs. BE).

Thanks.

-- 
Dmitry




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 23:31:56 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.