How to turn off screen rotation in Ubuntu 18.04 LTS?

In Ubuntu 17.04 there was 'Rotation' menu in Display tab. But now in new version of Ubuntu, there's still a Display tab but no more rotation menu. Now I can't turn that off again since I upgraded to 18.04 LTS.


Solution 1:

The best solution I have found so far is to use the icon that is available in the top right corner of the screen, when you click on the down arrow. The icon is the one in red in the screenshot below:

screenshot with the icon

It might also look like this:

screenshot with the icon on 19.3

Solution 2:

If you want to remove this feature then fire below commands :

Try this command to stop and disable

$ sudo systemctl stop iio-sensor-proxy.service
$ sudo systemctl disable iio-sensor-proxy.service

Try this command to remove

$ sudo apt-get remove iio-sensor-proxy

Solution 3:

gsettings set org.gnome.settings-daemon.plugins.orientation active false

The above just worked for me. Seems the simplest solution

Solution 4:

You may use the keyboard combination Super+O to toggle the rotation lock ON/OFF as described in @Sylvain's answer.

screenshot with the icon

Note that Super is usually the key with Windows logo.