On my HP Probook (non-touch screen) the display will randomly rotate. It does this on its own even when I'm not using it. Any suggestions on what it could be?
It's because of the accelerometer that HP puts in their laptops. Disable it and you'll be fine.
I am not familiar why but some people say that there is some sensor which do that. I manage to fix it using this line in terminal:
sudo mv /lib/systemd/system/iio-sensor-proxy.service /lib/systemd/system/iio-sensor-proxy.service_disabled