Bug 439329 - Launching source engine games causes compositor to slow to a crawl after game exits
Summary: Launching source engine games causes compositor to slow to a crawl after game...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.22.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-30 11:24 UTC by Ashcon Mohseninia
Modified: 2023-09-06 10:38 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 Ashcon Mohseninia 2021-06-30 11:24:25 UTC
SUMMARY

I've tried this with multiple source engine 1 games (TF2, HL2, Portal 2), and all exhibit the same behavior, however this is not observed with other games such as cities skylines or KSP (Unity engine).

After launching one of the effected games and playing for a bit, all is smooth. However as soon as the game exits, window dragging and animations are at around 5-10fps. This problem gets worse and worse the more you open and close the effected games. Halting the compositor (ALT+SHIFT+F12) makes the problem go away, however re-enabling the compositor makes everything sluggish once again.

Unticking "Allow applications to block compositing" has no effect on this. Weather its enabled or not, as soon as the game exists a noticeable slow-down is observed.

It should be noted however that during these slow-downs, 3D applications are unaffected (I can re-launch a game whilst having slowdowns and the games are unaffected).

STEPS TO REPRODUCE
1. Open a source engine game
2. Play for a bit, then close it
3. Drag some windows around, it will be far more sluggish than before


OBSERVED RESULT
After the game is closed, the compositor is noticeably slower than prior to launching the game. Repeating steps 1-3 keeps making the compositor slower until the entire system is unusable.

EXPECTED RESULT

Compositor should not drastically slow down after closing a game.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (5.12.13 kernel)
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

SYSTEM INFO:
Razer blade 2018 (i78750HQ + GTX1060)
NVIDIA driver version: 470.42.01
Comment 1 David Edmundson 2023-09-06 10:38:24 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.