Years ago, probably on 16.04, I was able to turn the display off via xset dpms force off
(and a small sleep
before).
In the last years, I think since 18.04, that doesn't work anymore. The display itself goes to sleep, however, it wakes up after a few seconds.
For general information, when I lock the screen (which, in this case, I don't want to), it goes to sleep stably after a certain time.
What's happening? Is there any way to send the display to sleep via commandline (without locking)?
The issue is caused by the screensaver.
In cases where the screensaver is not needed (but only the screen locking functionality), inhibiting it will solve the problem, for example:
A wait cycle is needed to make sure that mate-screensaver executes. It's not clear to me however, why pgrep finds
mate-screensave
, but notmate-screensaver
.