Upgraded to Ubuntu 18.04 LTS, lately having weird display issues with my HP laptop Where in my display flashes and turns upside down.

How to fix this issue?


4 Answers 4


Your laptop has an gyroscope chip in it and it thinks the level is changing. In 18.04 turn off auto rotation with the little icon next to the system menu in the upper right corner.

Here is a screen shot

  • 2
    Is there anyway to calibrate it so that when its suppose to be up words it remains there and when it needs to be otherwise, it does that too? Sep 28, 2018 at 18:42
xrandr --output {OUTPUT} --rotate normal

To find out your OUTPUT

xrandr -q


xrandr --output eDP-1 --rotate normal


As described by @user847668 in his answer that you can turn off rotation for fixing it permanently.

Turn Off Auto Rotation

  • From Top right menu
  • Or SuperKey+o
  • This works, but seems to need to be executed every session, and multiple times per session. Is there any permanent fix?
    – wckronholm
    May 17, 2018 at 22:20
  • 1
    Yes, works but only for sometime and then after it blinks and turns. Observed that when connected to the external monitor it works fine though. Waiting for a permanent fix. May 31, 2018 at 0:30

You could blacklist the kernel module for accelerometer of your HP laptop:

sudo nano /etc/modprobe.d/blacklist.conf

and add the following line in blacklist.conf, create file if it doesn't exist:

blacklist hp_accel

Of course, the module name for your laptop could be different. You can list all loaded kernel modules with:


In case if you have an SSD, this module is no longer needed. If you have HDD, the module is needed to protect your HDD from sudden fall.


I have an HP 8570W laptop. Same issue as you. When it prompts for me to click on my login name, the screen is right side up to start.

And before I click on my name, I even go to the upper right corner, and I click on the down-arrow to the right of the battery and click to lock the screen. Then I enter my password and it turns upside down within one second maybe two. I tried to win the race to go up again near the battery icon and set it to lock again, but it always beats me to the punch. Not that I have great hope that that would have worked anyway. Some posts of a few months ago suggest to use the ctrl-alt arrow keys to adjust the rotation manually, but as with some commenters on that tip, trying that also fails for me.

I reboot and do not use the down-arrow-lock attempt this time. I physically turn the whole laptop around on the right side, and the screen auto-rotates! That works - but it's upside down. Sorry -false alarm.

I physically turn the whole laptop around on its right side, and the screen auto-rotates, but again, it is upside down.

I turn the laptop so the screen is upside down, and the screen auto-rotates to upside-down (per my view, but it is actually right side up per the normal orientation of the laptop). Then I can play a game with my hand-eye coordination and navigate once more to the down arrow by the batter icon and lock the orientation.

Finally, I physically return the laptop to the 'normal' position, and the screen is now in 'normal' orientation.

Not sure if I ever want to power off this laptop -- not sure if I will have to do this every time. I would look funny if I had to do this while taking a bar exam or something, that's for sure.

Hope this helps!

Not the answer you're looking for? Browse other questions tagged or ask your own question.