Bug 459908 - On Wayland, Games will disconnect when not in view
Summary: On Wayland, Games will disconnect when not in view
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.25.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-02 05:28 UTC by deresiant
Modified: 2022-10-11 13:44 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description deresiant 2022-10-02 05:28:11 UTC
SUMMARY
On Wayland, on games, when put into the background e.g. minimised or put onto a different virtual desktop (but still open) the game will often disconnect. 

I'm not sure if this is the cause but: Using glxgears as an example, if putting the glxgears window on a different virtual desktop,  it drops to 1FPS and minimising the glxgears window, it drops to around 58FPS


STEPS TO REPRODUCE
1. run `glxgears` in terminal
2. see that it runs at full fps when in view
3. move it to a different virtual desktop
4. see that it runs at 1FPS
5. minimize the glxgears window
6. see that it runs at around 58FPS
OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-269-tkg-pds (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 550 / 550 Series
Comment 1 deresiant 2022-10-02 05:30:15 UTC
I'm not sure what the expected result is, it could be irrelevent to games disconnecting when not in view, I tested Warframe and Genshin Impact in which both would start to reconnect me (and disconnect me from what i was doing) after the game window was put back on my screen.
Comment 2 Zamundaaa 2022-10-11 13:44:02 UTC
Xwayland throttles applications once they're not shown by the compositor anymore, which is correct behavior - if a game doesn't handle that well, there's nothing good we can do about that.