Bug 105893

Summary: dev-libs/libinput does not operate the touchpad (mouse) on Lenovo ideapad 320-17-IKB in gentoo linux
Product: Wayland Reporter: Jean-Paul Lambrechts <jlambrec>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: major    
Priority: medium CC: jlambrec, peter.hutterer
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: other   
Whiteboard:
i915 platform: i915 features:
Attachments: evemu-record and udevadm info

Description Jean-Paul Lambrechts 2018-04-04 23:42:31 UTC
This bug is described in the linus gentoo bugzilla at:
https://bugs.gentoo.org/652448
The touchpad of Lenovo ideapad 320-17-IKB laptop does not appear to work with libinput.
It does work with the system-rescue-cd (system-rescue-cd.org) which is also based upon linux gentoo.
Comment 1 Peter Hutterer 2018-04-06 02:07:18 UTC
Please attach the evemu-record output of the touchpad and the output for udevadm info /sys/class/input/eventXXX, adjusted for the touchpad's event node number.

This is probably a bug with udev or the kernel because libinput doesn't even see the device.
Comment 2 Jean-Paul Lambrechts 2018-04-06 03:34:33 UTC
Created attachment 138647 [details]
evemu-record and udevadm info

Comments are embedded in the file.
Comment 3 Peter Hutterer 2018-04-06 04:37:08 UTC
xf86-input-evdev and xf86-input-libinput are sort-of mutually exclusive, the latter overwrites the former so having xf86-input-evdev installed usually won't do anything. You can still have both installed though.

libevdev and libinput are dependencies, the latter requires the former

and evemu is a completely separate tool, see https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html#evemu
I don't know enough about gentoo to help you with that though, evemu is stable enough that it shouldn't be an issue...

Judging by the list of event nodes (easier to attach /proc/bus/input/devices to see the name) you don't have a touchpad event node. This indicates that the kernel doesn't initialize the touchpad, so libinput can't do anything with it. Does the rescue cd have the same kernel?
Comment 4 Jean-Paul Lambrechts 2018-04-06 05:37:55 UTC
The kernel with gentoo (gnome3-wayland) is 4.9.76-gentoo-r1
The kernel with the system-rescue-cd is 4.14.20-std521-amd64
The kernel with gentoo is the one that is recommended during the installation by the Gentoo team.

root@sysresccd /sys/class/input % ls -l
total 0
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event0 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0/event0
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event1 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1/event1
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event2 -> ../../devices/platform/i8042/serio0/input/input2/event2
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event5 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5/event5
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event6 -> ../../devices/pci0000:00/0000:00:1f.0/PNP0C09:00/VPC2004:00/input/input6/event6
lrwxrwxrwx 1 root root 0 Apr  6 05:13 event7 -> ../../devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-4/i2c-SYNA2B3C:00/0018:06CB:8251.0003/input/input7/event7
######## Looks like the touchpad is at event 7.

root@sysresccd /sys/class/input % udevadm info /sys/class/input/event7
P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-4/i2c-SYNA2B3C:00/0018:06CB:8251.0003/input/input7/event7
N: input/event7
S: input/by-path/pci-0000:00:15.0-platform-i2c_designware.0-event-mouse
E: DEVLINKS=/dev/input/by-path/pci-0000:00:15.0-platform-i2c_designware.0-event-mouse
E: DEVNAME=/dev/input/event7
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-4/i2c-SYNA2B3C:00/0018:06CB:8251.0003/input/input7/event7
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=66
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_WIDTH_MM=101
E: ID_PATH=pci-0000:00:15.0-platform-i2c_designware.0
E: ID_PATH_TAG=pci-0000_00_15_0-platform-i2c_designware_0
E: ID_SERIAL=noserial
E: MAJOR=13
E: MINOR=71
E: SUBSYSTEM=input
E: USEC_INITIALIZED=18383565

Do you think the newer kernel on the rescue disk is the reason why the touchpad is found?
Comment 5 Peter Hutterer 2018-04-06 08:35:34 UTC
most likely, touchpads almost always need some kernel support so if one kernel works fine and the other one doesn't, and the one that works is newer - there is the problem.

udevadm info output looks correct, can't say much without evemu to the specifics. but all signs point to the need to update the kernel.
Comment 6 Jean-Paul Lambrechts 2018-04-06 22:07:30 UTC
I found the way to install evemu although it is a masked package in gentoo. Here is the output of evemu-record:

jplx-gn2 ~ # evemu-record
Available devices:
/dev/input/event0:	Lid Switch
/dev/input/event1:	Power Button
/dev/input/event2:	Video Bus
/dev/input/event3:	AT Translated Set 2 keyboard
/dev/input/event4:	Ideapad extra buttons
/dev/input/event5:	HDA Intel PCH Mic
/dev/input/event6:	HDA Intel PCH Headphone
/dev/input/event7:	HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event8:	HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event9:	HDA Intel PCH HDMI/DP,pcm=8
Select the device event number [0-9]: ^C
jplx-gn2 ~ # 

The touchpad is not detected. This appears to confirm that the root cause is the kernel.

I am reopening this bug to make sure you will see this comment. Please close it again. I will forward this info to the gentoo team. Thank you for your help.
Comment 7 Peter Hutterer 2018-04-07 00:07:54 UTC
> I am reopening this bug to make sure you will see this comment. Please close it again. 

not needed, emails are sent to all parties (assignee, cc list, etc.) regardless of the status of the bug

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.