Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows, screen orientation of my ThinkPad W520 can automatically change if I rotate the computer to hold it like a book. Is it possible to detect computer orientation on Linux?

share|improve this question

I finally found the solution. The driver for the accelerometer of the ThinkPad is in package tp-smapi-dkms. Then I must load the hdaps module. The position can now be accessed in /sys/devices/platform/hdaps/position.

share|improve this answer

Don't know if it can rotate automatically, but you can always change your orientation by editing it in your display settings. Just type display in the dash and click in dislay icon

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.