6

I see several questions on how to stop the screen from blanking, but I have the opposite problem.

Ubuntu 20.10 (but it's been an issue for over a year), i3wm, many firefox tabs with (among other things) non-running youtube tabs, embedded youtube links, podcast players, etc. smplayer, terminal, KeePassXC, and other normal ubuntu-as-desktop applications.

Normally, the screen blanks when no video/audio is playing after 10 minutes, which is the intended behaviour, but often it doesn't. I don't know why, and I don't know what to look for to find out. Annoying when I go to sleep and there are two bright monitors.

Is there something that I can run that will tell me what processes are holding the "keep monitor on" flag?

rtaft
  • 1,825
Mycroft
  • 171
  • 1
    I have the same problem, and would love to have a solution. This being Linux, it seems like there must be a way to find out what process is preventing the screensaver from activating. – Quentin Skousen Sep 22 '21 at 16:13

1 Answers1

0

If you are using KDE, then open /var/log/syslog and search for "DPMS". You can use grep or a GUI tool such as klogg. You will see many entries that explain why DPMS has been 'inhibited'. I believe that means the monitor has been prevented from turning off. That is all I know, but maybe it's enough for you.

I discovered this because of a Steam issue that prevents monitors turning off.

Matthew
  • 515
  • 2
    I don't see DPMS in any logs. When I tail syslog, or monitor journalctl, then open netflix in chrome and start watching something, nothing is output to either log even though netflix is now blocking the screensaver from coming on. My issue was steam, but I only figured that out by turning off processes one at a time to see which was the offender. – rtaft Jan 16 '22 at 19:35
  • @rtaft Hmm. Doing some more digging, it seems that the inhibition logs I see (e.g. https://i.imgur.com/mTsYmt8.png) are specific to KDE. If you're using Gnome, it probably doesn't show them. But if you run sudo systemd-inhibit --list (https://manpages.ubuntu.com/manpages/focal/en/man1/systemd-inhibit.1.html) you should get a list of services that could block sleep. Obviously blocking sleep ≠ blocking screensaver, and it's a status report not a log, but maybe you could set up a script or cronjob to use it as a 'poor man's log'? – Matthew Jan 16 '22 at 20:14
  • That command does indicate user session inhibited when using Netflix but it's tied to cinnamon-session for me. However, starting TF2, the inhibit line does not appear (I'm fairly certain that blocks the screensaver as well but I'd need to test it). – rtaft Jan 16 '22 at 22:04