Bug 457206 - Plasma hangs when launching a native game
Summary: Plasma hangs when launching a native game
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: XembedSNIProxy (show other bugs)
Version: 5.25.3
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-27 15:11 UTC by Jannis Göing
Modified: 2023-09-03 03:45 UTC (History)
4 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 Jannis Göing 2022-07-27 15:11:45 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

When I launch a native game, like CS:GO or Transport Fever Two, my entire Desktop crashes/hangs. Sometimes I can get krunner up but not always and I can still use shortcuts to launch e.g. Dolphin and Konsole most of the time. However the panels are entirely frozen and cannot be interacted with, the wallpaper does not get repainted and keeps displaying the window content that was last visible. This problem occurs only with native games and not with wine/proton games. it takes some time but after exiting the game everything returns to normal.

STEPS TO REPRODUCE
1. Login to Plasma (Nvidia, X11)
2. Launch Steam
3. Start a Proton Game - everything is fine
4. Start a native Game
5. Try to open kickoff or klick on the taskbar - nothing happens - time stops updating

OBSERVED RESULT

Nothing can be clicked on the panels, everything on the panels stops updating. Alt+Tab still works though. Wallpapers stop drawing. Shortcuts like Ctrl+Alt+T still work and Konsole still launches. Sometimes i can get krunner up and use it to launch other applications - that still works fine.

EXPECTED RESULT

The Panels should continue to work as always.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch (up to date as of 27.07.2022) Kernel 5.18.14-arch1-1 Plasma 5.23.3
(available in About System)
KDE Plasma Version: Plasma 5.23.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION

Occured with nvidia and nvidia-open drivers. cold not be reproduced on a laptopn with amd graphics. Logs seem to be all fine, could not find any errors that were thrown while this happens
Comment 1 Jannis Göing 2022-07-27 15:15:46 UTC
This seems to be circumventable by turning of "Allow Apps to disable compositing" - but games like CS:GO are not enjoyable like this, the games feels like running at 30/60hz when this is turned on (eventough fps is high) on a 144hz Monitor. As soon as it is turned off and the game restarted, the game runs great but the problems with the panels comes back.
Comment 2 Nate Graham 2022-07-27 20:06:36 UTC
> my entire Desktop crashes/hangs
Hangs and crashes are different things. If something is crashing, what specifically is the process crashing? We also need a backtrace of it so we can figure out what's going on. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports.

Or is nothing crashing, and what you're seeing is a hang?
Comment 3 Jannis Göing 2022-07-27 20:33:46 UTC
I think it just hangs, since I also could find any error and it  recovers completely most of the times after the game is closed.

I'll see if I can Figure out a useful backtrace.
Comment 4 Jannis Göing 2022-07-28 13:01:24 UTC
It really seems to not be crashing, so i don't know how/if i can get a backtrace. It seems that whenever compositing is blocked (i guess wine/proton games on't block compositing?) the panels are completely frozen.

https://nextcloud.jannis-goeing.de/s/dN8P2YCRgt9mr6p <- this is a demonstration of what's happening. First try ist with "allow blocking compositing" disabled and alkl works fine and then i disable it again and try again. And a few seconds after closing it, it recovers
Comment 5 Jannis Göing 2022-07-28 13:02:58 UTC
(In reply to Jannis Göing from comment #4)
> It really seems to not be crashing, so i don't know how/if i can get a
> backtrace. It seems that whenever compositing is blocked (i guess
> wine/proton games on't block compositing?) the panels are completely frozen.
> 
> https://nextcloud.jannis-goeing.de/s/dN8P2YCRgt9mr6p <- this is a
> demonstration of what's happening. First try ist with "allow blocking
> compositing" disabled and alkl works fine and then i disable it again and
> try again. And a few seconds after closing it, it recovers

https://nextcloud.jannis-goeing.de/s/DXi6NPWa3YbdKWo * korrekt link
Comment 6 Jannis Göing 2022-07-28 18:58:22 UTC
After some troubleshooting and dogging, seems that running killall xembedsniproxy did the trick, after that it's no longer freezing. i only looked for logs that were somewhere visibly kde related but then i stumbled over many many messages in journalctl that were related to this, saying 'xembedsniproxy[4135]: Container window visible, stack below' but there was no stack and no other message.
Comment 7 Nate Graham 2022-07-29 15:34:40 UTC
Thanks for the info!
Comment 8 Jannis Göing 2022-08-10 05:10:57 UTC
This seems to also be resolved when quitting all applications with tray icons (presumably that use xembedsniproxy). As soon as i start one again, like Bitwarden, the issue immediately returns. Might be related to https://bugs.kde.org/show_bug.cgi?id=425271 ?
Comment 9 Noah Davis 2023-08-04 01:58:58 UTC
Is this still a problem? I have xembedsniproxy running in the background, but experienced no hangs or crashes with Plasma 5.26.1 on the Steam Deck while loading Left 4 Dead 2, Terraria and Kerbal Space Program. I experienced hangs while loading Left 4 Dead 2, but I'm pretty sure that was because of a sudden spike in storage read/write rates (more of an issue with the way a game loads and how the kernel handles the load).
Comment 10 Bug Janitor Service 2023-08-19 03:45:17 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2023-09-03 03:45:21 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!