Created attachment 54547 [details] [review] Patch, add tablet-display-is-[present|rotated] The tablet rotation status is reported by the linux kernel through SW_TABLET_MODE events from an input device, and upower does already listen to other SW_* events from input devices, so I'm attaching a patch that adds the ::tablet-display-is-present and ::tablet-display-is-rotated boolean properties. This patch has been tested on an HP Touchsmart TX2 and a Lenovo X220t, both tablet laptops.
My first reaction would be that this has nothing to do in upower. The fact that the device is a "tablet display" should already be exported through other means (libwacom if using the wacom driver for example). If it's not possibel to give more details than that, it's actually pretty useless (how does one know how to associate the XRandR output with the device for example? The orientation itself could be exported through a udev property, similarly to this: http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=src/extras/accelerometer/accelerometer.c;hb=HEAD#l234 And the input device sending a kevent when it actually changes.
Please, look at my comment to #3421: https://bugs.freedesktop.org/show_bug.cgi?id=3421#c5 The mentioned tool is also capable to rotate the screen based on data from a gravisensor (accelerometer).
I mentioned on linux-input that it would be nicer to have: - a uevent in the device driver when the state changes - a property in udev keeping the current state The user-space code (gnome-settings-daemon) can then do the work to associate the the display with its state, and do the right thing.
Closing as per comment 3.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.