Comment 34 for bug 1366421

Revision history for this message
marmuta (marmuta) wrote :

Also I skimmed through some of the kernel 4.9 sources but haven't found anything potentially useful yet.
intel-vbtn.c really seems to handle power buttons only.
acpi/button.c which creates the "Lid Switch" evdev appears to only handle lid switches with two positions, open and closed, for laptops presumably.
drivers/platform/x86/ideapad-laptop.c references the Yoga 2 and exposes a number of sensors, but AFAICT nothing concerning detection of tablet-mode.

@RussianNeuroMancer https://wiki.gnome.org/Design/OS/Touchscreen talks about detecting keyboard devices to detect the mode. Do we know that this is sufficient? Could you too check if the list of devices changes between tablet and laptop-mode?
$ sudo evtest
$ xinput