I have checked other posts about randomly rotating screens, and screens that rotate after sleep. I have tried the following to no avail:
Lock screen rotation:
Problem persists.
Disable GNOME orientation plugin:
gsettings set org.gnome.settings-daemon.plugins.orientation active false
Problem persists.
Disable/Uninstall
iio-sensor-proxy
:sudo systemctl stop iio-sensor-proxy.service sudo systemctl disable iio-sensor-proxy.service sudo apt-get remove iio-sensor-proxy
Problem persists.
Every time I close the lid, the laptop wakes up sideways and I have to run:
xrandr -o normal
Is there a bug somewhere? Have I missed something?
How can I make xrandr -o normal
run every time the laptop wakes from suspend? Maybe a hackish solution, but it might work, right?
I don't know if what you describe is a bug, but you can run
xrandr -o normal
at wake-up from suspend by doing the following (based on this answer and the comment below it):Create a shell script named
xrandr_normal.sh
(you can use another name if you wish) that runs yourxrandr
command:Put the following inside:
Give execution rights to your script:
Create a service file that will run your script after suspend (you can use whatever name you wish for the service file):
Put the following inside:
Make sure to replace
YOUR_USERNAME
in the first line below[Service]
with your actual username and put the correct path to your script inExecStop
.Enable the service you created:
Start the service:
As the author of the answer that this one is based on suggests, you can check for errors if the service does not work after suspend with the following command:
I had the exact same issue. Manually switching the orientation of the screen to portrait (left or right) and then back to landscape in display settings seems to have fixed the issue.