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?

closed as off-topic by Eric Carvalho, waltinator, Kevin Bowen, Melebius, guiverc Aug 9 '18 at 0:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced, that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – Eric Carvalho, waltinator, Kevin Bowen, Melebius, guiverc
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 Mintern 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 Mintern Apr 23 '18 at 19:27

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 Mintern Apr 23 '18 at 19:22
  • 1
    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

This problem was resolved when I upgraded to Ubuntu 18.04.

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