Recently updated to Ubuntu 18.04 from Ubuntu 16.
I am regularly observing that my screen is automatically rotating from landscape to portrait mode. I am frequently observing this issue.
If you are using an HP Pavilion then please subscribe to this bug.
Otherwise, please open a new bug by running:
ubuntu-bug gnome-shell
This site is not meant for discussing bugs.