Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor no longer shuts off when idle #5607

Open
saellaven opened this issue Aug 5, 2018 · 243 comments
Open

Monitor no longer shuts off when idle #5607

saellaven opened this issue Aug 5, 2018 · 243 comments
Assignees

Comments

@saellaven
Copy link

Your system information

  • Steam client version (build number or date): August 1, 2018
  • Distribution (e.g. Ubuntu): Gentoo
  • Opted into Steam client beta?: [Yes/No] No
  • Have you checked for system updates?: [Yes/No] Yes

Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected

Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD FX(tm)-8350 Eight-Core Processor
CPU Family: 0x15
CPU Model: 0x2
CPU Stepping: 0x0
CPU Type: 0x0
Speed: 4000 Mhz
8 logical processors
8 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Supported
SSE41: Supported
SSE42: Supported
AES: Supported
AVX: Supported
CMPXCHG16B: Supported
LAHF/SAHF: Supported
PrefetchW: Unsupported

Operating System Version:
"NAME=Gentoo" (64 bit)
Kernel Name: Linux
Kernel Version: 4.17.10
X Server Vendor: The X.Org Foundation
X Server Release: 11905000
X Window Manager: Metacity (Marco)
Steam Runtime Version: steam-runtime-beta-release_2018-06-14

Video Card:
Driver: NVIDIA Corporation GeForce GTX 1050 Ti/PCIe/SSE2
Driver Version: 4.6.0 NVIDIA 396.45
OpenGL Version: 4.6
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 59 Hz
VendorID: 0x10de
DeviceID: 0x1c82
Revision Not Detected
Number of Monitors: 1
Number of Video Cards Not Detected
Primary Display Resolution: 1920 x 1200
Desktop Resolution: 1920 x 1200
Primary Display Size: 20.39" x 12.76" (24.02" diag)
51.8cm x 32.4cm (61.0cm diag)
Primary Bus: PCI Express 16x
Primary VRAM: 4096 MB
Supported MSAA Modes: 2x 4x 8x 16x

Sound card:
Audio device: Realtek ALC892

Memory:
RAM: 15918 Mb

Miscellaneous:
UI Language: English
LANG: en_US.UTF-8
Total Hard Disk Space Available: 468427 Mb
Largest Free Hard Disk Block: 20083 Mb
VR Headset: None detected

Recent Failure Reports:

Please describe your issue in as much detail as possible:

Since the update to the version with the new chat features, the monitor no longer shuts off when idle. The screensaver will blank, but the monitor remains on. DPMS is enabled. If I exit steam, the monitor shuts off again when idle.

Steps for reproducing this issue:

@Brottweiler
Copy link

Same issue here on Arch Linux. Is it related to

The screensaver will now be correctly interrupted when using controllers or In-Home Streaming

from the July 16, 2018 update?

@saellaven
Copy link
Author

It's likely related.

As an added data point, I tried disabling in home streaming and have my steam controller turned off, and the display still won't sleep.

@Muffindrake
Copy link

This is still a problem as of today. I'm on a Gentoo machine with a blanking timeout of 10 minutes, which is never triggered as long as Steam is running, but works immediately after Steam is terminated.

@awused
Copy link

awused commented Sep 24, 2018

Confirming this issue on Fedora 28 with Steam version 1536436120. Steam prevents DPMS from turning off my monitors but does not prevent xautolock from locking my screen. I have no controllers connected and I've disabled in-home streaming. If I close Steam DPMS works and my monitors shut off when expected.

If you're trying to reproduce it I've found that if I start Steam but don't interact with it my DPMS settings work as expected, at least with the DPMS timeouts set very low for testing. It's only when I interact with Steam - changing tabs to and from my library, chatting, opening the options menus - that Steam starts interfering with DPMS. It's also possible that letting enough time pass without interacting it will also trigger the bug; I did not test enough to rule this out.

@koniiiik
Copy link

FWIW, I've been experiencing this issue since way before the July update, and I remember noticing it even on Windows more than a year ago.

@ortango
Copy link

ortango commented Oct 17, 2018

I've been having this issue since at least before issue #5532 opened.

I've got neither org.gnome.ScreenSaver or org.freedesktop.ScreenSaver dbus services and my x11 idle timer continues to increase. Still, my monitors never sleep with steam open (I can just open steam for this issue to take effect, i don't need to interact with it or start a game).

How is steam disrupting dpms behavior as it seems x11 idle isn't used and the dbus methods return errors on my system?


for ref. sdl2 functions:

  • X11_SuspendScreenSaver()

  • SDL_DBus_ScreensaverTickle()

  • SDL_DBus_ScreensaverInhibit()

@gogoprog
Copy link

I confirm this exact same issue on my system:

Linux 4.x (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.18.14-arch1-1-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12002000
    X Window Manager:  awesome
    Steam Runtime Version:  steam-runtime-beta-release_2018-09-03

2018-10-23_11 43 38

@mphe
Copy link

mphe commented Nov 2, 2018

I'm still experiencing this problem, too.

Linux 4.x (64 bit)
Kernel Name:  Linux
Kernel Version:  4.18.7-arch1-1-ARCH
X Server Vendor:  The X.Org Foundation
X Server Release:  12001000
X Window Manager:  awesome
Steam Runtime Version:  steam-runtime-beta-release_2018-09-03

@sersorrel
Copy link

This is still a problem.

Steam is intentionally inhibiting DPMS. Run dbus-monitor --session, then start Steam, and search the output for "inhibit":

$ dbus-monitor --session
[...]
method call time=1549222988.474789 sender=:1.315 -> destination=org.freedesktop.ScreenSaver serial=2 path=/org/freedesktop/ScreenSaver; interface=org.freedesktop.ScreenSaver; member=Inhibit
   string "My SDL application"
   string "Playing a game"
method call time=1549222988.475227 sender=:1.213 -> destination=org.gnome.SessionManager serial=704 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "My SDL application"
   uint32 0
   string "Playing a game"
   uint32 8

I'm using the Steam client beta, Steam package version 1549129917 (built 2nd Feb 2019 17:21:48).

@gogoprog
Copy link

gogoprog commented Mar 7, 2019

Any news on this?

@ZacJoffe
Copy link

Can confirm that this is happening on my Arch install with bspwm as my window manager.

Operating System Version:
    "Arch Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.0.3-arch1-1-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12004000
    X Window Manager:  bspwm
    Steam Runtime Version:  <Runtime disabled>

@Grinkers
Copy link

Can confirm also on
ubuntu 18.10
xfce 4.12

@patlefort
Copy link

patlefort commented May 10, 2019

I can confirm too.
Antergos, Steam beta, KDE.

method call time=1557473218.655330 sender=:1.15 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=20651 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=AddInhibition
   uint32 4
   string "My SDL application"
   string "Playing a game"
method call time=1557473218.833311 sender=:1.15 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=20654 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ReleaseInhibition
   uint32 4307

@NotMrFlibble
Copy link

Also seeing this here. With the Steam client running, no blanking. Without, blanking occurs as it should.

I'm using the screen blanker built into X, Devuan beowulf, current Steam beta, Xfce, xf86-video-amdgpu 19.0.1.

@bjwest
Copy link

bjwest commented Jun 26, 2019

Just posting my info from issue #6337 into this thread so people don't have to click though. Also, whether or not I've recently played a game, or played a game since exiting and restarting the Steam client has no bearing on this, it just randomly occurs.

Your system information

Steam client version (build number or date): Jun 21 2019 @ 01:43:20. API v018
Steam package versions: 1561159470
Distribution (e.g. Ubuntu): KDE Neon 5.16
Opted into Steam client beta?: Yes
Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Steam client randomly disables power management with the notification "My SDL application is currently suppressing power management: playing a game" dosplayed in the Battery and Brightness widget. Exiting Steam and restarting will clear the problem for a random period of time, after which the power management is disabled again with the same notification.
Steps for reproducing this issue:

Run Steam client.
Wait a random, indeterminate period of time.
Notice screen no longer blanks after set inactivity time.

Seems to be similar to issue #5532 from about a year ago, but I don't recall having that problem back then. This started happening a few weeks ago, and I've just now taken the time to trace it to the Steam Client.

@gulafaran
Copy link

happens here too, and its quite annoying

@mDuo13
Copy link

mDuo13 commented Jul 5, 2019

I also have this problem, and have for at least several months. Maybe more; I'm not sure when it started. Monitor never turns off when Steam is running, turns off as normal when idle if Steam is not running.

Operating System Version:
    "Arch Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.0.11-arch1-1-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12004000
    X Window Manager:  Openbox
    Steam Runtime Version:  steam-runtime_0.20190626.0

@gulafaran
Copy link

the really weird part is i dont have a org.freedesktop.ScreenSaver nor org.kde.Solid.PowerManagement.PolicyAgent because i run a standalone WM. and i even tried setting the sdl env vars,
SDL_VIDEO_ALLOW_SCREENSAVER
SDL_HINT_VIDEO_ALLOW_SCREENSAVER

and it still "inhibits" it.

@rdrms
Copy link

rdrms commented Jul 18, 2019

OS: Fedora 30
Kernel: 5.1.17-300.fc30.x86_64
Desktop: Cinnamon 4.0.10
Steam client version: 1563346602 Built Jul 17 2019 @ 06:14:18

I have an applet (Presentation Applet) that tells when apps are inhibiting the screen saver. Frequently, "My SDL application" will inhibit the screensaver, the only way to get rid of it is to log out or close Steam. Ironically, I also have the opposite problem where Steam wont inhibit the screensaver during a game, and the X server doesn't detect my gamepad as input prolonging the sleep timeout, so in gamepad games the screen will turn after 10 minutes of playing unless I use said applet to disable power saving features temporarily.

@noameyal
Copy link

I have the same issue:

Operating System Version:
    "Arch Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.2.13-arch1-1-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12005000
    X Window Manager:  i3
    Steam Runtime Version:  steam-runtime_0.20190711.3

I'm using the screensaver built in to X too.

@DrDoctor13
Copy link

I'm having the same issue.

Operating System Version:
    "Manjaro Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.2.14-1-MANJARO
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12005000
    X Window Manager:  KWin
    Steam Runtime Version:  <Runtime disabled>

I initially noticed this due to messages like these appearing in KSyslog:
9/14/19 12:59 PM org_kde_powerdevil powerdevil: Enforcing inhibition from ":1.11" "My SDL application" with cookie 39 and reason "Playing a game"
Then when restarting Steam I would see several of them pop out at once.

|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: Scheduling inhibition from ":1.11" "My SDL application" with cookie 15 and reason "Playing a game"|
|---|---|---|
|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: Releasing inhibition with cookie  15|
|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: It was only scheduled for inhibition but not enforced yet, just discarding it|
|9/15/19 9:42 AM|plasmashell|qml: temp unit: 0|
|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: Scheduling inhibition from ":1.11" "My SDL application" with cookie 16 and reason "Playing a game"|
|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: Releasing inhibition with cookie  16|
|9/15/19 9:42 AM|org_kde_powerdevil|powerdevil: It was only scheduled for inhibition but not enforced yet, just discarding it|
|9/15/19 9:42 AM|kdeinit5|Registering ":1.121/org/ayatana/NotificationItem/steam" to system tray|

Xset confirms DPMS is disabled while Steam is running.

Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Disabled

While Steam is closed:

Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600
DPMS (Energy Star):
  Standby: 120    Suspend: 180    Off: 240
  DPMS is Enabled
  Monitor is On

@NotMrFlibble
Copy link

This is exacerbated by #6503 due to repeated unblanking. Previously, once forced, the display would remain blanked (except in specific circumstances).

@tripkin
Copy link

tripkin commented Oct 15, 2019

I use a hotkey combo running the command sh -c "sleep 1 && xset dpms force off" to force my monitors to sleep - I have sleep mode otherwise turned off. After putting the displays to sleep, the steam client forces them to wake up almost immediately. Sometimes, after putting the monitor to sleep multiple times, the screens will remain dark until either I wake them up or the steam client pops up a message telling me the client is ready to update. This continues until I have exited the client, at which point the screens stay dark until I activate them. Basically, the same as reported above. I did not notice this behavior before I upgraded to Debian Buster from Stretch, but it is definitely a problem now.

Operating System Version:
    Debian GNU/Linux 10 (buster) (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.19.0-6-amd64
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12004000
    X Window Manager:  GNOME Shell
    Steam Runtime Version:  steam-runtime_0.20191007.0

@bblough
Copy link

bblough commented Oct 15, 2019

To add to @tripkin 's comment-
I also have the issue under Buster. However, I definitely had the issue under Stretch as well. Unfortunately I can't recall if I had it under Jessie.

@Ilazki
Copy link

Ilazki commented Oct 22, 2019

I'm also having this problem, currently with Debian Buster, but it's been an issue for years. I always assumed that, since Steam makes heavy use of browser functionality, and I noticed the problem in Chromium around the same time as Steam, that it's related to this bug with Chromium inhibiting power management: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1600622

@sull324
Copy link

sull324 commented Jun 28, 2024

I have this issue,had to use steam-screensaver-fix from AUR. Can someone setup an donation page for valve so they can hire an dev to fix basic 6 years old bug?

@G2G2G2G
Copy link

G2G2G2G commented Jun 28, 2024

Just open source the code and it'll be fixed in a few days.
come on gabe.. lets see that ugly mess of slapped together 24 year old code

@coolasbreeze
Copy link

Adding to this, I am running Debian (12) Bookworm
It seems to turn off with the system settings initially then just turns back on then never off again.

@olealgoritme
Copy link

screen goes blank for 2 seconds then comes back on..
extremely annoying that this isn't fixed yet.
ubuntu 24.04, kernel 6.8.0

@zeorin
Copy link

zeorin commented Jul 11, 2024

For any newcomers to this issue thread, please can we 👍 the original post right at the top if this issue is also occurring for you, and subscribing to the issue, instead of making a "me too" comment and spamming everyone?

We know it's still an issue. The issue is Open. 🙏

@josefwells
Copy link

josefwells commented Sep 6, 2024

Some people are going to want to inhibit the screensaver/dpms some are not. With the steamdeck you can set a monitor poweroff right in the client. If this was enabled in the steam client on linux I suspect most people would be happy. (Except the people that have a special screensaver they want to run). But seems a good place to spend steam-points (like startup movies, etc)

@SoftwareSchlosser
Copy link

SoftwareSchlosser commented Oct 1, 2024

For me (Xubuntu 22.04.5 LTS) the screen actually never turns off again after starting steam once - even if steam and all it's processes were stopped! Only rebooting helps.
xscreensaver process is still up and I have absolutely no idea why it doesn't work anymore.
I could live with the issue as long as it stops after quitting steam but having to physically turn off the screen or reboot is very annoying!

@TTimo
Copy link
Collaborator

TTimo commented Oct 3, 2024

The latest beta client supports a "-disable-screensaver-inhibit" command line option that will prevent Steam from inhibiting the screen saver when it detects computer activity. This feature of the Steam client is required on Steam Deck and SteamOS, but depending on your use case on Desktop we realize you may not want this.

The Steam client inhibits the screen saver under various conditions such as mouse or controller activity, game streaming, game overlay activity and more. If the system is left idle for roughly 30 seconds and nothing is happening indicating activity on the system, the Steam client will allow the screen saver again.

We have not been able to reproduce situations where the Steam client is permanently preventing the screen saver to activate as described above. But if you run into such a problem, you may want to use these two new command line options: "-verbose-screensaver-inhibit" and "-verbose-computer-activity" to understand why the Steam client thinks there is activity on your system. If you still believe there is an issue with the Steam client after that please open a separate issue and provide logs.

We've noted reports that explicitly disabling the monitor with "xset dpms force off" may result in the monitor coming back up again after a few seconds. We believe this happens when the command is issued while the Steam client is actively inhibitingthe screen saver. Issuing this command once the Steam client no longer inhibits appears to work as intended.

@awused
Copy link

awused commented Oct 3, 2024

After testing -disable-screensaver-inhibit my screen lock hotkey is working again. My normal xautolock was 2 hours, and while it seems to work right now if I set it to one minute, Steam was inhibiting it at 2 hours before and I'll have to wait and see if it works normally now.

It's really weird that Steam is inhibiting the screensaver for as long as 30 seconds after it detects activity even if that activity has nothing to do with Steam. That's very bizarre behaviour for any application, and it's obviously going to interfere with any screen locking hotkeys triggered by users. It could make sense if there was a game running, but not if I'm, say, scrolling in my web browser and Steam is in another virtual desktop.

@G2G2G2G
Copy link

G2G2G2G commented Oct 3, 2024

It inhibits it forever and is very easy to reproduce, even with all usb devices unplugged. The AUR package should really cover what if anything needed to be 'known' to reproduce, or just ask someone in the past 6 years here to take 5 mins to do it..
Anyway thanks for the fix, please add it in the settings as a checkbox.
The verbose logs should stay as a flag since you need command line to see that anyway

@awused yea especially if steam is minimized + no software running from it, the thing should be entirely inactive.

@sull324
Copy link

sull324 commented Oct 3, 2024

Everything seems to be working fine for me now. I was using the AUR packages before, but I no longer need them.

I agree with the checkbox option.

@awused
Copy link

awused commented Oct 3, 2024

I've filed #11315 because I think the intended behaviour described in #5607 (comment) is bad enough that it should be fixed, but to keep it separate from the greater issue described in this bug (permanent inhibition without user activity).

For what it's worth my monitors did shut off as expected after two hours of inactivity with -disable-screensaver-inhibit this time.

@dsalt
Copy link

dsalt commented Oct 5, 2024

steam -console -verbose-screensaver-inhibit -verbose-computer-activity, console view:

screen saver inhibit: computer is activescreen saver inhibit: computer is activescreen saver inhibit: computer is activesc…

@DreamsOneiro
Copy link

DreamsOneiro commented Oct 7, 2024

Running Steam beta client with -verbose-screensaver-inhibit -verbose-computer-activity gave me these messages in the console_log.txt in ~/.local/share/Steam/logs
[2024-10-07 18:05:01] Client version: 1728093750
[2024-10-07 18:05:01] wayland: skipping init because GAMESCOPE_WAYLAND_DISPLAY is not set
[2024-10-07 18:05:01] Warning: wayland init failed, some functionality may be unavailable
[2024-10-07 18:05:01] Using udev for HIDAPI joystick device discovery
[2024-10-07 18:05:01] Using udev for joystick device discovery
[2024-10-07 18:05:01] Loaded SDL version 3.1.2-1986-g4fa92d233
[2024-10-07 18:05:01] GetWin32Stats: display was not open yet, good
[2024-10-07 18:05:01] GetWin32Stats: display was not open yet, good
[2024-10-07 18:05:01] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:05:01] Warning: failed to set thread priority: set failed for priority 8
[2024-10-07 18:05:01] Warning: support for elevated priorities is most likely unavailable, suppressing future warnings
[2024-10-07 18:05:01] wayland: skipping init because GAMESCOPE_WAYLAND_DISPLAY is not set
[2024-10-07 18:05:01] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:05:01] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:05:01] computer activity: mouse
[2024-10-07 18:05:01] Steam Runtime Launch Service: starting steam-runtime-launcher-service
[2024-10-07 18:05:01] Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 14979
[2024-10-07 18:05:01] Failed to init SteamVR because it isn't installed
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: inhibit
[2024-10-07 18:05:01] GLibLog: domain:Gtk  msg:gtk_disable_setlocale() must be called before gtk_init()
[2024-10-07 18:05:01] local (potentially out of sync) copy of roaming config loaded - 163 bytes.
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] roaming config store loaded successfully - 163 bytes.
[2024-10-07 18:05:01] LoadShortcuts: loading shortcuts from: /home/dreams/.local/share/Steam/userdata/101103699/config/shortcuts.vdf
[2024-10-07 18:05:01] IPC function call IClientRemoteStorage::InitializeUGCQuotaUsage took too long: 107 msec
[2024-10-07 18:05:01] IPC function call IClientAppManager::GetNumInstalledApps took too long: 42 msec
[2024-10-07 18:05:01] System startup time: 4.44 seconds
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:01] screen saver inhibit: computer is active
[2024-10-07 18:05:02] ExecCommandLine: "'/home/dreams/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened' '-verbose-screensaver-inhibit' '-verbose-computer-activity'"
[2024-10-07 18:05:02] screen saver inhibit: computer is active
[2024-10-07 18:05:02] screen saver inhibit: computer is active
[2024-10-07 18:05:03] screen saver inhibit: computer is active
[2024-10-07 18:05:03] screen saver inhibit: computer is active
[2024-10-07 18:05:04] screen saver inhibit: computer is active
[2024-10-07 18:05:04] screen saver inhibit: computer is active

I noticed the "computer activity: mouse" popping up and tried removing my mouse and completely launch everything with the keyboard and notice Steam no longer inhibit screensaver, but the moment I plug in and move my mouse then my monitor will just refused to blank.

I use qtile as my WM, I'm not sure if mouse hover focus was affecting it so I turned it off and did another run.
[2024-10-07 18:22:36] Client version: 1728093750
[2024-10-07 18:22:36] wayland: skipping init because GAMESCOPE_WAYLAND_DISPLAY is not set
[2024-10-07 18:22:36] Warning: wayland init failed, some functionality may be unavailable
[2024-10-07 18:22:36] Using udev for HIDAPI joystick device discovery
[2024-10-07 18:22:36] Using udev for joystick device discovery
[2024-10-07 18:22:36] Loaded SDL version 3.1.2-1986-g4fa92d233
[2024-10-07 18:22:36] GetWin32Stats: display was not open yet, good
[2024-10-07 18:22:36] GetWin32Stats: display was not open yet, good
[2024-10-07 18:22:36] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:22:36] Warning: failed to set thread priority: set failed for priority 8
[2024-10-07 18:22:36] Warning: support for elevated priorities is most likely unavailable, suppressing future warnings
[2024-10-07 18:22:36] wayland: skipping init because GAMESCOPE_WAYLAND_DISPLAY is not set
[2024-10-07 18:22:36] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:22:36] Warning: failed to set thread priority: set failed for 8: 1: 
[2024-10-07 18:22:36] computer activity: mouse
[2024-10-07 18:22:36] Steam Runtime Launch Service: starting steam-runtime-launcher-service
[2024-10-07 18:22:36] Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 16455
[2024-10-07 18:22:36] Failed to init SteamVR because it isn't installed
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:36] screen saver inhibit: inhibit
[2024-10-07 18:22:36] GLibLog: domain:Gtk  msg:gtk_disable_setlocale() must be called before gtk_init()
[2024-10-07 18:22:36] local (potentially out of sync) copy of roaming config loaded - 163 bytes.
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:36] roaming config store loaded successfully - 163 bytes.
[2024-10-07 18:22:36] LoadShortcuts: loading shortcuts from: /home/dreams/.local/share/Steam/userdata/101103699/config/shortcuts.vdf
[2024-10-07 18:22:36] IPC function call IClientUser::GetSteamID took too long: 105 msec
[2024-10-07 18:22:36] System startup time: 3.47 seconds
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:36] screen saver inhibit: computer is active
[2024-10-07 18:22:37] ExecCommandLine: "'/home/dreams/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened' '-verbose-screensaver-inhibit' '-verbose-computer-activity'"
[2024-10-07 18:22:37] screen saver inhibit: computer is active
[2024-10-07 18:22:37] screen saver inhibit: computer is active
[2024-10-07 18:22:38] screen saver inhibit: computer is active
[2024-10-07 18:22:38] screen saver inhibit: computer is active
[2024-10-07 18:22:39] screen saver inhibit: computer is active
[2024-10-07 18:22:39] screen saver inhibit: computer is active
[2024-10-07 18:22:40] screen saver inhibit: computer is active
[2024-10-07 18:22:40] screen saver inhibit: computer is active
[2024-10-07 18:22:41] screen saver inhibit: computer is active
[2024-10-07 18:22:41] screen saver inhibit: computer is active
[2024-10-07 18:22:42] screen saver inhibit: computer is active
[2024-10-07 18:22:42] screen saver inhibit: computer is active
[2024-10-07 18:22:43] screen saver inhibit: computer is active
[2024-10-07 18:22:43] screen saver inhibit: computer is active
[2024-10-07 18:22:44] screen saver inhibit: computer is active
[2024-10-07 18:22:44] screen saver inhibit: computer is active
[2024-10-07 18:22:45] screen saver inhibit: computer is active
[2024-10-07 18:22:45] screen saver inhibit: computer is active
[2024-10-07 18:22:46] screen saver inhibit: computer is active
[2024-10-07 18:22:46] screen saver inhibit: computer is active
[2024-10-07 18:22:47] screen saver inhibit: computer is active
[2024-10-07 18:22:47] screen saver inhibit: computer is active
[2024-10-07 18:22:48] screen saver inhibit: computer is active
[2024-10-07 18:22:48] screen saver inhibit: computer is active
[2024-10-07 18:22:49] screen saver inhibit: computer is active
[2024-10-07 18:22:49] screen saver inhibit: computer is active
[2024-10-07 18:22:50] Warning: failed to set thread priority: set failed for -10: 1: 
[2024-10-07 18:22:50] screen saver inhibit: computer is active
[2024-10-07 18:22:50] screen saver inhibit: computer is active
[2024-10-07 18:22:51] Warning: failed to set thread priority: set failed for -10: 1: 
[2024-10-07 18:22:51] screen saver inhibit: computer is active
[2024-10-07 18:22:51] screen saver inhibit: computer is active
[2024-10-07 18:22:52] screen saver inhibit: computer is active
[2024-10-07 18:22:52] screen saver inhibit: computer is active
[2024-10-07 18:22:53] screen saver inhibit: computer is active
[2024-10-07 18:22:53] screen saver inhibit: computer is active
[2024-10-07 18:22:54] screen saver inhibit: computer is active
[2024-10-07 18:22:54] screen saver inhibit: computer is active
[2024-10-07 18:22:55] screen saver inhibit: computer is active
[2024-10-07 18:22:55] screen saver inhibit: computer is active
[2024-10-07 18:22:56] screen saver inhibit: computer is active
[2024-10-07 18:22:56] screen saver inhibit: computer is active
[2024-10-07 18:22:57] screen saver inhibit: computer is active
[2024-10-07 18:22:57] screen saver inhibit: computer is active
[2024-10-07 18:22:58] screen saver inhibit: computer is active
[2024-10-07 18:22:59] screen saver inhibit: computer is active
[2024-10-07 18:22:59] screen saver inhibit: computer is active
[2024-10-07 18:23:00] screen saver inhibit: computer is active
[2024-10-07 18:23:00] screen saver inhibit: computer is active
[2024-10-07 18:23:01] screen saver inhibit: computer is active
[2024-10-07 18:23:01] screen saver inhibit: computer is active
[2024-10-07 18:23:02] screen saver inhibit: computer is active
[2024-10-07 18:23:02] screen saver inhibit: computer is active
[2024-10-07 18:23:03] screen saver inhibit: computer is active
[2024-10-07 18:23:03] screen saver inhibit: computer is active
[2024-10-07 18:23:04] screen saver inhibit: allow
[2024-10-07 18:23:15] IPC function call IClientUtils::GetSecondsSinceComputerActive took too long: 175 msec
[2024-10-07 18:23:29] screen saver inhibit: computer is active
[2024-10-07 18:23:29] screen saver inhibit: inhibit
[2024-10-07 18:23:30] screen saver inhibit: computer is active
[2024-10-07 18:23:30] screen saver inhibit: computer is active
[2024-10-07 18:23:31] screen saver inhibit: computer is active
[2024-10-07 18:23:31] screen saver inhibit: computer is active
[2024-10-07 18:23:32] screen saver inhibit: computer is active
[2024-10-07 18:23:32] screen saver inhibit: computer is active
[2024-10-07 18:23:33] screen saver inhibit: computer is active
[2024-10-07 18:23:33] screen saver inhibit: computer is active
[2024-10-07 18:23:34] screen saver inhibit: computer is active
[2024-10-07 18:23:34] screen saver inhibit: computer is active
[2024-10-07 18:23:35] screen saver inhibit: computer is active
[2024-10-07 18:23:35] screen saver inhibit: computer is active
[2024-10-07 18:23:36] screen saver inhibit: computer is active
[2024-10-07 18:23:36] screen saver inhibit: computer is active
[2024-10-07 18:23:37] screen saver inhibit: computer is active
[2024-10-07 18:23:37] screen saver inhibit: computer is active
[2024-10-07 18:23:38] screen saver inhibit: computer is active
[2024-10-07 18:23:38] screen saver inhibit: computer is active
[2024-10-07 18:23:39] screen saver inhibit: computer is active
[2024-10-07 18:23:39] screen saver inhibit: computer is active
[2024-10-07 18:23:40] screen saver inhibit: computer is active
[2024-10-07 18:23:40] screen saver inhibit: computer is active
[2024-10-07 18:23:41] screen saver inhibit: computer is active
[2024-10-07 18:23:41] screen saver inhibit: computer is active
[2024-10-07 18:23:42] screen saver inhibit: computer is active
[2024-10-07 18:23:42] screen saver inhibit: computer is active
[2024-10-07 18:23:43] screen saver inhibit: computer is active
[2024-10-07 18:23:43] screen saver inhibit: computer is active
[2024-10-07 18:23:44] screen saver inhibit: computer is active
[2024-10-07 18:23:44] screen saver inhibit: computer is active
[2024-10-07 18:23:45] screen saver inhibit: computer is active
[2024-10-07 18:23:45] screen saver inhibit: computer is active
[2024-10-07 18:23:46] screen saver inhibit: computer is active
[2024-10-07 18:23:46] screen saver inhibit: computer is active
[2024-10-07 18:23:47] screen saver inhibit: computer is active
[2024-10-07 18:23:47] screen saver inhibit: computer is active
[2024-10-07 18:23:48] screen saver inhibit: computer is active
[2024-10-07 18:23:48] screen saver inhibit: computer is active
[2024-10-07 18:23:49] screen saver inhibit: computer is active
[2024-10-07 18:23:49] screen saver inhibit: computer is active
[2024-10-07 18:23:50] screen saver inhibit: computer is active
[2024-10-07 18:23:50] screen saver inhibit: computer is active
[2024-10-07 18:23:51] screen saver inhibit: computer is active
[2024-10-07 18:23:51] screen saver inhibit: computer is active
[2024-10-07 18:23:52] screen saver inhibit: computer is active
[2024-10-07 18:23:52] screen saver inhibit: computer is active
[2024-10-07 18:23:53] screen saver inhibit: computer is active
[2024-10-07 18:23:53] screen saver inhibit: computer is active
[2024-10-07 18:23:54] screen saver inhibit: computer is active
[2024-10-07 18:23:54] screen saver inhibit: computer is active
[2024-10-07 18:23:55] screen saver inhibit: computer is active
[2024-10-07 18:23:55] screen saver inhibit: computer is active
[2024-10-07 18:23:56] screen saver inhibit: computer is active
[2024-10-07 18:23:56] screen saver inhibit: computer is active
[2024-10-07 18:23:57] screen saver inhibit: computer is active
[2024-10-07 18:23:57] screen saver inhibit: computer is active
[2024-10-07 18:23:58] screen saver inhibit: computer is active
[2024-10-07 18:23:58] screen saver inhibit: computer is active
[2024-10-07 18:23:59] screen saver inhibit: computer is active
[2024-10-07 18:23:59] screen saver inhibit: computer is active
[2024-10-07 18:23:59] screen saver inhibit: renew inhibit
[2024-10-07 18:24:00] screen saver inhibit: computer is active
[2024-10-07 18:24:00] screen saver inhibit: allow
[2024-10-07 18:49:00] screen saver inhibit: computer is active
[2024-10-07 18:49:00] screen saver inhibit: inhibit
[2024-10-07 18:49:01] screen saver inhibit: computer is active
[2024-10-07 18:49:01] screen saver inhibit: computer is active
[2024-10-07 18:49:02] screen saver inhibit: computer is active

It didn't change anything, but I let it ran for a little longer and got something new
"[2024-10-07 18:23:15] IPC function call IClientUtils::GetSecondsSinceComputerActive took too long: 175 msec"

So far as long as I don't move my mouse the inhibit will not trigger. Also, removing my mouse and running steam will still result in the log showing "computer activity: mouse" and a bunch of "screen saver inhibit". The only difference is the screen will still blank unless I move the mouse.

Sorry I'm not a full time developer, and don't usually post bug report, but this has been bugging me out and just trying to share what I found in case it will help

@DreamsOneiro
Copy link

DreamsOneiro commented Oct 9, 2024

I have done further testing and this is what I found out. I even found a potential fix(?)
So all these test are done on the beta version only, as I found the behaviour of the full release is much different.

Everything ran with -verbose-screensaver-inhibit -verbose-computer-activity enabled.

At every launch I will get "computer activity: mouse" in console log regardless if the mouse is plugged in. The console will start printing "screen saver inhibit: computer is active" immediately and stopped after approximately a minute. The log will then print "screen saver inhibit: allow". Assume that you still do not plug in your mouse and start operating your PC through the keyboard, the console will remain silent and DPMS will not be affected. This is weird because I was assuming that operating the keyboard will trigger another inhibit. But I think Steam does not work well with purely just DPMS.

If I plug in a mouse and start moving and immediately unplug it, Steam will print "Screen saver inhibit: inhibit" and start spamming "screen saver inhibit: computer is active" for another one minute. Then this time DPMS will no longer work. So I assume the first inhibit triggered by the mouse activity in console did not affect DPMS for some reason. Cause DPMS will still work regardless of if Steam is printing "screen saver inhibit: computer is active". But if the console print "screen saver inhibit: inhibit", DPMS will stop working.

So the fix:
With the information above I assume that Steam does not work well with DPMS for some reason, and the inhibit was intended for some kind of screensaver. So I installed XScreensaver and tested everything again. I set XScreensaver to blank after a certain time, and in the advanced setting enabled power management and make it turn off the monitor on blank. XScreensaver manged the DPMS setting by itself, I verified this using "xset q" in console and see the setting changed. Now everything work as intended at least on the beta version. The screen will still turn off even after I operate with a mouse.

I don't know if this will work the same on the full release, but everything was tested on the beta version. I might do some test on the full release later and post another comment.

@DreamsOneiro
Copy link

Did another test, using XScreensaver bypass Steam inhibit for some reason, so if you are gaming with controller your monitor will blank mid game, it will still blank even if I use Big Picture. I gave up and just stole a bash script online (checkout lightsonplus by devkral) and use it to detect if a game is in full screen mode and disable screensaver.

@TTimo
Copy link
Collaborator

TTimo commented Oct 9, 2024

@DreamsOneiro wrote:

So far as long as I don't move my mouse the inhibit will not trigger.

Steam does consider the mouse moving as computer activity, and will prevent the screensaver for a period of time based on that. That seems pretty normal. It would be an issue if just having your mouse plugged in, without using it would permanently prevent the screensaver, but that's not what's happening here is it?

Steam has no notion of 'DPMS vs screensaver', it just uses the dbus APIs to inhibit or allow the screensaver. If DPMS ends up being permanently disabled despite Steam issuing the allow again, that doesn't sound like a problem with steam anymore.

@awused
Copy link

awused commented Oct 9, 2024

Steam does consider the mouse moving as computer activity, and will prevent the screensaver for a period of time based on that. That seems pretty normal.

It's not normal for an individual application to do that when they're not the subject of the mouse activity. Especially not also silently inhibiting it for a lengthy period of time after. I have no other applications that do either of those, Steam on Linux is extremely abnormal.

Most applications don't ever need to inhibit the screen saver based on mouse or keyboard activity anyway. Screen saver inhibition is usually used in the opposite case, when there's no user input but something else is preventing it, like video playback.

A desktop environment or window manager (or something in a similar vein like xautolock) are about the only cases where it makes sense to track global inputs, because they're the ones also managing the screen saver. Maybe on Steam OS or Steam Deck, Steam fits that description, but it doesn't on regular desktop clients which is what this bug is about.

@Dinth
Copy link

Dinth commented Oct 9, 2024

Steam does consider the mouse moving as computer activity, and will prevent the screensaver for a period of time based on that. That seems pretty normal

No its not for several reasons:

  1. Steam doesnt need to prevent inhibit when theres a mouse movement, because computer will not go to sleep when theres a mouse activity anyway.
  2. Steam may prevent inhibit when a game is running and there may not be a mouse activity (long cinematics) - but its not even doing that, as currently Steam is only preventing inhibit when there's no game running.
  3. The inhibit function is broken, because Steam doesnt stop inhibiting even when theres no computer activity for long periods of time and Steam is only in the taskbar.
  4. Users want to be able to configure their sleep options (like time after the last activity) themselves. They do that in their desktop environment configuration.

@ortango
Copy link

ortango commented Oct 11, 2024

@TTimo

If you still believe there is an issue with the Steam client after that please open a separate issue and provide logs.

Steam has no notion of 'DPMS vs screensaver', it just uses the dbus APIs to inhibit or allow the screensaver.

my setup is not using the dbus service, it is using the XSS method of X11_SuspendScreenSaver(). which calls XScreenSaverSuspend().

  • i am able to check via -verbose-screensaver-inhibit flag that this only happens if i trigger steams inhibitor via gamepad or mouse (in other words, it uninhibits if i only ever use the keyboard.)
  • i used a custom /org/freedesktop/ScreenSaver service to check dbus behavior. and if i let the suspend cookie start at 0 i get the same issue as if i have no dbus service; this behavior is also seen when the dbus service is NOOP and never runs a XScreenSaverSuspend itself. if i let the initial cookie be 1 then this doesnt happen (and sdl games like "dead cells" will still inhibit the screen correctly themselves). note: suspend_cookie == 0 is special case in sdl's inhibit

If XScreenSaverSuspend is called multiple times with suspend set to 'True', it must be called an equal number of times with suspend set to 'False' in order for the screensaver timer to be restarted.

ok, now i have added logging into xserver/Xext. i can see that both with dbus service that starts with suspend_cookie = 0 and if there is no dbus service, a persistent inhibit is added to X.
with the dbus service i "correcly" get inhibit/uninhibit, but on suspend_cookie=1, leaving cookie 0 in place until steam is killed.
without the service i get the single inhibit lock with no uninhibit events at all until i close steam.
in both cases, the screen cannot suspend when steam is running. i forgot to add that this even happens if the dbus service never actually suspends the screensaver
i have logs with timestamps for Xserver, dbus service and steam if needed....

@G2G2G2G
Copy link

G2G2G2G commented Oct 11, 2024

Keeping the monitor awake from mouse movements is definitely not steams responsibility lol
You can verify this by turning off steam and moving your mouse and note the monitor won't sleep.
This is how OSes have been for decades....

When a game is running, it should just inhibit screen saver, the same way when a video is playing full screen it is inhibited. That's really all that anyone needs and keeps it fairly simple.

Steam can also inhibit for controller movement in big picture mode, as OSes usually won't inhibit for controller movement so that one can be steams responsibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests