Bug 498245 - Plasma will suspend as "idle" even if a game is running
Summary: Plasma will suspend as "idle" even if a game is running
Status: RESOLVED DUPLICATE of bug 328987
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.2.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-04 11:58 UTC by Damglador
Modified: 2025-01-06 17:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damglador 2025-01-04 11:58:42 UTC
SUMMARY
From my understanding locking from suspend happens by an app sending a signal to do so. Steam and YouTube Music (modded) do that, but let's be realistic, there isn't a world where all apps will do that. Currently even games running through Proton is Steam will be just ignored and the system will be suspended, same for Minecraft. That is not a big deal for single player games, but if you're hosting a server or joined to one, suspend will cause the connection to go down and all clients or you will be disconnected from the server.

I know it won't happen if I am actively playing the game, but I prefer my system to suspend after 30 minutes of idle time. Sometimes I have to AFK for some time, if I host a server in Vintage Story or Minecraft, I have to leave my game running for friends, but it’s not impossible I'm going to be AFK for 30 minutes, and in case I will, the system will just suspend taking down the game with the server, and that is pretty inconvenient. Manually locking the system from suspending is a way to work around this, but I think a regular user would expect their system to not suspend with a game running.

Possible solutions:
- Don't suspend if GPU is heavily used
- Don't suspend if on a laptop dGPU is used (since on desktop only iGPU is used)
- Don't suspend if any sound is playing on system as suggested by other bug report
- Don't suspend if OpenGL or Vulkan rendering is used

STEPS TO REPRODUCE
1. Send "Idle" behavior to suspend after 1 minute
2. Launch Minecraft or any Steam game (I tested with Balatro)
3. Wait until it suspends

OBSERVED RESULT
It suspends after 1 minute

EXPECTED RESULT
System should keep running

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.2.4 
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-01-06 17:50:08 UTC

*** This bug has been marked as a duplicate of bug 328987 ***
Comment 2 Nate Graham 2025-01-06 17:51:04 UTC
That's assuming you're using a game controller. If not, then this is intentional and unavoidable behavior if the game doesn't inhibit.