41

I have an HP Pavilion 14 inch laptop.

I recently upgraded from Ubuntu 17.04 to 17.10.

Everything went well, but when I boot up the system, my screen rotation was set to left.

Then I tried using xandr to rotate my screen, but my every effort failed.

Can anybody help me on the same?

4

9 Answers 9

40

Had the same issue. Seems like a bug. I disabled the screen rotation from task bar(top right) and it went to landscape mode. Just check if this works for you. Also, xrandr does not work on Wayland.

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

Additionally, the below command ought to disable the orientation plugin completely.

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

Also, gnome provides an option to rotate the screen from Settings -> Devices -> Displays -> Orientation setting (search for displays in 'Activities').

6
  • xrandr won't work on wayland.
    – Legolas
    Oct 23, 2017 at 17:44
  • 1
    My screen always remains in the left rotation and thus disabling the screen rotation from task bar won't be of any help. What I need as of now is to first (if possible) rotate my screen to normal state and then disable/lock the screen rotation option from the task bar (or completely disable from the gsettings command which Legolas provided.)
    – tushar
    Oct 24, 2017 at 13:27
  • 1
    Thanks but in my settings, there is no option for Orientation. I went to display tab but it has only two option - resolution and nigh mode. Also it seems that the the OS thinks that I have a tablet because there is a Waycom Tablet option in settings->device.
    – tushar
    Oct 24, 2017 at 15:31
  • 1
    Did you try running the first command i mentioned in the answer gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true Wacom tablet is another input device altogether (everyone gets that option in settings, just like mouse and keyboard ).
    – Legolas
    Oct 24, 2017 at 15:46
  • 1
    Finally, it worked. Thanks a lot, Legolas and the community.
    – tushar
    Oct 25, 2017 at 15:53
37

One of the easiest way that I found to fix this problem on Ubuntu 17.10:

enter image description here

2
  • 1
    As much as I like typing commands in the terminal, I must admit that buttons are pretty great!
    – Joelbitar
    Jan 9, 2018 at 20:15
  • The UI is amazing! Isn't it? Now users can have the option to stick with command-based or explore via UI :) Jan 26, 2018 at 7:06
14

Solution: If you're stuck, here's a solution that worked on a 2012 HP Envy 14":

sudo apt-get remove iio-sensor-proxy (UbuntuForums Source)

Then log out and log back in.

Caveat: orientation lock icon is gone from the menu bar and you can't use the gyroscope (if it even exists in your device) to change orientation but that's not a problem since you don't want orientation changes anyway :). If you ever want to re-enable the feature, reverse the process:

sudo apt-get install iio-sensor-proxy

Observations: The HP Envy did not respond to the gsettings changes suggested here. It also did not respond to physically rotating the laptop or tilting the screen. Orientation settings were also missing from the settings application.

For some reason the auto-rotate code gets triggered after it's been asleep and it's impossible to get it to return to normal without CLI intervention.

The laptop does not recognize orientation changes or tilting the lid so I'm not sure why the orientation (rotation) automatically changed in the first place.

3
  • 1
    Same results and solution worked for HP Elitebook 8440p
    – bakoyaro
    Mar 8, 2018 at 18:55
  • Solves my problem on HP Pavilion 14-ce (Ubuntu 18.10), thanks!
    – Jerry Hu
    Jul 16, 2019 at 1:06
  • 1
    Best answer. The other answers are not permanent or not for all users.
    – Giszmo
    Sep 29, 2019 at 0:56
4

Weirdly, I noted my screen changed orientation when I plugged in my DS4 (PS4) controller while Steam was running. The gyro in the controller flipped my screen. I had to turn the controller on its head to get the proper screen orientation and then locked the orientation via task bar icon.

This is not going to be a solution for everyone, but it solved my issue.

3

I am having the same issue on a HP pavilion 15 touchscreen (skylake).

There is no Orientation under Display!

While turning the laptop upside down and setting the orientation-lock true I got it back on track and it seems to stay there.

2

I just got this issue fixed. This is an option provided in ubuntu 17.10. You tilt the laptop/screen towards or away from you- the display will rotate. If you have accidentally rotated it, just tilt the laptop screen (physically) away or towards you to see the screen change. You can also tilt it sideways- and it will orient the display in another direction. You can permanently disable this feature by following the answer and the screenshot shown above by "hotheadhacker".

3
1

On a Lenovo Miix 310 none of the Gnome settings changes made a permanent difference. After reboot, the screen would always be rotated 90 degrees to the left (in portrait mode).

What solved it for me was changing the 'accelerometer mounting matrix'.

This can be done by creating a file /etc/udev/hwdb.d/61-sensor-local.hwdb

With this content:

sensor:modalias:acpi:*KIOX000A*:dmi:*svn*LENOVO:*pn*80SG*
 ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1

After reboot your screen rotation should be fine.

Note: this is specific to the Miix 310. For other devices you'd need a different identifier and likely a different matrix.

More information: https://github.com/hadess/iio-sensor-proxy#accelerometer-orientation

1
  • The above should not be necessary anymore if you have a systemd version in which this commit appears. That will likely be 239.
    – smhg
    Jun 10, 2018 at 15:12
0

Workaround:

I had a similar experience with an HP-ProBook-450-G2 running Ubuntu 17.10. After restart or reboot the desktop was rotated 90* to the left. I was able to fix this temporarily by rotating the laptop upside down and then running the script to lock orientation. However I found a more stable workaround solution which has done the job for now.

In the end I followed these steps to resolve the issue:

1a. Rotated the laptop

1b. ran: 'gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true'

Outcome: Didn't fix the problem after reboot

  1. ran: 'gsettings set org.gnome.settings-daemon.plugins.orientation active false'

Outcome: Didn't fix the problem after reboot

  1. Restarted the computer and booted into an Xorg rather than Wayland session following these instructions:

https://itsfoss.com/switch-xorg-wayland/

Outcome: The screen was the correct orientation after login.

Hope this helps others!

0

Observed the same problem, and it seems I found the reason for it. Like mobiles, a change in orientation of screen is detected by laptop and accordingly it rotates the screen. Like someone above suggested, after disabling rotation, it didn't rotate!

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .