5

currently I'm trying to disable the process which is responsible for handling the auto-screen rotation on my Lenovo Yoga 2 Pro, which is enabled by default.

So far I did some research on the packages iio-sensor-proxy and inotify-tools, but I couldn't figure out how to disable it.

Is it possible to just remove iio-sensor-proxy to achieve the desired behaviour?

Or would that affect any important process in a negative way and cause anomalies?

Where are the configuration files stored?

Thanks in advance!

1
  • 1
    This "feature" is pretty damn silly. Why would someone want to have this enabled by default I cannot figure out. Jan 5, 2018 at 0:27

2 Answers 2

7

I have since found a more practical way of disabling screen rotation, but it only works in the GNOME desktop environment and not in Unity.

In GNOME click on the top right menu. The button in between the one that opens the Settings menu and that locks your screen controls your screen rotation. Click the button to disable it.

This screenshot was taken from a similar question for Fedora:

Location of the screen rotation toggle in GNOME

This feature does not appear to be in Unity. A graphical tool that will at least help you with your screen rotation in Unity is called ScreenRotator.

6

On Ubuntu 16.10, I was able to disable automatic screen rotation with this train of thought:

  1. I confirmed that it was the iio-sensor-proxy service that was causing the screen to automatically rotate. Running systemctl stop iio-sensor-proxy stops screen rotation until next boot.
  2. The iio-sensor-proxy service is a static SystemD service for some reason and therefore cannot be disabled using systemctl disable iio-sensor-proxy, so you have to remove it to disable permanently. However, the scant documentation indicates that this service also controls the ambient light sensor and the compass, which I don't want to disable if I don't have to.
  3. Using the apt-file utility (which is not installed by default), I determined which files are installed for the package associated with this service, by running apt-file list iio-sensor-proxy. It appears to install a configuration file /lib/udev/rules.d/80-iio-sensor-proxy.rules - where udev is Ubuntu's hardware management subsystem. That seems to be the place to look.
  4. Notice that this file contains a line SUBSYSTEM=="input", ACTION=="add", TAG+="systemd", ENV{ID_INPUT_ACCELEROMETER}=="1", ENV{SYSTEMD_WANTS}+="iio-sensor-proxy.service". This appears to control the accelerometer that triggers the automatic rotation. Comment it out by putting a # in front of this line to prevent this service from reading the accelerometer.
  5. After a reboot, automatic screen rotation should be disabled while iio-sensor-proxy is still running.

Clearly there should be a GUI option for this, let alone a documented way of doing this, but there you go.

4
  • I can't get it to work so that I can try disable it :'(
    – steoiatsl
    May 24, 2017 at 14:12
  • @MinaMichael I don't understand - what is you can't get to work?
    – DCKing
    May 31, 2017 at 15:44
  • automatic screen rotation as a whole. nothing specific just saying
    – steoiatsl
    Jun 1, 2017 at 4:06
  • can confirm that this also works on linux mint! great answer.
    – Fed
    Dec 7, 2020 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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