Comment 7 for bug 217182

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

I have recently purchased a Lenovo Thinkpad X61-Tablet (1400x1050 tablet/display). It's running Ubuntu Intrepid Ibex, with the Gnome desktop environment.

I've got automatic screen rotation working, using bits and pieces of code found searching the net, and some I wrote myself based on what I learned. I'm in the process of cleaning it up and squaring it away into an installable .deb package. I expect to have it ready within a week.

So far, there's a daemon that connects to the display and registers to receive screen rotation events. When it gets woken up by one, if the rotation is different from the last time, it calls a shell script with a single argument, the new rotation. The script is responsible for remapping the arrow-pad directions, and rotating the Wacom tablet to match the screen.

I've also created a script for /etc/pm/sleep.d that calls that same hook when the tablet wakes up from suspend or hibernate, since I've had problems with the wacom driver surviving that. It worked before the upgrade, now it's got the wrong bounding area after the resume unless I run 'xsetwacom' commands to reset it.

There's a set of event definitions for acp-support that have the acpid call a handler script that sets the screen orientation (via a call to the 'xrandr' command line tool) when the screen is swiveled down to tablet mode or up to laptop mode. Once 'xrandr' is done and the X Server changes rotation, the rotated wakes up and does it's job.

What remains is to support changing mode at the gdm login screen, and to see about having the Gnome session start up in the correct orientation. When the screen is turned 'right', for tablet mode operation, at the gdm login screen, the user's gnome session starts up in 'normal' orientation. I think this means that the rotation is being set by the 'gnome' system when instead it should be using the rotation the display is already set at, or... that the user's gnome settings need to be updated to reflect the desired rotation setting?

I'm using Bazaar for version control, and will open a PPA for it when it's ready for that. In the meantime, if anyone wants a copy and/or wants to help develop this thing, please contact me off-list.

<email address hidden>