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

Steam sometimes prevents system from going to sleep #9509

Open
buu342 opened this issue May 19, 2023 · 23 comments
Open

Steam sometimes prevents system from going to sleep #9509

buu342 opened this issue May 19, 2023 · 23 comments

Comments

@buu342
Copy link

buu342 commented May 19, 2023

Your system information

  • Steam client version (build number or date): Wed, May 17 9:36 PM UTC -08:00. I installed Steam through the deb on Steam's website.
  • Distribution (e.g. Ubuntu): Kubuntu 23.04, running Kernel 6.2 and mesa graphics driver. Hardware is: Ryzen 7 5800X, Radeon 6700XT, 16GB of RAM.
  • Opted into Steam client beta?: [Yes/No] Yes and No (issue happens in both).
  • Have you checked for system updates?: [Yes/No] Yes, I always install updates when they are provided to my system.

Please describe your issue in as much detail as possible:

I've been having this issue ever since I've had this desktop (so almost a year now). I've always run Kubuntu (Ubuntu using KDE Plasma as my DE) on it, starting originally with 22.04 LTS, and then I moved to 22.04 rolling release, and I've basically been keeping the system up to date up until 23.04. Same goes for the kernel, originally starting on 5.26 and I'm currently on 6.2.

When I try to suspend my system, it will fail to do so every now and then. Typically when suspending, the desktop fades to black, leaving only the mouse cursor visible, and then eventually the cursor disappears too and the system goes to sleep. But every now and then, the cursor will not disappear, and eventually the black will fade into my lock screen. I assumed this was a random Kubuntu bug for a while, but I one day got annoyed with the issue and decided to try to figure out why it was happening. I used journalctl -b, and the only information I could find was this:

https://gist.github.com/buu342/822bfa2e433281f288206cb25d893ef6

For reference, here is a successful suspend:

https://gist.github.com/buu342/8e8da5f40158da2ec309fe420dce9960

I doesn't seem to tell me anything interesting. I then tried killing different applications and suspending each time. The key was killing Steam. The past two months, whenever my system randomly decides to not sleep, I exit Steam (I have to wait until the Steam process is completely dead) and then suspend will work without flaw. I haven't been able to figure out why it happens specifically. Steam has managed to suspend without problems during updates or shader precaches, but will fail to suspend when it seems to be completely idle. It seems utterly random, which sucks because it makes harder for me to provide a minimal reproducible example.

Steps for reproducing this issue:

  1. Try to suspend the system
  2. It does not
  3. Login and kill the Steam process
  4. System suspends without issues
@buu342
Copy link
Author

buu342 commented May 19, 2023

If there are any other logs worth sharing besides journalctl, let me know and I'll post them as soon as the system fails to suspend again.

@buu342
Copy link
Author

buu342 commented May 22, 2023

Ok, minor update. I have confirmation that it really is Steam that is blocking sleep, straight from KDE's power manager:
image

It might be possible this is a duplicate of #5607

@A-UNDERSCORE-D
Copy link

Seeing this as well, its stopping my (KDE, OpenSUSE Tumbleweed) machine from auto-locking. Even when steam is minimised to the tray

@kisak-valve Appears this covers more than just Ubuntu. Maybe a KDE thing?

@buu342 buu342 changed the title Steam sometimes prevents Ubuntu from going to sleep Steam sometimes prevents KDE from going to sleep May 28, 2023
@buu342
Copy link
Author

buu342 commented May 28, 2023

Updated title to reflect that 🙂

@Nitrousoxide
Copy link

This seems to be happening for me too on Fedora in Gnome. Killing steam will let the computer sleep.

@buu342
Copy link
Author

buu342 commented Jun 21, 2023

Ok, so it's not just KDE then? It's just straight up: Steam prevents Linux from going to sleep.

@DarSin1
Copy link

DarSin1 commented Jun 22, 2023

Confirmed here as well. EndeavourOS-KDE.

@Nitrousoxide
Copy link

My computer seems to be able to sleep again after I untoggled "Enable GPU accelerated rendering in web views (requires restart) under Settings -> Interface.

I have an amd gpu so drivers shouldn't be an issue in Linux.

@buu342
Copy link
Author

buu342 commented Jun 26, 2023

That's interesting. I have noticed that if I open steam and browse the community tab, in around a minute, KDE will report that Steam is inhibiting sleep. So I always had an inkling it was related to the web browser somewhat. However, I have gotten this inhibition without using the browser, so I didn't put it in the OP. I'll try toggling the GPU acceleration and see if that helps.

@buu342
Copy link
Author

buu342 commented Jul 1, 2023

Unfortunately, no dice on my end.

@Nitrousoxide
Copy link

yeah it's not fixed it for me now either so who knows. Closing steam still seems to let the system sleep though so I'm still pretty sure that's it.

@Nitrousoxide
Copy link

It seems to have fixed itself now? Perhaps it was something to do with the animation running for the summer sale? With that gone in the store page it now seems like the computer can correctly sleep even with steam open.

@buu342
Copy link
Author

buu342 commented Jul 17, 2023

It seems to have fixed itself now? Perhaps it was something to do with the animation running for the summer sale? With that gone in the store page it now seems like the computer can correctly sleep even with steam open.

No dice here, unfortunately. Still buggered.

@DataCpt
Copy link

DataCpt commented Aug 19, 2023

I tried launching steam and leaving it alone. Still prevents sleep.

@JohnMcLear
Copy link

Ubuntu too

jose@ryzin:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1692784843.604859 sender=:1.43 -> destination=:1.1420 serial=37596 reply_serial=2
   array [
      object path "/org/gnome/SessionManager/Inhibitor4941"
      object path "/org/gnome/SessionManager/Inhibitor169"
   ]
jose@ryzin:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager/Inhibitor169 org.gnome.SessionManager.Inhibitor.GetAppId
method return time=1692784857.675175 sender=:1.43 -> destination=:1.1422 serial=37605 reply_serial=2
   string "Steam"
jose@ryzin:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager/Inhibitor4941 org.gnome.SessionManager.Inhibitor.GetAppId
Error org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/gnome/SessionManager/Inhibitor4941”
jose@ryzin:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1692784871.083863 sender=:1.43 -> destination=:1.1424 serial=37607 reply_serial=2
   array [
      object path "/org/gnome/SessionManager/Inhibitor169"
      object path "/org/gnome/SessionManager/Inhibitor4942"
   ]
jose@ryzin:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager/Inhibitor4942 org.gnome.SessionManager.Inhibitor.GetAppId
method return time=1692784875.939375 sender=:1.43 -> destination=:1.1425 serial=37608 reply_serial=2
   string "Steam"
jose@ryzin:~$ 

And for some reason it's creating new AppId's periodically.

@JohnMcLear
Copy link

My computer seems to be able to sleep again after I untoggled "Enable GPU accelerated rendering in web views (requires restart) under Settings -> Interface.

I have an amd gpu so drivers shouldn't be an issue in Linux.

Mine is untoggled and I have this issue so I'm sceptical that's the cause or solution.

@gwaewion
Copy link

Arch+KDE. The same issue.

@gabevenberg
Copy link

not just a kde thing, seeing on arch+i3 as well.

@buu342 buu342 changed the title Steam sometimes prevents KDE from going to sleep Steam sometimes prevents system from going to sleep Nov 29, 2023
@credomane
Copy link

In the past I could just make sure that Steam client was on the library tab and this was a "non-issue", if you will. However either my update to KDE6 or one of steam's march updates (or perhaps a mixture of both?) this "trick" of staying on the library tab work around to no longer solve the issue. Now my computer will refuse to go to sleep unless I completely exit steam.

EndeavourOS w/ KDE6.

@stardude900
Copy link

Fedora39 + Cinnamon with Kernel 6.8, same problem.

@samwcoulter
Copy link

Ubuntu 22.04 and i3wm, same issue.

@aaannestad
Copy link

aaannestad commented Jun 7, 2024

Been experiencing the same bug for many months on Manjaro and Arch. Running systemctl suspend manually works just fine, but as long as Steam is running, the system will never automatically suspend itself.

I don't suppose anyone knows any workarounds? (beyond 'manually shut down Steam whenever you're not playing a game')

@materemias
Copy link

for arch based systems there is a workaround in the AUR: steam-screensaver-fix

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