7

I'm running Ubuntu 16.04 on my laptop, and I have an external monitor connected via HDMI. Normally, my screen turns off after 10 minutes of inactivity or after I lock the screen. This sets off a series of events:

  1. The laptop screen turns off.
  2. The external monitor goes to sleep.
  3. Ubuntu seems to think the external monitor has been detached, and it refreshes the display.
  4. My laptop screen turns back on, in single display mode.
  5. The external monitor turns back on, and the display refreshes again to dual display mode.
  6. After a period of inactivity, repeat from #1.

This happens over and over again indefinitely, preventing both displays from ever turning off. Since I rely on this feature to automatically lock my computer after inactivity, it's also a security concern.

Is there any way to prevent this problem?

Brandon
  • 113
  • 1
    2 questions. 1) is this a new problem or has this worked on this computer+monitor before? 2) what kind of monitor is it? – Jeff Apr 20 '18 at 13:22
  • You can fix the security part of this by setting the computer to lock before the screen truns off instead of locking when the screen turns off. Look under All Settings>Brightness & Lock I don't think this will fix the screen problem though. – Jeff Apr 20 '18 at 13:33
  • 1
    What does xset dpms force off do? Leave a comment @Fabby with the results. – Fabby Apr 20 '18 at 14:07
  • 1
    @Jeff 1) I don't think this ever worked on this monitor. 2) It's an ASUS PB278Q, connected via HDMI. – Brandon Apr 23 '18 at 19:25
  • I have my Brightness & Lock set to all of Turn screen off when inactive for: 10 minutes, Lock: ON, and Lock screen after: 30 seconds. The screen lock seems to be completely ignored for me; it's tied to turning the screen off. – Brandon Apr 23 '18 at 19:27
  • @Fabby xset dpms force off turns off my laptop monitor, then the external monitor says "HDMI No Signal" and turns off. When I press a key, the laptop comes back on, but the other one stays off. I'm currently traveling and using a different monitor, though. – Brandon Apr 26 '18 at 17:10
  • In 20 hours the grace period ends and I think @WinEunuuchs2Unix is the best answer you'll get. – Fabby Apr 26 '18 at 18:41

2 Answers2

3

The easiest way is to lock your screen after inactivity but not turn the screen off.

As per this answer: How do I prevent my display from turning off when screen is locked?, use this command:

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

Your screen will still lock after inactivity but the password prompt will stay up and the screen won't turn off.

Not the perfect solution but hopefully one that addresses your security concerns without the annoying loop.

  • Thank you for addressing the security concern, but I would really like the screens to turn off, too. I just want them to turn off and stay off. – Brandon Apr 23 '18 at 19:22
  • 2
    In 18.04 Unity will take over external monitor from gnome which is buggy. I've encounter weird problems for years now. – WinEunuuchs2Unix Apr 23 '18 at 19:56
1

This problem was resolved when I upgraded to Ubuntu 18.04.

Brandon
  • 113