I recently upgraded my Lenovo Ideapad Miix 510 from 16.04 to 18.04 and was pleasantly surprised to find that my previously nonfunctional screen autorotation started working with the upgrade. Unfortunately, the autorotation is always 90 degrees counterclockwise relative to the actual orientation of the tablet unless I lock the rotation. Also if I reorient the tablet too frequently without locking the screen rotation, the screen goes solid grey and the whole system hangs.

Settings -> Displays does not have an Orientation or Rotation section, presumably because of autorotation. Using xrandr with -o or --rotate yields

Invalid MIT-MAGIC-COOKIE-1 keyCan't open display :0

Is there a way to leave autorotation enabled, but tell Ubuntu to always present the screen 90 degrees clockwise from what it thinks the orientation should be?

2 Answers 2


I just run a MIIX 510 myself. They’re a great little Surface Pro like device that works fairly well under Ubuntu 18.04.

I’ve managed to sort out Screen Rotation under Ubuntu. Out of the box my display is rotated 90 degrees clockwise, but it can be fixed by mapping the sensor data. Apparently the Hardware Accelerometer data needs to be translated for the screen rotation to work well.

Details for a complete and more accurate match for the MIIX 510 Hardware Accelerometer mapping that is needed can be found here: https://npm.pkg.github.com/systemd/systemd/blob/master/hwdb/60-sensor.hwdb

The following steps will map the data correctly for MIIX 510 screen rotation under Ubuntu 18.04:

1) Install iio-sensor-proxy if you've removed it

2) Fix the issue by hacking a sensor match and and mapping by creating the file with the following file /etc/udev/hwdb.d/60-sensor.hwdb with this content:

  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1

3) Run the command:

sudo systemd-hwdb update

4) Reboot

  • That worked, thank you! Did you ever get the webcams to work?
    – Alie T
    Jul 17, 2019 at 0:10

Occasionally see this question.

A fix from me has been merged into systemd and this issue should be fix on systemd>=240


  • Thanks so much for responding, I'd given up hope! Is there anything particular I need to do to make this work, or just wait for the next update push?
    – Alie T
    Feb 20, 2019 at 20:30
  • If your systemd version is greater than 240, so Miix510 should works out of box. Else you need to see github.com/systemd/systemd/blob/master/hwdb/60-sensor.hwdb this file, and import miix510 configs to your device configuation. Jul 8, 2019 at 8:43
  • By the way, miix510 serie has multiple product. sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:* will match miix510-12ISK . If you are not this product, the string will be different. Jul 8, 2019 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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