Skip to content
Dec 14 / kkrizka

AutoRotate 0.3 Released

One missing piece in Linux tablet support is an easy way to automatically rotate the screen, based on either the orientation of the laptop or other parameters. I’ve tried to fix this by writing a simple daemon that uses the hdaps driver to check the orientation of the tablet and calculates the rotation. This new version contains a lot of improvements over the previous hack-job, in that it:

  • Can be controlled via dbus
  • Directly determines laptop vs tablet mode from hardware, and no longer depends on ACPI events
  • Much easier to install (using a deb from my PPA or a script)

The new version, 0.3, can be downloaded from here with installation instruction here (Ubuntu) and here. More up-to-date details can be found on the AutoRotate project page.

I’ve only tested it on my laptop, which is a ThinkPad X61T running Ubuntu Karmic Koala. But there is no reason why it shouldn’t work on other hardware that uses hdaps and other distributions.


Leave a comment
  1. jonas / Dec 21 2009

    Hey thanks a lot for this script!

    But i got a problem. When I try to start it this error occurs:

    Traceback (most recent call last):
    File “/usr/local/bin/”, line 50, in
    File “/usr/local/bin/”, line 40, in main
    busname = dbus.service.BusName(“net.krizka.autorotate”,system_bus);
    File “/usr/lib/pymodules/python2.6/dbus/”, line 129, in __new__
    retval = bus.request_name(name, name_flags)
    File “/usr/lib/pymodules/python2.6/dbus/”, line 306, in request_name
    ‘su’, (name, flags))
    File “/usr/lib/pymodules/python2.6/dbus/”, line 620, in call_blocking
    message, timeout)
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection “:1.148” is not allowed to own the service “net.krizka.autorotate” due to security policies in the configuration file

    Do u have an idea why?



    • Karol Krizka / Dec 21 2009

      Ack, that one is my fault. I’ve forgot to include a file that would allow autorotate to start a system bus.

      I will release a new version with it tonight.

      In the meantime, you need a file /etc/dbus-1/system.d/net.krizka.autorotate.conf with the contents:

Leave a comment