Hello @My1, this issue goes back to https://github.com/ValveSoftware/steam-for-linux/issues/1693 and is not limited to games run with Proton. Leaving open for now to see if a Proton dev wants to consider doing something in Proton or if it makes more sense for Steam to be responsible for inhibiting power management.
well imo steam should do its own management for example during BPM screens however needed (for example during controller input but also on phases where you wont expect the user to input anything, like watching a video) but for how to do the fun in a game especially one that isnt from linux there may be other ways to decide how to do energy management, especially as it might not be obvious from the outside when a game is in a section where you have an "I want to be awake" situation
there are basically 4 ways of handling it in games:
1 is obiviously the crudest way of doing it, but at least surely won't fail
2 is much better but depends on the fact how much data about the window status proton and/or steam recieves
3 is an intresting one but may get ugly when you are in a cutscene which doesnt need input
4 is obviously the best one at least IF a game uses those signals for windows already, as it will have set the triggers for when to do the override just at the right places, which cant be easily done from the outside.
for proton games I would go with 4 if a game sends those signals around and 2 if not (but that also only if the user is using a gamepad, otherwise m/kb will do the keepalive already.
This should be able to be done universally by Freedesktop standards instead of per-distro or per-desktop-environment.
That should make the work load of doing this a lot easier.
However, one should note all the desktop-environment extensions to the standards to give nice pretty suspension images.
It might be worth doing this as part of the Steam Client instead.
well I am not aware of how other distros deal with this so I primarily mentioned Kubuntu where I have seen that there is a way. if there is one way to have many distros have fun with this, then even better
I have the same problem with Fedora. Screen is randomly dimming out for no reason when playing at full screen.
Feature Request
I confirm:
contain this feature already.
Description
Programs in Kubuntu (and possibly other distributions, I don't know) have the ability to override the energy management, for example vivaldi while playing audio when watching a youtube video.
when playing games Kubuntu, similar to windows doesn't see controller input as an "action" thereby if an application there the user only uses controller input doesnt tell the system to stay awake, energy management may kick in and may dim/turn off the screen at best or go into standby/hibernation (which disconnections online parties) at worst
Risks
if done improperly it's obviously bad for the battery life of a laptop or the power consumption of the system, but at the very least using controller inputs as an "awake ping" or just relaying the application's signals for the energy management of Windows towards the linux system would make it relatively free of problems in my opinion.