GNOME Bugzilla – Bug 698226
Automatically disable touchpad when using Lenovo Thinkpad Twist in Tablet mode
Last modified: 2018-03-05 10:43:37 UTC
The thinkpad twist[1] is a "convertible" laptop: it is a normal laptop with a touchscreen, but the screen also twists and closes and then you can use it as a tablet. When the device is put in tablet mode, the mouse cursor jitters across the screen because, well, Lenovo did a bad job when designing the touchpad. Windows solves this by disabling the touchpad (since it's hidden under the lid anyway) when the device is in tablet mode. We should do that too. Some more info here [2] and here [3]. lsusb output: Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 03eb:8206 Atmel Corp. Bus 001 Device 004: ID 0a5c:21f3 Broadcom Corp. Bus 002 Device 003: ID 0483:91d1 SGS Thomson Microelectronics Bus 002 Device 004: ID 04f2:b315 Chicony Electronics Co., Ltd xinput list: ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Atmel Atmel maXTouch Digitizer id=9 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint id=14 [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)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Integrated Camera id=10 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)] ↳ ThinkPad Extra Buttons id=13 [slave keyboard (3)] [1] https://www.lenovo.com/products/us/laptop/thinkpad/thinkpad-twist/ [2] http://www.thinkwiki.org/wiki/Category:Edge_Twist [3] http://www.thinkwiki.org/wiki/Installing_Ubuntu_12.10_on_Thinkpad_Twist
Removing the touch keyword, as this is really a problem with those particular models of laptop (Lenovo Twist and Yoga). The keyboard is disabled, but the touchpad isn't. The hardware designers must have been using a checklist instead of their common sense. The touchpad should get disabled when we receive the SW_TABLET event, which means that the computer is now in tablet mode. This still doesn't work in the kernel, so we'll have to wait to see how this pans out.
Does the kernel allow that now? You should be able to receive those events using evtest.
Just for the records, linux 4.16-rc1 brought in a lot of improvements under this point of view.
(In reply to mirh from comment #3) > Just for the records, linux 4.16-rc1 brought in a lot of improvements under > this point of view. Would be good if you could pinpoint changes that were made in this area, so as to make testing easier.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/platform/x86/intel-vbtn.c *Basically everything*. Also, if we really want to document it, libinput 1.8.901 landed some very important code too https://lists.freedesktop.org/archives/wayland-devel/2017-September/034913.html
ftw, if the touchpad is physically unreachable (or just pointless to do so because e.g. it's now pointing down) then yes, libinput will disable the touchpad. so IMO this bug can be closed.
The specific patch in question should be: https://lkml.org/lkml/2017/9/15/188 (or a later version). I am not entirely sure if this works on the ThinkPad Twist, but I believe it should. The consumer line from Lenovo is *not* supported by that patch. Either way, it is not a g-s-d issue. If you want, you can attach some more information here though, and we might be able to follow up. Specifically, please try a new kernel and use evtest/evemu-record to grab information from the "ThinkPad Extra Buttons" device and check that the SW_TABLET_MODE switch changes state.