My screensaver does not turn on. It seems to get itself in this state within a day or two of rebooting, but it’s difficult to get reliable data on this.
In the past I could issue something like xset s 3 3, which would turn off the screen after 3 seconds, which might then be woken up shortly afterwards by whatever it was that was keeping awake. Now, xset s 3 3 has no observable effect whatsoever.
I have an XMonad keybinding for sleep 1 && xset dpms force off. This still works as a means to turn the screen off. Curiously, if I type the same in a shell, the screen turns off and turns back on again about a second later. However, if I type the same in the dmenu launder, the screen turns off and stays off.
Can you give me any hints about how to track down what is keeping the screen awake?
I’ve been using plain XMonad (that is to say without any fancy display managers, or any other framework) on various OSes since around 2009, and I’m just used to the screen going to sleep after a while. I’m not aware of anything in my configuration that configures it.
This is the only remotely relevant stuff that I can find in /etc/nixos/configuration.nix:
I was able to track down this bug only because I generally avoid Chrome yet use it on one computer for Reflex FRP development, and only that computer had the issue. The screensaver was blocked depending on what tabs were open. Even starting Chrome without opening any sites was enough to block my screensaver. I never load videos on that computer, so loading videos was not required to block the screensaver in my case.
I had the issue from late May until late August, but it has finally been resolved. I am now running 104.0.5112.101 (Official Build) (64-bit) without issue.
Given that and your post I take it you just mean your display blanking then. Screensavers are technically the little programs that do stuff like displaying a lock screen or a pretty animation. The display time out/blank/whatever is a separate thing, controlled by your display driver (can be Xorg, Wayland or the tty, all of which use dpms to do so).
Screen “savers” are so called because they prevent burn-in. Display blanking is a power management feature. They’re often conflated because the screensaver application often also takes it upon itself to configure the screen blank. But if you didn’t install e.g. xscreensaver, your config will be handled by xorg itself (and therefore xset dpms).
xset q ─╯
auto repeat: on key click percent: 0 LED mask: 00000000
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 660 repeat rate: 25
auto repeating keys: 00ffffffdffffbbf
bell percent: 50 bell pitch: 400 bell duration: 100
acceleration: 2/1 threshold: 4
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 3
default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
DPMS (Energy Star):
Standby: 3 Suspend: 3 Off: 3
DPMS is Enabled
Monitor is On