Prevent Ubuntu 18.04 Desktop from Rotating

So I just installed Ubuntu 18.04 on my school laptop (HP Probook 450 G5) and for some reason it would automatically rotate the screen 90 degrees left. I tried adding a startup program with the command

xrandr -o normal

But it didn’t help. It only fixed it if I ran the command manually still the login screen was rotated. Well I found a solution.

sudo systemctl stop iio-sensor-proxy.service
sudo apt-get remove iio-sensor-proxy

This works great and I haven’t had an issue since. Thanks
dkrishna

Source: https://www.programsbuzz.com/article/screen-rotation-issue-ubuntu-1804-lts-system-restart