Can't stop suspend

Hi–I posted this to UM Community forums also; I have Mate 22.04. My problem is that I tried many things to get the display from going blank (a trouble when I’m playing a game)–installing Caffeine, Power Manager settings in Startup Programs, BIOS settings. I was hoping someone could help because I’m out of ideas–

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout '0' && gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout '0'
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Stop Screen Blanking
Please try this:

xset -dpms s off s noblank s 0 0 s noexpose

Let us know if that helped.

On the desktop layer something like below should work:

dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.Inhibit string:"MPlayer" string:"Watching video"

(Adjust the two strings to your liking (or just omit them))

After a long time apent away from computer, I returned to a standby screen; turned off monitor to make sure there’s no power-saving setting I have activated.

anthony@anthony-OptiPlex-9010:~$ dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.Inhibit string:"MPlayer" string:"Watching video"
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.ScreenSaver was not provided by any .service files

You need to run this inside the running session before, not after it has suspended… It is supposed to prevent it from even going into suspend when you i.e. watch a movie

Hi. I’m sorry, but I don’t know what you mean by inside running session. The command I entered while the computer was in normal (not standby) mode. Can you tell me what you meant about the aforementioned words–what do I do to enter the command and stop the standby problem.

Ah, sorry I read it as if you were logged in to a CLI when the monitor was off (via ssh or some such), if you get that message in a running session I guess mate does not use gnome-screensaver then …

For Xscreensaver (which mate likely uses then) you can try:

dbus-send --session \
      --dest=org.freedesktop.ScreenSaver \
      --type=method_call \
      --print-reply \
      --reply-timeout=20000 \
      /org/freedesktop/ScreenSaver \
      org.freedesktop.ScreenSaver.Inhibit \
      string:program string:reason

this will return a cookie string you want to keep to turn off the inhibition like below:

dbus-send --session \
      --dest=org.freedesktop.ScreenSaver \
      --type=method_call \
      --print-reply \
      --reply-timeout=20000 \
      /org/freedesktop/ScreenSaver \
      org.freedesktop.ScreenSaver.UnInhibit \
      uint32:<inhibit-cookie>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.