After upgrading to 18.04 my screen suddendly switched upside down, since my Laptop apparently has a rotation sensor. I temporarily fixed it with xrandr -o normal
and disabled the gnome rotation sensor, because I could not fix the problem by physically holding my laptop upside down.
The problem is, that the rotation switches back to inverted with every restart.
I tried to write a script, which executes the xrandr command with every restart and added a xrandr --output eDP-1 --rotate normal
in the gdm3 file, but none of that works.
Is there any way to set the default orientation back to normal or write a working script, which fixes the problem at a restart (including stand-by).
You can use
xrandr -o normal
from the command prompt and it will fix it.Remove the iio-sensor-proxy which is what triggers the orientation changes to happen.
sudo apt-get remove --purge iio-sensor-proxy
Restart your computer
Go into "Settings > Displays" (gnome-control-center). Change the "Orientation" setting for your monitor to landscape.
Restart again to ensure that orientation is correct
Why this works is that even after you disable the orientation changes, gnome holds onto a previous orientation that was active and treats it as a sort of default even though it is no longer actively using the sensor to determine orientation. By manually changing the orientation, you are resetting the default.
I had been facing with this problem so I searched for the solution and found this. But unfortunately, I didn't found the solution from here but I found it by myself. Let me share my solution.
The problem is solved.