-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Sun, 2016-12-11 at 00:37 +0000, marmuta wrote: > Came across SW_TABLET_MODE in the kernel. There are a bunch of drivers that > send this, one of them thinkpad_acpi.c. Are you by chance able to load that > kernel module (according to the documentation probably not)?  > $ sudo modprobe thinkpad_acpi > Wow. I wasn't aware they added support for Lenovo Yogas into this driver. Initially (maybe more than a year ago), this driver wouldn't have any effect on Yoga. Now its different. [ 9988.198752] Non-volatile memory driver v1.3 [ 9988.201892] thinkpad_acpi: ThinkPad ACPI Extras v0.25 [ 9988.201894] thinkpad_acpi: http://ibm-acpi.sf.net/ [ 9988.201895] thinkpad_acpi: ThinkPad BIOS 96CN31WW(V1.17), EC unknown [ 9988.201897] thinkpad_acpi: Lenovo Lenovo Yoga 2 13, model 20344 [ 9988.281520] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one [ 9988.281759] thinkpad_acpi: Console audio control enabled, mode: monitor (read only) [ 9988.282273] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input18 2016-12-11 / 16:05:39 ♒♒♒  ☺   > This creates a flag in  > /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode > that could be queried, and also sends sysfs events (for udev I guess) and > hotkey events through evdev when the mode changes. > That isn't available. So I got you the following. rrs@learner:~/rrs-home/Community/linux-upstream_GIT (broken-mmc)$ tree /sys/devices/platform/thinkpad_acpi/ /sys/devices/platform/thinkpad_acpi/ ├── cmos_command ├── driver -> ../../../bus/platform/drivers/thinkpad_acpi ├── driver_override ├── input │   └── input19 │       ├── capabilities │       │   ├── abs │       │   ├── ev │       │   ├── ff │       │   ├── key │       │   ├── led │       │   ├── msc │       │   ├── rel │       │   ├── snd │       │   └── sw │       ├── device -> ../../../thinkpad_acpi │       ├── event16 │       │   ├── dev │       │   ├── device -> ../../input19 │       │   ├── power │       │   │   ├── async │       │   │   ├── autosuspend_delay_ms │       │   │   ├── control │       │   │   ├── runtime_active_kids │       │   │   ├── runtime_active_time │       │   │   ├── runtime_enabled │       │   │   ├── runtime_status │       │   │   ├── runtime_suspended_time │       │   │   └── runtime_usage │       │   ├── subsystem -> ../../../../../../class/input │       │   └── uevent │       ├── id │       │   ├── bustype │       │   ├── product │       │   ├── vendor │       │   └── version │       ├── modalias │       ├── name │       ├── phys │       ├── power │       │   ├── async │       │   ├── autosuspend_delay_ms │       │   ├── control │       │   ├── runtime_active_kids │       │   ├── runtime_active_time │       │   ├── runtime_enabled │       │   ├── runtime_status │       │   ├── runtime_suspended_time │       │   └── runtime_usage │       ├── properties │       ├── subsystem -> ../../../../../class/input │       ├── uevent │       └── uniq ├── modalias ├── power │   ├── async │   ├── autosuspend_delay_ms │   ├── control │   ├── runtime_active_kids │   ├── runtime_active_time │   ├── runtime_enabled │   ├── runtime_status │   ├── runtime_suspended_time │   └── runtime_usage ├── sound │   └── card29 │       ├── controlC29 │       │   ├── dev │       │   ├── device -> ../../card29 │       │   ├── power │       │   │   ├── async │       │   │   ├── autosuspend_delay_ms │       │   │   ├── control │       │   │   ├── runtime_active_kids │       │   │   ├── runtime_active_time │       │   │   ├── runtime_enabled │       │   │   ├── runtime_status │       │   │   ├── runtime_suspended_time │       │   │   └── runtime_usage │       │   ├── subsystem -> ../../../../../../class/sound │       │   └── uevent │       ├── device -> ../../../thinkpad_acpi │       ├── id │       ├── number │       ├── power │       │   ├── async │       │   ├── autosuspend_delay_ms │       │   ├── control │       │   ├── runtime_active_kids │       │   ├── runtime_active_time │       │   ├── runtime_enabled │       │   ├── runtime_status │       │   ├── runtime_suspended_time │       │   └── runtime_usage │       ├── subsystem -> ../../../../../class/sound │       └── uevent ├── subsystem -> ../../../bus/platform └── uevent 23 directories, 75 files 2016-12-11 / 16:13:43 ♒♒♒  ☺   rrs@learner:~/rrs-home/Community/linux-upstream_GIT (broken-mmc)$ for item in  /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/*; do echo $item; cat $item; done /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/abs 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/ev 1 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/ff 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/key 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/led 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/msc 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/rel 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/snd 0 /sys/devices/platform/thinkpad_acpi/input/input19/capabilities/sw 0 2016-12-11 / 16:14:51 ♒♒♒  ☺   rrs@learner:~/rrs-home/Community/linux-upstream_GIT (broken-mmc)$ cat /proc/acpi/button/lid/LID0/state  state:      open 2016-12-11 / 16:10:08 ♒♒♒  ☺   But the touchscreen is lost now, so I can't give you what the status is in tablet mode. Let me figure out if the touchscreen loss was because of the thinkpad_acpi driver. xinput looks okay, even after touchscreen loss. rrs@learner:~/rrs-home/Community/linux-upstream_GIT (broken-mmc)$ xinput list⎡ Virtual core pointer                     id=2 [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer               id=4 [slave  pointe r  (2)] ⎜   ↳ ELAN Touchscreen                         id=9 [slave  pointe r  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad               id=13 [slave  point er  (2)] ⎣ Virtual core keyboard                    id=3 [master keyboard (2)]     ↳ Virtual core XTEST keyboard              id=5 [slave  keyboa rd (3)]     ↳ Power Button                             id=6 [slave  keyboa rd (3)]     ↳ Video Bus                                id=7 [slave  keyboa rd (3)]     ↳ Power Button                             id=8 [slave  keyboa rd (3)]     ↳ Lenovo EasyCamera                        id=10 [slave  keybo ard (3)]     ↳ Ideapad extra buttons                    id=11 [slave  keybo ard (3)]     ↳ AT Translated Set 2 keyboard             id=12 [slave  keybo ard (3)] 2016-12-11 / 16:11:25 ♒♒♒  ☺   > > From the source: > > TP_HKEY_EV_TABLET_TABLET = 0x5009, /* tablet swivel up */ > TP_HKEY_EV_TABLET_NOTEBOOK = 0x500a, /* tablet swivel down */ > So though the driver (thinkpad_acpi) loaded, it still doesn't seem to be meant for Yoga series. - -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhNLvcACgkQpjpYo/Lh dWmoOxAAtV7zGtRZ92BZ9nI2E9RFUSiOJV4CDrPhoJL7mGPvFQ8g76rU3AsqjL2n mVEAnlj51iAFsVoy+0wCOM8qOzb2wR1HUpK2tLo4U6ErloaeH1SLGa8FSXW0nD9o t+CdAh32TIfGQ3snTHAX1QllI2cLyj2tGzVF4gOSfJPI0/58eFKxZ5uGL4/b6OiV 2TBnH1aXkS9WlHcYNonHBfD8NHR39VodJbUnbvDesX8P83NthwlpX4TUu9t5Jkd3 ElENjVUKoM4CM0e6NUoklqjQgrjEJNktLujlIkO/+N2L1THc6YkRicODKxyisCpV 2coS6tsKqpXpZNL3jLXCsq6i5lN8jIBjA40dSkxiImOOVM97qpPbPsgsDLBfAY/z WYc27AluUjN5Kct8xbpGARr0VkUs9SuH7P0Kij1QJ8ktGta/etCIfd/kuQo8o3CU t/Ph360CdD22ZTxX63YfwBDQGDA00JPyLotIW152Ttvpk/eWmpQ70y2FccfULhZv nLZT+yBd0mWJBKEUervwwlJgdCFsA81V71qmW6gnvKW2WCO+6anqbIcVth84qaBd OM27JSSoUV6eHhxPppGErloAvWliOtYQCgIML1o2xnTfUGNQYaxP6IXcoUXTcHGo agtyhTVAct4zh3jZwBwKJoL+Q36WqLVdvkhDYFzviS1yiIjh7Lw= =1DzC -----END PGP SIGNATURE-----