Comment 38 for bug 1366421

Revision history for this message
marmuta (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

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.

From the source:
 TP_HKEY_EV_TABLET_TABLET = 0x5009, /* tablet swivel up */
 TP_HKEY_EV_TABLET_NOTEBOOK = 0x500a, /* tablet swivel down */