Steam inhibits screensaver based on unrelated activity and for unexpectedly long periods of time
Your system information
- Steam client version (build number or date): 1727910361
- Distribution (e.g. Ubuntu): Fedora 28 through Fedora 40
- Opted into Steam client beta?: Yes
- Have you checked for system updates?: Yes
- Steam Logs: not applicable to this bug, this is apparently intended behaviour
- GPU: Nvidia
Please describe your issue in as much detail as possible:
Steam detects any mouse/controller (and keyboard?) activity globally and inhibits the screensaver for 30 seconds, regardless of whether that activity is related to steam or not.
There are two problems with this undocumented behaviour that are inappropriate and that no users would expect:
- Steam is inhibiting the screensaver for unrelated user activity. Applications that need to inhibit the screensaver should only do so when there is an actual reason to. Usually the fact that there is user activity is, on its own, enough to prevent the screensaver from triggering, so this seems unnecessary.
- Steam continues to inhibit the screensaver for an additional 30 seconds, for no apparent reason, preventing users from powering off their screens with hotkeys. This is extremely unusual and I'm unaware of any other applications that do this.
This is a contributing cause of some of the behaviour in https://github.com/ValveSoftware/steam-for-linux/issues/5607, though on its own it doesn't fully explain it because Steam often inhibits the screensaver permanently, not just for 30 seconds.
There is a recent workaround in that bug to entirely disable screensaver inhibition with -disable-screensaver-inhibit, but that also prevents Steam from inhibiting the screensaver when actually desired, like when playing a game that captures input.
Steps for reproducing this issue:
- Open steam (might need newest beta for the logs)
- Observe changes in console_log.txt (probably
tail -f ~/.local/share/Steam/logs/console_log.txt) - Minimize Steam, move it to another workspace, or another virtual desktop
- Engage in some form of activity. Typing in a terminal or moving the mouse and clicking around seems to work.
- Observe that Steam is inhibiting the screensaver
- Wait 30 seconds, then start doing actions again
- Observe that Steam stops (
screen saver inhibit: allow) then restarts inhibiting the screensaver, despite not even being visible
For the entire time covered by these logs, Steam was on a different workspace (using i3) and wasn't visible at all.
[2024-10-03 08:16:36] screen saver inhibit: computer is active
[2024-10-03 08:16:37] screen saver inhibit: computer is active
[2024-10-03 08:16:37] screen saver inhibit: computer is active
[2024-10-03 08:16:38] screen saver inhibit: computer is active
[2024-10-03 08:16:38] screen saver inhibit: renew inhibit
[2024-10-03 08:16:38] screen saver inhibit: computer is active
[2024-10-03 08:16:39] screen saver inhibit: allow
[2024-10-03 08:17:25] screen saver inhibit: computer is active
but that also prevents Steam from inhibiting the screensaver when actually desired, like when playing a game
At least for me (but tested on different machines and linux distros) Steam was never inhibiting the screensaver when playing the game. In fact, it was only inhibiting when idling.
While I do believe there are more bugs with inhibition, we should keep that discussion in https://github.com/ValveSoftware/steam-for-linux/issues/5607. This bug is about the intended default behaviour as described in this comment, which I have more or less verified.