Bug 100345 - synaptics driver accepts settings, but then ignores all of them
Summary: synaptics driver accepts settings, but then ignores all of them
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/synaptics (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 100346
  Show dependency treegraph
 
Reported: 2017-03-22 18:37 UTC by Nikolaus Rath
Modified: 2017-04-04 08:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log (28.49 KB, text/plain)
2017-03-24 16:03 UTC, Nikolaus Rath
no flags Details
evemu-describe (1.34 KB, text/plain)
2017-03-24 22:50 UTC, Nikolaus Rath
no flags Details
dmesg output (59.95 KB, text/plain)
2017-03-27 17:32 UTC, Nikolaus Rath
no flags Details

Description Nikolaus Rath 2017-03-22 18:37:59 UTC
As far as I can tell, the synaptics driver is completely ignoring any settings that I set either by calling synclient or in xorg.conf.d.

For example:

$ synclient | grep Scroll
    VertScrollDelta         = 91
    HorizScrollDelta        = 91
    VertEdgeScroll          = 0
    HorizEdgeScroll         = 0
    VertTwoFingerScroll     = 1
    HorizTwoFingerScroll    = 0
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0

$ synclient VertEdgeScroll=1 VertTwoFingerScroll=0

$ synclient | grep Scroll
    VertScrollDelta         = 91
    HorizScrollDelta        = 91
    VertEdgeScroll          = 1
    HorizEdgeScroll         = 0
    VertTwoFingerScroll     = 0
    HorizTwoFingerScroll    = 0
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0

At this point, I can still not do edge scrolling on the touchpad, and two-finger scrolling still works.

Setting the parameters in Xorg.conf has the same (lack of) effect: synclient reports the right settings, but they don't take effect.

This affects all options that I have tried to set. So far, these are VertTwoFingerScroll, VertEdgeScroll, SoftButtonAreas, Tap2Button.

xinput says (after the above commands):

$ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ALP000D:00 044E:120C                    	id=10	[slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                	id=12	[slave  pointer  (2)]
⎜   ↳ Chicony Wireless Device                 	id=16	[slave  pointer  (2)]
⎜   ↳ Chicony Wireless Device                 	id=17	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ HP HD Camera                            	id=9	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=11	[slave  keyboard (3)]
    ↳ HP Wireless hotkeys                     	id=13	[slave  keyboard (3)]
    ↳ HP WMI hotkeys                          	id=14	[slave  keyboard (3)]
    ↳ Chicony Wireless Device                 	id=15	[slave  keyboard (3)]

$ xinput --list-props 12
Device 'AlpsPS/2 ALPS GlidePoint':
	Device Enabled (139):	1
	Coordinate Transformation Matrix (141):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (262):	1
	Device Accel Constant Deceleration (263):	2.500000
	Device Accel Adaptive Deceleration (264):	1.000000
	Device Accel Velocity Scaling (265):	12.500000
	Synaptics Edges (286):	614, 3481, 307, 1740
	Synaptics Finger (287):	25, 30, 0
	Synaptics Tap Time (288):	180
	Synaptics Tap Move (289):	201
	Synaptics Tap Durations (290):	180, 180, 100
	Synaptics ClickPad (291):	1
	Synaptics Middle Button Timeout (292):	0
	Synaptics Two-Finger Pressure (293):	282
	Synaptics Two-Finger Width (294):	7
	Synaptics Scrolling Distance (295):	91, 91
	Synaptics Edge Scrolling (296):	1, 0, 0
	Synaptics Two-Finger Scrolling (297):	0, 0
	Synaptics Move Speed (298):	1.000000, 1.750000, 0.043687, 0.000000
	Synaptics Off (299):	0
	Synaptics Locked Drags (300):	0
	Synaptics Locked Drags Timeout (301):	5000
	Synaptics Tap Action (302):	0, 0, 0, 0, 0, 0, 0
	Synaptics Click Action (303):	1, 3, 2
	Synaptics Circular Scrolling (304):	0
	Synaptics Circular Scrolling Distance (305):	0.100000
	Synaptics Circular Scrolling Trigger (306):	0
	Synaptics Circular Pad (307):	0
	Synaptics Palm Detection (308):	0
	Synaptics Palm Dimensions (309):	10, 200
	Synaptics Coasting Speed (310):	20.000000, 50.000000
	Synaptics Pressure Motion (311):	30, 160
	Synaptics Pressure Motion Factor (312):	1.000000, 1.000000
	Synaptics Grab Event Device (313):	0
	Synaptics Gestures (314):	1
	Synaptics Capabilities (315):	1, 0, 0, 1, 1, 0, 0
	Synaptics Pad Resolution (316):	37, 48
	Synaptics Area (317):	0, 0, 0, 0
	Synaptics Soft Button Areas (318):	2047, 0, 1678, 0, 0, 0, 0, 0
	Synaptics Noise Cancellation (319):	22, 22
	Device Product ID (257):	2, 8
	Device Node (258):	"/dev/input/event5"


On startup, X11 says:

[    50.371] (II) config/udev: Adding input device AlpsPS/2 ALPS GlidePoint (/dev/input/event5)
[    50.371] (**) AlpsPS/2 ALPS GlidePoint: Applying InputClass "evdev touchpad catchall"
[    50.371] (**) AlpsPS/2 ALPS GlidePoint: Applying InputClass "touchpad catchall"
[    50.371] (**) AlpsPS/2 ALPS GlidePoint: Applying InputClass "Default clickpad buttons"
[    50.371] (II) LoadModule: "synaptics"
[    50.371] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[    50.380] (II) Module synaptics: vendor="X.Org Foundation"
[    50.381] 	compiled for 1.16.0.901, module version = 1.8.99
[    50.381] 	Module class: X.Org XInput Driver
[    50.381] 	ABI class: X.Org XInput driver, version 21.0
[    50.381] (II) Using input driver 'synaptics' for 'AlpsPS/2 ALPS GlidePoint'
[    50.381] (**) AlpsPS/2 ALPS GlidePoint: always reports core events
[    50.381] (**) Option "Device" "/dev/input/event5"
[    50.424] (II) synaptics: AlpsPS/2 ALPS GlidePoint: found clickpad property
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: x-axis range 0 - 4095 (res 48)
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: y-axis range 0 - 2047 (res 37)
[    50.424] (II) synaptics: AlpsPS/2 ALPS GlidePoint: device does not report pressure, will use touch data.
[    50.424] (II) synaptics: AlpsPS/2 ALPS GlidePoint: device does not report finger width.
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: buttons: left double triple
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: Vendor 0x2 Product 0x8
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: invalid pressure range.  defaulting to 0 - 255
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: invalid finger width range.  defaulting to 0 - 15
[    50.424] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
[    50.424] (--) synaptics: AlpsPS/2 ALPS GlidePoint: touchpad found
[    50.424] (**) AlpsPS/2 ALPS GlidePoint: always reports core events
[    50.456] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio3/input/input10/event5"
[    50.456] (II) XINPUT: Adding extended input device "AlpsPS/2 ALPS GlidePoint" (type: TOUCHPAD, id 12)
[    50.456] (**) synaptics: AlpsPS/2 ALPS GlidePoint: (accel) MinSpeed is now constant deceleration 2.5
[    50.456] (**) synaptics: AlpsPS/2 ALPS GlidePoint: (accel) MaxSpeed is now 1.75
[    50.456] (**) synaptics: AlpsPS/2 ALPS GlidePoint: (accel) AccelFactor is now 0.044
[    50.456] (**) AlpsPS/2 ALPS GlidePoint: (accel) keeping acceleration scheme 1
[    50.456] (**) AlpsPS/2 ALPS GlidePoint: (accel) acceleration profile 1
[    50.456] (**) AlpsPS/2 ALPS GlidePoint: (accel) acceleration factor: 2.000
[    50.456] (**) AlpsPS/2 ALPS GlidePoint: (accel) acceleration threshold: 4
[    50.456] (--) synaptics: AlpsPS/2 ALPS GlidePoint: touchpad found
[    50.457] (II) config/udev: Adding input device AlpsPS/2 ALPS GlidePoint (/dev/input/mouse0)
[    50.457] (**) AlpsPS/2 ALPS GlidePoint: Ignoring device from InputClass "touchpad ignore duplicates"
[    50.457] (II) config/udev: Adding input device PC Speaker (/dev/input/event7)
[    50.457] (II) No input driver specified, ignoring this device.
[    50.457] (II) This device may have been added with another device file.
Comment 1 Peter Hutterer 2017-03-22 21:45:36 UTC
> $ xinput
> ⎡ Virtual core pointer                          id=2    [master pointer  (3)]
> ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
> ⎜   ↳ ALP000D:00 044E:120C                      id=10   [slave  pointer  (2)]

^^^ this is most likely your problem. The touchpad looks a i2c device and the
"AlpsPS/2 ..." device is just a mute kernel device now. synclient most
likely configures the wrong one, so the settings are applied to a device
that never sends events. You should be able to verify that with sudo
evemu-record, check where the events are coming from. And compare that with
the list-props output for the two devices.

PS: you can use the device name instead of the number:
    xinput list-props "ALP000D:00 044E:120C"
Comment 2 Nikolaus Rath 2017-03-23 15:52:34 UTC
Thanks Peter! 

You are right. If I use the touchpad and run evemu-record, then it shows events only for the 'ALP000D:00 044E:120C' thing. 

However, shouldn't the settings in xorg.conf affect both devices? I am using:

Section "Inputclass"
    Identifier "Touchpad"
    Driver "synaptics" 
    MatchIsTouchpad "on" 
    Option "VertEdgeScroll" "on"
    Option "VertTwoFingerScroll" "off"
    Option "PalmDetect" "on"
    Option "TapButton2" "2"
    Option "SoftButtonAreas" "50% 0 0 81% 0 0 82% 0"
EndSection


Is there a way to tell synclient which device to configure? Or to make the events come from the right device? I am not sure if I'm looking at a bug here or if things work as intended and I'm just unable to configure the right device..
Comment 3 Peter Hutterer 2017-03-23 23:17:24 UTC
those settings should affect everything, but depending on the DE you use it may overwrite the settings at runtime. Attach your full xorg.log, that should contain the info whether it's applied at start.

synclient doesn't take a device argument iirc, it just picks the first touchpad device it finds which is usually the legacy PS2 one. This is a kernel-level driver decisiion, so unless you want to force the kernel to load the ps2 driver, you cannot change which device generates events (and we don't recommend it anyway).
Comment 4 Nikolaus Rath 2017-03-24 16:03:32 UTC
I've attached the full Xorg.log. I am using i3 and xsettingsd, so I don't think anything else is messing with the settings.
Comment 5 Nikolaus Rath 2017-03-24 16:03:55 UTC
Created attachment 130417 [details]
Xorg log
Comment 6 Peter Hutterer 2017-03-24 21:08:29 UTC
looks like the device is assigned the evdev driver - I wonder why. Attach an evemu-describe of the ALP000.. device please.
Comment 7 Nikolaus Rath 2017-03-24 22:50:07 UTC
Created attachment 130444 [details]
evemu-describe

Attached output of 'sudo evemu-describe /dev/input/event17 > evemu-describe.txt'.
Comment 8 Peter Hutterer 2017-03-26 23:50:22 UTC
ok, this is a i2c touchpad (ALP000D:00 044E:120C) that should be supported by v4.8 and later, 120C was introduced by kernel commit 2562756dde5. But the touchpad is still in relative mouse emulation mode. So either hid-i2c is missing from your kernel or something else is going wrong here. Please attach your dmesg, thanks.
Comment 9 Benjamin Tissoires 2017-03-27 14:28:48 UTC
(In reply to Peter Hutterer from comment #8)
> ok, this is a i2c touchpad (ALP000D:00 044E:120C) that should be supported
> by v4.8 and later, 120C was introduced by kernel commit 2562756dde5. But the
> touchpad is still in relative mouse emulation mode. So either hid-i2c is
> missing from your kernel or something else is going wrong here. Please
> attach your dmesg, thanks.

Well, it looks like commit 819d64e51d6260 in the kernel reverted the hid-core change, meaning that the device gets picked by hid-generic, not hid-alps.

Nikolaus, could you check if manually unbinding the device from hid-generic and rebinding it to hid-alps makes the touchpad working?

For that please look for a symlink named 0018:044E:120C.0001 (the last number might differ). Then run as root:
#> modprobe hid-alps
#> echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-generic/unbind
#> echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-alps/bind

Keep an eye on the dmesg, it should show that the device is now handled by hid-alps. If the enumeration works properly and the touchpad is functional again, I can send these settings by default upstream. Note that at the next reboot, you will have to redo this manual switch between the 2 drivers.
Comment 10 Nikolaus Rath 2017-03-27 17:32:18 UTC
Created attachment 130486 [details]
dmesg output

dmesg output is attached.
Comment 11 Nikolaus Rath 2017-03-27 17:34:32 UTC
# modprobe hid-alps

[0] root@thinkpad:~
# cd /sys/bus/hid/drivers/hid-generic/

[0] root@thinkpad:.../hid/drivers/hid-generic
# dir
total 0
drwxr-xr-x 2 root root    0 Mar 27 02:58 .
drwxr-xr-x 4 root root    0 Mar 27 02:58 ..
lrwxrwxrwx 1 root root    0 Mar 27 10:33 0003:0D3D:0001.0002 -> ../../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1.2/1-4.1.2:1.0/0003:0D3D:0001.0002
lrwxrwxrwx 1 root root    0 Mar 27 10:33 0003:0D3D:0001.0003 -> ../../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1.2/1-4.1.2:1.1/0003:0D3D:0001.0003
lrwxrwxrwx 1 root root    0 Mar 27 10:33 0003:1A7C:0191.0004 -> ../../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1.1/1-4.1.1:1.0/0003:1A7C:0191.0004
lrwxrwxrwx 1 root root    0 Mar 27 10:33 0018:044E:120C.0001 -> ../../../../devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-8/i2c-ALP000D:00/0018:044E:120C.0001
--w------- 1 root root 4.0K Mar 27 10:33 bind
lrwxrwxrwx 1 root root    0 Mar 27 10:33 module -> ../../../../module/hid_generic
--w------- 1 root root 4.0K Mar 27 10:33 new_id
--w------- 1 root root 4.0K Mar 27 02:58 uevent
--w------- 1 root root 4.0K Mar 27 10:33 unbind

[0] root@thinkpad:.../hid/drivers/hid-generic
# echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-generic/unbind

[0] root@thinkpad:.../hid/drivers/hid-generic
# echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-alps/bind
-bash: echo: write error: No such device
Comment 12 Benjamin Tissoires 2017-03-28 07:26:22 UTC
(In reply to Nikolaus Rath from comment #11)
> [0] root@thinkpad:.../hid/drivers/hid-generic
> # echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-alps/bind
> -bash: echo: write error: No such device

Sorry, I missed that 819d64e51d6260 removed the catch-all in hid-alps.

Before calling bind on the device, you would need to add it to the supported devices:
#> echo 18 044e 120c 0 > /sys/bus/hid/drivers/hid-alps/new_id
#> echo 0018:044E:120C.0001 > /sys/bus/hid/drivers/hid-alps/bind
Comment 13 Nikolaus Rath 2017-03-28 15:59:18 UTC
Still the same problem:


[0] root@thinkpad:~
# echo 0018:044E:120C.0004 > /sys/bus/hid/drivers/hid-generic/unbind

[0] root@thinkpad:~
# echo 18 044e 120c 0 > /sys/bus/hid/drivers/hid-alps/new_id

[0] root@thinkpad:~
# echo 0018:044E:120C.0004 > /sys/bus/hid/drivers/hid-alps/bind
-bash: echo: write error: No such device

(id is different now, presumably because of reboot)
Comment 14 Benjamin Tissoires 2017-03-30 05:44:13 UTC
FYI, Alps just sent a patch supporting this device: https://lkml.org/lkml/2017/3/29/994
Comment 15 Peter Hutterer 2017-03-30 06:15:38 UTC
hooray! closing this bug then, let's get that kernel patch sorted and then we can revisit if it's still an issue then.
Comment 16 Nikolaus Rath 2017-04-03 23:41:17 UTC
Uh. I just tried that patch (on top of 4.10), and it just disables the touchpad completely. xinput says

$ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                	id=14	[slave  pointer  (2)]
⎜   ↳ Chicony Wireless Device                 	id=9	[slave  pointer  (2)]
⎜   ↳ Chicony Wireless Device                 	id=11	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ HP HD Camera                            	id=12	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
    ↳ HP Wireless hotkeys                     	id=15	[slave  keyboard (3)]
    ↳ HP WMI hotkeys                          	id=16	[slave  keyboard (3)]
    ↳ Chicony Wireless Device                 	id=10	[slave  keyboard (3)]


I guess I should take this to the kernel list?
Comment 17 Peter Hutterer 2017-04-04 00:23:54 UTC
always check with evemu-record, not xinput just in case a driver filters a device out. if evemu-record doesn't show the device either, then it's definitely a kernel bug, not something we'll likely fix here.
Comment 18 Benjamin Tissoires 2017-04-04 08:07:36 UTC
(In reply to Nikolaus Rath from comment #16)
> Uh. I just tried that patch (on top of 4.10), and it just disables the
> touchpad completely. xinput says
> 
> I guess I should take this to the kernel list?

Yes please. Put in CC Masaki Ota, the email is in the patch. He'll likely ask for dmesg and such, but you'll figure it out.

And yes, as Peter said, this bug is for libinput/xorg-synaptics. We are allowed to discuss kernel things here, but the resolution/status of the bug concerns only libinput.


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