11

I have an HP Envy notebook, not a touch device/tablet so it should not adjust screen orientation to suit how I hold the device. However, the orientation seems to randomly and spontaneously change, both when I am using the device, and while it wakes from suspend. There is no pattern to which orientation it switches to; sometimes it rotates, sometimes it flips.

xrandr -o normal

correctly re-orientates the screen, but it would obviously be nice if I did not have to keep doing this.

  • it should not adjust screen orientation but the manufacturer disagrees otherwise they wouldn't have included the sensor that makes it happen. It should be possible to disable in BIOS/UEFI. –  Jan 21 '17 at 16:34
  • @user589808 the sensor is for detecting when the laptop is falling and stopping the hard drive, not for changing screen orientation. – dericke Nov 10 '18 at 21:00

2 Answers2

17

You can lock the rotation of the screen using the second icon in the top-right menu. The icon looks similar to the icon used for screen rotation in mobile OSes like Android.

In order to disable the functionality permanently (desirable if you do not have a touchscreen :-) ), you can do that by setting dconf-key active in org.gnome.settings-daemon.plugins.orientation to false using either gsettings (CLI) or dconf-editor (GUI).

gsettings set org.gnome.settings-daemon.plugins.orientation active false

In later versions

gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true

After logging out and in again, the the button should no longer be there and your screen's orientation should stay as it is.

Rondom
  • 271
  • 1
    This doesn't work in Ubuntu 17.10 (using gsetting). Do you know the way to disable the plugin? – user502144 Nov 03 '17 at 03:23
  • 2
    org.gnome.settings-daemon.peripherals.touchscreen orientation-lock false – Rondom Nov 03 '17 at 12:11
  • 1
    It just turns orientation lock on/off, but doesn't disable the plugin. This is built-in functionality now, but not a plugin anymore, isn't it? – user502144 Nov 04 '17 at 08:08
  • 2
    Looks like it. Really need a way to turn this off because after the screen has tilted, it will only flip between the two portrait modes, but will not get back into landscape. – retorquere Nov 09 '17 at 07:03
  • Is there any keyboard shortcut that permits one to reorient the screen quickly when this arrives? When the screen is upside down, it is hard to get into applications, settings and terminals. – Hans Deragon Oct 21 '18 at 14:52
0

The easiest way is using dconf-editor, going to:

/org/gnome/settings-daemon/peripherals/touchscreen/orientation-lock

Disable "Use default value" and set "TRUE" as custom value.