Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652448 - sys-kernel/gentoo-sources (kernel 4.9.76-r1) does not connect to the touchpad (mouse) on Lenovo ideapad 320-17-IKB neither with libinput nor evemu
Summary: sys-kernel/gentoo-sources (kernel 4.9.76-r1) does not connect to the touchpad...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-04 20:29 UTC by jplx
Modified: 2019-06-13 16:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libinput does not appear to detect the touchpad (Touchpad_Fail.txt,6.48 KB, text/plain)
2018-04-04 20:30 UTC, jplx
Details
systemctl list output (systemctl_list,15.01 KB, text/plain)
2018-04-04 20:32 UTC, jplx
Details
Output from `lshw` Command (Hardware Listing) (lshw-output,16.10 KB, text/plain)
2018-04-19 01:43 UTC, jplx
Details
/proc/bus/input/devices with MXLinux (devices_with_MXLinux,4.36 KB, text/plain)
2018-04-26 04:53 UTC, jplx
Details
/proc/bus/input/devices with gentoo (devices,3.77 KB, text/plain)
2018-04-26 04:54 UTC, jplx
Details
dmesg with gentoo (dmesg,58.30 KB, text/plain)
2018-04-26 04:55 UTC, jplx
Details
Xorg.0.log with gentoo (Xorg.0.log,5.87 KB, text/plain)
2018-04-26 04:56 UTC, jplx
Details
.config file (config,130.66 KB, text/x-mpsub)
2018-08-02 04:08 UTC, jplx
Details
dmesg (dmesg,57.45 KB, text/plain)
2018-11-08 21:28 UTC, jplx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jplx 2018-04-04 20:29:06 UTC
Lenovo ideapad 320-17-IKB running Gnome3 Wayland (following Sakaki's 'brilliant' methodology). 
echo "${XDG_SESSION_TYPE}" returns wayland.
The touchpad does not work but a Logitech mouse - with USB transmitter - does work. Only libinput is installed (not evdev and synaptics) following sakaki's guide. Following the "libinput" wiki document, xdotool and wnctrl are installed. However, libinput-list-devices does not show the touchpad and libinput-debug-events does not show anything when moving a finger over the touchpad.

Reproducible: Always

Steps to Reproduce:
1.power on and try to use the touchpad
2.
3.
Actual Results:  
Touchpad not working (pointer does not move)

Expected Results:  
Use a Logitech mouse (with USB transmitter).

libinput should support this touchpad on Lenove ideapad 320-17-IKB laptopjplx-gn2 ~ # emerge --info
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-6.4.0, glibc-2.25-r10, 4.9.76-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.9.76-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-gentoo-2.4.1
KiB Mem:    16350232 total,  15045996 free
KiB Swap:   20971516 total,  20971516 free
Timestamp of repository gentoo: Fri, 23 Mar 2018 00:45:01 +0000
Head commit of repository gentoo: f7b77364d2c2b1a1efa8480633092e05f8bcc202
Head commit of repository sakaki-tools: 349be22c5aab1399ec5b346c5210077b37c91d8f

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r10::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync6.us.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

sakaki-tools
    location: /usr/local/portage/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/sakaki-/sakaki-tools.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE CC-Sampling-Plus-1.0"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=9 --load-average=8"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.cs.uni.edu/ http://gentoo.cs.utah.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 jplx 2018-04-04 20:30:51 UTC
Created attachment 526568 [details]
libinput does not appear to detect the touchpad
Comment 2 jplx 2018-04-04 20:32:01 UTC
Created attachment 526570 [details]
systemctl list output

No failure appears to be reported by systemctl.
Comment 3 Matt Turner gentoo-dev 2018-04-04 20:51:55 UTC
Have you filed this upstream with the developers of libinput?
Comment 4 jplx 2018-04-04 21:50:20 UTC
No, I have not. Should I? How?
One additional piece of info: when The laptop boots from the system rescue disk (system-rescue-cd.org), the touchpad works fine.
Comment 5 jplx 2018-04-04 23:44:34 UTC
I found the way to file this bug at:
https://bugs.freedesktop.org
It is bug # 105893
Comment 6 jplx 2018-04-06 03:39:31 UTC
Additional info added to this bug filed at "bugs.freedesktop.org" #105893 at the request of the developer: evemu-record and udevadm info.
evemu is masked by gentoo, probably because libinput is used:
jplx-gn2 ~ # emerge --search evemu
  
[ Results for search key : evemu ]
Searching...

*  app-misc/evemu [ Masked ]
      Latest version available: 2.7.0
      Latest version installed: [ Not Installed ]
      Size of files: 498 KiB
      Homepage:      https://www.freedesktop.org/wiki/Evemu/
      Description:   tools and bindings for kernel evdev device emulation, data capture, and replay
      License:       LGPL-3 GPL-3

[ Applications found : 1 ]

So, it could not be installed and evemu-record could not be provided.
Comment 7 jplx 2018-04-06 22:17:25 UTC
Following the recommendation by the libinput developer, I installed the (masked) app-misc/evemu-2.7.0 package. 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 ~ # 

It seems to show that the touchpad is not detected by the kernel.

Current kernel on this laptop is (gentoo-sources):
jplx-gn2 ~ # uname -r
4.9.76-gentoo-r1
jplx-gn2 ~ # eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.9.76-gentoo-r1 *
jplx-gn2 ~ # 

QUESTION: should I install a more recent kernel? If yes, which one? Not sure as they all are masked except the one installed.
Comment 8 jplx 2018-04-07 05:33:10 UTC
Additional info.

From the freedesktop web site:

https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html#evemu

Note
    libinput does not affect the evemu recording. libinput and evemu talk directly to the kernel's device nodes. An evemu recording is not influenced by the libinput version or whether a libinput context is currently active.

https://wayland.freedesktop.org/libinput/doc/latest/dot_evemu.png

It shows that both evemu and evemu connect directly to the kernel. Because neither of them sees the touchpad, the problem must be likely be caused by the kernel.

I will change this but title to involve the kernel.
Comment 9 Pacho Ramos gentoo-dev 2018-04-07 11:15:30 UTC
kernel people will know better than me, but I would give a chance to latest 4.14.x version
Comment 10 Mike Pagano gentoo-dev 2018-04-18 11:59:46 UTC
(In reply to Pacho Ramos from comment #9)
> kernel people will know better than me, but I would give a chance to latest
> 4.14.x version

I concur with Pacho, here.  Your 4.9 version is almost 20 releases behind the latest.  Please try to upgrade your kernel and let us know the result. 

I do see postings on the net describing similar symptoms and upgrading the kernel did solve them.
Comment 11 jplx 2018-04-19 01:43:31 UTC
Created attachment 528020 [details]
Output from `lshw` Command (Hardware Listing)

Some interfaces show up as "UNCLAIMED":
pci generic:0 Thermal subsystem
pci generic:1 I2C Controller
pci communication CSME HECI #1 
pci memory
pci serial SMBus
power OEm
network Ethernet interface

COMMENTS: Could the I2C Controller be the problem? or the SMBus? I kind of remember that Lenovo changed the touchapd interface on this laptop and that it uses the I2C interface (for configuration?).
Comment 12 jplx 2018-04-19 01:51:05 UTC
I used `emerge -s sources` to find sources and picked sys-kernel/rt-sources.
My kernel is now 4.14.29-rt-rt25
It did not make a difference: the touchpad still does not work.
Then I installed the package for the `lshw` command. The result is shown in the previous comment. So, this `lshw` command was invoked with this new kernel.
Comment 13 jplx 2018-04-19 05:47:20 UTC
I booted the systemconfigcd and ran `lshw`. It provided the names of the drivers.So, in menuconfig I turned on:
intel_pch_thermal
intel-lpss acpi and pci
mei_me
intel_pmc_core
82801_smbus.
I also turned on the following mouse related drivers;
mouse_elan_i2C_SMBUS and mouse_elam_i2c and mouse_elan_SMBUS
mouse_synaptics_i2c and mouse_synaptics_usb
After rebuilding the kernel and rebooting, all the "UNCLAIMED" are gone
but the power, which states "OEM define". So, that does not seem to be a big deal.
However, the touchpad still does not work.
As a reminder, the sysconfigcd has the touchpad working and is a down rev of the kernel: my kernel is now more recent. So, the kernel revision does not appear to be the root cause of this issue.
Comment 14 jplx 2018-04-22 07:26:47 UTC
I doubled checked everything I could to make sure the installation is correct but could not find anything wrong.
However, I noticed that the sysresccd uses evdev and synaptics drivers while my gnome-wayland uses libinput. An important point is that evemu-record does not show anything when using the touchpad. It does show activity when the Logitech mouse is moved.
According to the libinput developer, this pinpoints to the kernel because evemu-record receives events directly from the kernel, not through the libinput driver.
So, I am kind of lost here and running out of options.
From the Xorg.0.log running on the sysresccd, the touchpad is Synaptics TM3336-001
Comment 15 jplx 2018-04-26 04:51:20 UTC
I found a way to better characterize this issue at:
https://wiki.ubuntu.com/DebuggingTouchpadDetection
Here is a pertinent abstract:
If an external mouse is working, execute at a terminal:
cat /proc/bus/input/devices
One should see:

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
blah blah...
## Comment: I have attached such an output when running MXLinux Live dvd (touchpad detected). The file is "device_with_MXLinux" ##

If you do not find something like this, then the bug is in the linux kernel. Please follow these steps:
    File the bug against the linux package.
    Provide the general information.
    Enter the following commands in a terminal:
    dmesg > ~/dmesg
    cat /proc/bus/input/devices > ~/devices
    Attach as separate attachments to your bug report ~/dmesg, ~/devices, and your /var/log/Xorg.0.log.

The files - dmesg, devices and Xorg.0.log are attached.
Comment 16 jplx 2018-04-26 04:53:07 UTC
Created attachment 528540 [details]
/proc/bus/input/devices with MXLinux

MXLinux detects the touchpad
Comment 17 jplx 2018-04-26 04:54:18 UTC
Created attachment 528542 [details]
/proc/bus/input/devices with gentoo

gentoo does not detect the touchpad
Comment 18 jplx 2018-04-26 04:55:15 UTC
Created attachment 528544 [details]
dmesg with gentoo

dmesg with gentoo
Comment 19 jplx 2018-04-26 04:56:00 UTC
Created attachment 528546 [details]
Xorg.0.log with gentoo

Xorg.0.log with gentoo
Comment 20 Mike Pagano gentoo-dev 2018-06-13 22:49:55 UTC
I have a Lenovo with a Synaptics Touchpad so maybe that will make this debugging easier.
Can you post your .config ?
Comment 21 jplx 2018-08-02 04:08:28 UTC
Created attachment 542078 [details]
.config file
Comment 22 Joakim Tjernlund 2018-10-16 11:15:03 UTC
Maybe something like this is missing:

cat /etc/X11/xorg.conf.d/50-synaptics.conf 
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
	Option "TapButton1" "1"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
#       MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
Comment 23 Mike Pagano gentoo-dev 2018-10-16 12:38:19 UTC
Can you try vanilla-sources-4.18.14 or the latest 4.18 kernel? Then post your dmesg so we can see if your touchpad is even detected.
Comment 24 Marcin Wozniak 2018-11-06 10:41:00 UTC
I have also this problem but Lenovo ideapad 320-15-IKB :(
Comment 25 jplx 2018-11-08 21:28:47 UTC
Created attachment 554580 [details]
dmesg

I installed kernel 4.18.17 and the touchpad is still not working.
Comment 26 Marcin Woźniak 2019-03-28 08:04:04 UTC
First look to my forum ;) I solved it, because I did not have a I2C enabled ;) 

https://forums.gentoo.org/viewtopic-t-1094436-highlight-ideapad.html
Comment 27 jplx 2019-04-03 04:54:44 UTC
You are right. After enabling the i2c bus, the touchpad does work. Here are the i2c lines enabled in the .config file after navigating for quite a while through the menuconfig menu:
grep -i i2c < .config | grep ^[^#]
CONFIG_REGMAP_I2C=y
CONFIG_MOUSE_ELAN_I2C=m
CONFIG_MOUSE_ELAN_I2C_I2C=y
CONFIG_MOUSE_ELAN_I2C_SMBUS=y
CONFIG_MOUSE_SYNAPTICS_I2C=y
CONFIG_RMI4_I2C=y
CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_MUX=m
CONFIG_I2C_MUX_REG=m
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_I801=y
CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_DESIGNWARE_SLAVE=y
CONFIG_I2C_DESIGNWARE_PCI=y
CONFIG_I2C_SLAVE=y
CONFIG_VIDEO_IR_I2C=m
CONFIG_I2C_HID=y
CONFIG_RTC_I2C_AND_SPI=y
CONFIG_I2C_MULTI_INSTANTIATE=m
I am not sure they are all necessary but they are sufficient. So, this issue is resolved but I would suggest that this information be included in the sakaki manuals.