Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 328527

Summary: sys-kernel/gentoo-sources-2.6.34-r2 does not correctly identify synaptics touchpad
Product: Gentoo Linux Reporter: Miroslav Šulc <fordfrog>
Component: Current packagesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED FIXED    
Severity: normal CC: galtgendo
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=patch;h=3619b8fead04ab9de643712e757ef6b5f79fd1ab
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Xorg.0.log
20-synaptics.conf
patches kernel to allow synaptics driver for my touchpad
Dmitry Torokhov's patch for detecting synaptics touchpad correctly
backported synaptics patch
synaptics patch for stable kernel

Description Miroslav Šulc gentoo-dev 2010-07-16 04:36:19 UTC
the problem i have is that my synaptics touchpad is using mouse driver for x server instead of synaptics. i am using x11-base/xorg-server-1.8.1.902 with udev configuration. hal is completely disabled on the system. it is ~amd64 system. here are some outputs:

# dmesg | grep -i syn
[    3.014138] Unable to query Synaptics hardware.
[    3.851342] input: PS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input8

[    24.761] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/event8)
[    24.761] (**) PS/2 Synaptics TouchPad: Applying InputClass "evdev pointer catchall"
[    24.761] (**) PS/2 Synaptics TouchPad: always reports core events
[    24.761] (**) PS/2 Synaptics TouchPad: Device: "/dev/input/event8"
[    24.769] (II) PS/2 Synaptics TouchPad: Found 3 mouse buttons
[    24.769] (II) PS/2 Synaptics TouchPad: Found relative axes
[    24.769] (II) PS/2 Synaptics TouchPad: Found x and y relative axes
[    24.769] (II) PS/2 Synaptics TouchPad: Configuring as mouse
[    24.769] (**) PS/2 Synaptics TouchPad: YAxisMapping: buttons 4 and 5
[    24.769] (**) PS/2 Synaptics TouchPad: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[    24.769] (II) XINPUT: Adding extended input device "PS/2 Synaptics TouchPad" (type: MOUSE)
[    24.769] (**) PS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
[    24.769] (**) PS/2 Synaptics TouchPad: (accel) acceleration profile 0
[    24.769] (**) PS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[    24.769] (**) PS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[    24.769] (II) PS/2 Synaptics TouchPad: initialized for relative axes.
[    24.769] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/mouse0)
[    24.769] (II) No input driver/identifier specified (ignoring)

# synclient -l
Couldn't find synaptics properties. No synaptics driver loaded?


i also tried to force usage of synaptics driver for the touchpad (by matching on Synaptics in product rather than touchpad device type) but synaptics driver complained that no device was found and was unloaded.
Comment 1 Rafał Mużyło 2010-07-16 13:08:04 UTC
Did you try to simply match it by MatchIsTouchpad in InputClass ?
Comment 2 Miroslav Šulc gentoo-dev 2010-07-16 13:43:43 UTC
yes, that's the default how it is installed by x86-input-synaptics in /etc/X11/xorg.conf.d/20-synaptics.conf but it is not activated for some reason.

idk whether this has any importance, but the touchpad claims to be dual touchpad:

"Dual-mode touchpad with media console and multi-gesture function supporting two-finger scroll, pinch, rotate, flip

Touch-sensitive media console with:
- Movie and music shortcuts
- Play/pause, stop, previous and next media controls"

it has a button between left and right button that on windows should switch touchpad to the multimedia console, but my guess is this is handled by software so i don't think it should affect whether the touchpad is correctly identified.
Comment 3 Rafał Mużyło 2010-07-16 19:56:03 UTC
Attach full Xorg log and your 20-synaptics.conf.
Comment 4 Miroslav Šulc gentoo-dev 2010-07-16 22:41:31 UTC
Created attachment 239101 [details]
Xorg.0.log
Comment 5 Miroslav Šulc gentoo-dev 2010-07-16 22:42:39 UTC
Created attachment 239103 [details]
20-synaptics.conf

this one is modified but even the not modified (the one installed by the package) did not work
Comment 6 Rafał Mużyło 2010-07-17 18:16:40 UTC
Drop 'SHMConfig' (not needed for >=xorg-server-1.7.0).

There's something funny here: it seems your touchpad is seen as a mouse,
not a touchpad.
What does 'udevadm info --query=all' print about it ?
Comment 7 Miroslav Šulc gentoo-dev 2010-07-17 18:29:38 UTC
i hope i ran the command correctly :-) and yeah, even i can see it's not mouse but touchpad so why the code can't see the same :-P

# udevadm info --query=all --name=/dev/input/event8
P: /devices/platform/i8042/serio2/input/input8/event8
N: input/event8
S: char/13:72
S: input/by-path/platform-i8042-serio-2-event-mouse
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio2/input/input8/event8
E: SUBSYSTEM=input
E: DEVNAME=input/event8
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-2
E: MAJOR=13
E: MINOR=72
E: DEVLINKS=/dev/char/13:72 /dev/input/by-path/platform-i8042-serio-2-event-mouse
Comment 8 Rafał Mużyło 2010-07-17 19:23:05 UTC
Well, so it's either kernel or hardware problem.
Have a look at extras/input_id/input_id.c from udev
to see how udev identifies touchpads.
Also, for completeness sake, add some info straight from
the kernel, that is from /sys/devices/platform/i8042/serio2/input/input8/event8
 and some of its parents.
Comment 9 Miroslav Šulc gentoo-dev 2010-07-17 19:39:58 UTC
i am not sure what info you exactly mean from the path
Comment 10 Miroslav Šulc gentoo-dev 2010-07-17 20:14:33 UTC
anyway, according to the info i found, it looks like the problem is at kernel, as kernel identifies the touchpad as PS/2 Synaptics TouchPad and not SynPS/2 Synaptics TouchPad which can be seen from dmesg output. i found similar issues on net with other laptop make too.

so changing summary to kernel related
Comment 11 Rafał Mużyło 2010-07-18 00:04:28 UTC
While it may be kernel related, the change of name does NOT play a role,
the test in input_id checks *buttons*. Given it's not getting marked as
a tablet, it's probably something about missing BTN_TOOL_FINGER
(or perhaps your touchpad registers relative axes, instead of absolute).
Comment 12 Miroslav Šulc gentoo-dev 2010-07-18 00:21:47 UTC
well, according to the info i found on net, the "change" of name indicates that it was not detected as synaptics device (SynPS/2) but regular PS/2 device. and the first one who fails to detect the device as synaptics is kernel.
Comment 13 Rafał Mużyło 2010-07-18 02:11:49 UTC
If that's the case, then from what I can google,
the fix should be loading psmouse module with 'proto=any' parameter
(or removing 'proto=imps' if you set it).
Comment 14 Miroslav Šulc gentoo-dev 2010-07-18 02:30:07 UTC
unfortunately that does not help in my case:

# rmmod psmouse
# modprobe psmouse proto=any
# dmesg | tail -n 2
[ 2427.322226] Unable to query Synaptics hardware.
[ 2428.147015] input: PS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input10

the error message that kernel is unable to query synaptics hardware imo means that kernel knows it's synaptics hardware but for some reason it cannot get info from it ... and i have no idea whether there is a way to get more detailed output from it.
Comment 15 Miroslav Šulc gentoo-dev 2010-07-18 03:17:33 UTC
i added some debug info to synaptics.c in kernel sources and found the code where the verification of device fails. my touchpad has capabilities 0xe00073 which causes SYN_CAP_VALID to fail:

#define SYN_CAP_VALID(c)                ((((c) & 0x00ff00) >> 8) == 0x47)

if i make SYN_CAP_VALID pass, driver loads and in dmesg is this:

[ 5224.375309] Synaptics Touchpad, model: 1, fw: 7.5, id: 0x2e0b1, caps: 0xe00073/0x24140d/0xa0600
[ 5224.422738] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input20

mouse in xfce works and even vertical scrolling works.

here is output from Xorg.0.log:

[  5229.118] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse0)
[  5229.118] (II) No input driver/identifier specified (ignoring)
[  5229.118] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event8)
[  5229.118] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[  5229.118] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[  5229.118] (II) LoadModule: "synaptics"
[  5229.118] (II) Loading /usr/lib64/xorg/modules/input/synaptics_drv.so
[  5229.142] (II) Module synaptics: vendor="X.Org Foundation"
[  5229.142]    compiled for 1.8.1.902, module version = 1.2.2
[  5229.142]    Module class: X.Org XInput Driver
[  5229.142]    ABI class: X.Org XInput driver, version 9.0
[  5229.142] (II) Synaptics touchpad driver version 1.2.2
[  5229.142] (**) Option "Device" "/dev/input/event8"
[  5229.190] (II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
[  5229.190] (II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
[  5229.190] (II) SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[  5229.190] (II) SynPS/2 Synaptics TouchPad: finger width range 0 - 0
[  5229.190] (II) SynPS/2 Synaptics TouchPad: buttons: left right double triple
[  5229.190] (**) Option "EmulateTwoFingerMinZ" "0"
[  5229.190] (**) Option "VertEdgeScroll" "on"
[  5229.190] (**) Option "HorizEdgeScroll" "on"
[  5229.190] (**) Option "VertTwoFingerScroll" "on"
[  5229.190] (**) Option "HorizTwoFingerScroll" "on"
[  5229.190] (**) Option "TapButton1" "1"
[  5229.190] (**) Option "TapButton2" "2"
[  5229.190] (**) Option "TapButton3" "3"
[  5229.190] (**) Option "CircularScrolling" "on"
[  5229.190] (**) Option "CircScrollTrigger" "2"
[  5229.230] (--) SynPS/2 Synaptics TouchPad: touchpad found
[  5229.230] (**) SynPS/2 Synaptics TouchPad: always reports core events
[  5229.246] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD)
[  5229.246] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
[  5229.246] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 0
[  5229.246] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[  5229.246] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[  5229.278] (--) SynPS/2 Synaptics TouchPad: touchpad found
Comment 16 Miroslav Šulc gentoo-dev 2010-07-18 04:04:35 UTC
Created attachment 239199 [details]
patches kernel to allow synaptics driver for my touchpad

this is a quick hack patch that makes my synaptics touchpad being detected as synaptics touchpad by kernel. i have no idea what consequences this could have, but for me the touchpad now works.
Comment 17 Miroslav Šulc gentoo-dev 2010-07-18 14:36:56 UTC
assigning bug to kernel herd, i hope it's correct
Comment 18 Mike Pagano gentoo-dev 2010-07-21 00:35:28 UTC
Sorry if I missed it but can you tell me what laptop brand and model you have?
Comment 19 Miroslav Šulc gentoo-dev 2010-07-21 01:53:30 UTC
well, i have escalated the bug to kernel guys as this is obviously not gentoo issue but kernel issue. see the link in this bug url. atm Dmitry Torokhov (kernel dev) is communicating with some guy from synaptics about the problem and i just noticed he got some response, so i guess there will be soon better patch than mine. i will put here update once there will be better patch so we can patch our kernel to fix it till the fix will be officially out.
Comment 20 Miroslav Šulc gentoo-dev 2010-07-21 10:27:40 UTC
Created attachment 239657 [details, diff]
Dmitry Torokhov's patch for detecting synaptics touchpad correctly

added the patch from Dmitry Torokhov. it works fine for me. imo should be added to our kernels.
Comment 21 Mike Pagano gentoo-dev 2010-07-28 01:36:02 UTC
upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=16420
Comment 22 Mike Pagano gentoo-dev 2010-07-28 01:37:19 UTC
Created attachment 240387 [details, diff]
backported synaptics patch

Can you apply this patch to gentoo-sources-2.6.34-r2 and let me know the outcome?
Comment 23 Miroslav Šulc gentoo-dev 2010-07-28 03:12:37 UTC
i'm using the patch since it was created, and without any issues
Comment 24 Mike Pagano gentoo-dev 2010-07-28 22:23:46 UTC
This patch will be included in gentoo-sources-2.6.34-r3
Comment 25 Mike Pagano gentoo-dev 2010-07-29 13:55:52 UTC
Created attachment 240577 [details, diff]
synaptics patch for stable kernel

Miroslav,

Would you be able to apply the attached patch to vanilla-sources-2.6.32.16 and let me know if it works?

We try to be good community members and I would like to submit this patch to the stable kernel tree for inclusion so others may benefit.

Thanks
Comment 26 Miroslav Šulc gentoo-dev 2010-07-29 14:04:29 UTC
the bug was fixed by Dmitry Torokhov who is kernel dev so i guess he took care of all this
Comment 27 Mike Pagano gentoo-dev 2010-07-29 15:48:42 UTC
(In reply to comment #26)
> the bug was fixed by Dmitry Torokhov who is kernel dev so i guess he took care
> of all this
> 

What are you talking about?
Comment 28 Mike Pagano gentoo-dev 2010-07-29 15:49:46 UTC
(In reply to comment #26)
> the bug was fixed by Dmitry Torokhov who is kernel dev so i guess he took care
> of all this
> 

It is fixed in the latest git, but it does not exist in the longterm stable 2.6.32 tree.

That's what I'm trying to do here
Comment 29 Mike Pagano gentoo-dev 2010-08-03 01:08:20 UTC
Released in gentoo-sources-2.6.34-r3
Comment 30 Marcos de Carvalho 2010-10-03 04:20:13 UTC
(In reply to comment #29)
> Released in gentoo-sources-2.6.34-r3
> 

Is this patch applied in 2.6.35-r9? I am having exactly the same issue. Synaptics is not being detected by the kernel.