Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Starting a list here for deprecated and/or unsupported ways for inhibiting screensaver or suspend. Could move to part of docs some day.

Gnome: gnome-screensaver-command --poke

  • Deprecated since Ubuntu 9.10 (Karmic Koala, released 2009)
  • The "--poke" argument has been removed from gnome-screensaver 3

Quote from https://wiki.ubuntu.com/DebuggingScreenLocking/HowScreenLockingWorks:

Screensaver Inhibiting
Prior to Karmic, applications that wished to temporarily suspend the screensaver from coming up could periodically send the "poke" command to gnome-screensaver, either using the DBus API, or with the gnome-screensaver-command tool. This would cause gnome-screensaver to reset the idle counter, preventing it from reaching the preset value.

Beginning with Karmic, the proper way to suspend the screensaver is to use the gnome-screensaver DBus API "Inhibit" method. (Ref.: gnome-screensaver FAQ)

Unfortunately, many applications such as VLC, Mplayer and xdg-screensaver still use the "poke" command, which was deprecated and disabled in the current gnome-screensaver codebase. See the following bugs for more information:

https://bugzilla.gnome.org/show_bug.cgi?id=579430

https://bugs.edge.launchpad.net/gnome-screensaver/+bug/428884

systemd-inhibit

Using systemd-inhibit as a heartbeat is not supported: System will start sleep even with:

In [11]: for i in range(10_000):
    ...:     print(i)
    ...:     subprocess.run(
    ...:         ["systemd-inhibit", "--what=idle:sleep", "sleep", "1"],
    ...:         stdout=sys.stdout,
    ...:         stderr=subprocess.PIPE,
    ...:     )

Running systemd-inhibit as long running process is potentially risky (what happens if the python process dies abruptly?). Probably should not be a supported method.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.