If your Windows device is equipped with gyroscope sensors and an accelerometer, Windows can rotate the screen into portrait or landscape mode depending on the content you are viewing.
This seems like a useful feature at first, but in reality it can often cause problems. Not all the content you view is designed for this purpose. Automatic screen rotation is common for large screen devices such as phones and laptops and tablets.
Automatically rotate screen in Windows
Disable automatic screen rotation in Windows via settings
Right-click on the Windows start button. Click on Settings in the menu. In the Windows settings click on System.
Click on Display on the left. In the “Scale and Layout” settings, adjust the “Screen Orientation” to “Off”.
Disable automatic screen rotation in Windows via the Windows registry
Right-click on the Windows start button. Click Run in the menu. In the Run window type: regedit.exe.
In Windows registry editor open the following folder structure:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation
Here you will see a DWORD value called Enable. Right-click on it and select Modify. Change the bit value from 1 to 0 and click Ok to save the changes.
Close the Registry Editor and restart your PC for the changes to take effect. If you want to undo this process, go to the same DWORD value and reset the value data to 1.
I hope this helped you. Thank you for reading!