protonscr

Steam orphans Gnome session inhibitor when game exits

steamopen
ValveSoftware/steam-for-linux#12440 · opened 2025-11-11 by Fish-in-a-Barrel · updated 2025-11-11 · 0 comments · github
FFish-in-a-Barrel 2025-11-11 github

Your system information

  • Steam client version (build number or date): 1759461205
  • Distribution (e.g. Ubuntu): Linux Mint 22.2
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • Steam Logs:

steam-logs.tar.gz

  • GPU: Nvidia

Please describe your issue in as much detail as possible:

Some specific games don't release the Gnome session inhibitor, so my monitors don't power off when they should. An example game is "Vampire Survivors".

Honestly, I don't know if this is a Steam Client, compatibility layer, or game issue (probably not a game issue since it's not Linux aware).

If I monitor the Gnome session (dbus-monitor sender="org.gnome.SessionManager"), you can see that two inhibitors are acquired, but one fails to release with an "invalid cookie" error:

signal time=1762820425.191158 sender=org.freedesktop.DBus -> destination=:1.358 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.358"
signal time=1762820425.191177 sender=org.freedesktop.DBus -> destination=:1.358 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.358"
signal time=1762820434.270839 sender=:1.266 -> destination=(null destination) serial=810 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor29"
method return time=1762820434.270866 sender=:1.266 -> destination=:1.270 serial=811 reply_serial=141
   uint32 1052045254
method return time=1762820434.271081 sender=:1.266 -> destination=:1.283 serial=812 reply_serial=201
   boolean true
method return time=1762820434.271307 sender=:1.266 -> destination=:1.283 serial=813 reply_serial=202
   boolean true
method return time=1762820434.272609 sender=:1.266 -> destination=:1.293 serial=814 reply_serial=1503
   array [
      object path "/org/gnome/SessionManager/Inhibitor29"
      object path "/org/gnome/SessionManager/Inhibitor28"
   ]
method return time=1762820434.274126 sender=:1.266 -> destination=:1.293 serial=815 reply_serial=1508
   array [
   ]
method return time=1762820434.274452 sender=:1.266 -> destination=:1.293 serial=816 reply_serial=1509
   uint32 8
method return time=1762820434.274771 sender=:1.266 -> destination=:1.293 serial=817 reply_serial=1510
   string "My SDL application"
method return time=1762820434.277845 sender=:1.266 -> destination=:1.293 serial=818 reply_serial=1511
   string "Playing a game"
signal time=1762820440.467547 sender=:1.266 -> destination=(null destination) serial=819 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor30"
method return time=1762820440.467577 sender=:1.266 -> destination=:1.270 serial=820 reply_serial=145
   uint32 1124669224
method return time=1762820440.467801 sender=:1.266 -> destination=:1.283 serial=821 reply_serial=203
   boolean true
method return time=1762820440.468112 sender=:1.266 -> destination=:1.283 serial=822 reply_serial=204
   boolean true
method return time=1762820440.468474 sender=:1.266 -> destination=:1.293 serial=823 reply_serial=1516
   array [
      object path "/org/gnome/SessionManager/Inhibitor30"
      object path "/org/gnome/SessionManager/Inhibitor29"
      object path "/org/gnome/SessionManager/Inhibitor28"
   ]
method return time=1762820440.469789 sender=:1.266 -> destination=:1.293 serial=824 reply_serial=1521
   array [
   ]
method return time=1762820440.470083 sender=:1.266 -> destination=:1.293 serial=825 reply_serial=1522
   uint32 8
method return time=1762820440.470349 sender=:1.266 -> destination=:1.293 serial=826 reply_serial=1523
   string "SDL Application"
method return time=1762820440.470930 sender=:1.266 -> destination=:1.293 serial=827 reply_serial=1524
   string "Playing a game"
signal time=1762820453.646740 sender=:1.266 -> destination=(null destination) serial=828 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorRemoved
   object path "/org/gnome/SessionManager/Inhibitor29"
method return time=1762820453.646757 sender=:1.266 -> destination=:1.270 serial=829 reply_serial=149
method return time=1762820453.646920 sender=:1.266 -> destination=:1.283 serial=830 reply_serial=205
   boolean true
method return time=1762820453.647178 sender=:1.266 -> destination=:1.283 serial=831 reply_serial=206
   boolean true
method return time=1762820453.649992 sender=:1.266 -> destination=:1.293 serial=832 reply_serial=1527
   array [
      object path "/org/gnome/SessionManager/Inhibitor30"
      object path "/org/gnome/SessionManager/Inhibitor28"
   ]
error time=1762820453.700173 sender=:1.266 -> destination=:1.270 error_name=org.gnome.SessionManager.GeneralError reply_serial=151
   string "Unable to uninhibit: Invalid cookie"

Note that two inhibitors are acquired, and they have different names: "My SDL Application" and "SDL Application". "SDL Application" (the second one to be created) is the one that gets leaked.

When I launch a game that does NOT have the problem, only one inhibitor is acquired and it is released successfully:
signal time=1762822164.474572 sender=org.freedesktop.DBus -> destination=:1.395 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.395"
signal time=1762822164.474592 sender=org.freedesktop.DBus -> destination=:1.395 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.395"
signal time=1762822171.313497 sender=:1.266 -> destination=(null destination) serial=924 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor37"
method return time=1762822171.313524 sender=:1.266 -> destination=:1.270 serial=925 reply_serial=185
   uint32 1570963572
method return time=1762822171.313784 sender=:1.266 -> destination=:1.283 serial=926 reply_serial=229
   boolean true
method return time=1762822171.314036 sender=:1.266 -> destination=:1.283 serial=927 reply_serial=230
   boolean true
method return time=1762822171.314817 sender=:1.266 -> destination=:1.293 serial=928 reply_serial=1801
   array [
      object path "/org/gnome/SessionManager/Inhibitor30"
      object path "/org/gnome/SessionManager/Inhibitor37"
      object path "/org/gnome/SessionManager/Inhibitor28"
      object path "/org/gnome/SessionManager/Inhibitor35"
   ]
method return time=1762822171.316410 sender=:1.266 -> destination=:1.293 serial=929 reply_serial=1806
   array [
   ]
method return time=1762822171.316747 sender=:1.266 -> destination=:1.293 serial=930 reply_serial=1807
   uint32 8
method return time=1762822171.317162 sender=:1.266 -> destination=:1.293 serial=931 reply_serial=1808
   string "SDL Application"
method return time=1762822171.317895 sender=:1.266 -> destination=:1.293 serial=932 reply_serial=1809
   string "Playing a game"
signal time=1762822181.661497 sender=:1.266 -> destination=(null destination) serial=933 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorRemoved
   object path "/org/gnome/SessionManager/Inhibitor37"
method return time=1762822181.661514 sender=:1.266 -> destination=:1.270 serial=934 reply_serial=189
method return time=1762822181.661932 sender=:1.266 -> destination=:1.283 serial=935 reply_serial=231
   boolean true
method return time=1762822181.662362 sender=:1.266 -> destination=:1.283 serial=936 reply_serial=232
   boolean true
method return time=1762822181.664222 sender=:1.266 -> destination=:1.293 serial=937 reply_serial=1814
   array [
      object path "/org/gnome/SessionManager/Inhibitor30"
      object path "/org/gnome/SessionManager/Inhibitor28"
      object path "/org/gnome/SessionManager/Inhibitor35"
   ]

Gnome Session API reference may be useful: https://gnome.pages.gitlab.gnome.org/gnome-session/

Steps for reproducing this issue:

  1. Launch Vampire Survivors
  2. Quit the game
  3. Run dbus-send --session --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors to see the orphaned inhibitor.

Nothing extracted yet.