Comment 15 for bug 159026

Revision history for this message
Florian Hackenberger (f-hackenberger) wrote : Re: Lenovo Thinkpad x41 Tablet and X60 Tablet rotate events

Everything but the
* vertically rotating the laptop itself
action trigger ACPI events / xserver key events.

The laptop contains an accelerometer sensor which can be read by user space software (the rotate_daemon). The daemon has to read the sensors continously to detect a physical rotation over a certain treshold. As soon as the 'action' is detected, it rotates the screen.

All the other actions generate ACPI events or xserver key events. While ACPI event could in theory be read by the daemon, the acpid is usually responsible for doing that. But the acpid cannot read from the accelerometer sensors, therefore something else needs to do that. Furthermore, reading from the sensors can be computationally expensive if the update interval is high (this value is set in the kernel module), therefore it is a good idea to disable the daemon while being in laptop mode. While killing the daemon is one option, it could simply be 'suspended' with a USR1 signal for example.

Also note that the implementation I proposed was written in about two hours and is certainly far from ideal. Borrowing code / ideas from other distributions is probably a good idea.

Cheers,
          Florian