Summary: | Games freeze when restarting the monitor they're being displayed on | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Fahim Shahriar <fahimshahriar188> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | kde, nate, oded, xaver.hugl |
Priority: | NOR | Keywords: | multiscreen, wayland |
Version: | 5.27.7 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Screenshot of Display and Monitor settings after turning on the monitor. |
When this happens, are your display settings also reset? e.g. display resolution, scale, refresh rate, position, etc? Or are all of those settings remembered, and the problem is that there's a spike in system load that causes other issues? (In reply to Nate Graham from comment #1) > When this happens, are your display settings also reset? e.g. display > resolution, scale, refresh rate, position, etc? > > Or are all of those settings remembered, and the problem is that there's a > spike in system load that causes other issues? I've tried applying different resolution and refresh rate and seems like all of the settings are remembered, they aren't resetting. And no, I don't see any spike in system load. Okay, so the problem isn't a settings reset and it isn't a load spike. So is the problem a crash, or a system hang, or something else? (In reply to Nate Graham from comment #3) > Okay, so the problem isn't a settings reset and it isn't a load spike. > > So is the problem a crash, or a system hang, or something else? As I've described the issue in the report. It only effects the system when it's under heavy load. The task freezes or crashes. Let me elaborate my thinking. N.B: THE FOLLOWING IS TOTALLY MY UNDERSTANDING. I think when I turn on the monitor, as it initializes a new output, it tries to move everything from the previous display to the new one that it just initialized. It can do it. But when it finds some heavy task like games or something, it can't do it properly. And then the task freezes. Here's a video of the issue if you find it helpful: https://youtu.be/iInDMAs63Kw Thanks for the video, it helps. To make sure I'm understanding it properly: when you are playing a full-screen game and you turn off your screen and then turn it on again, the game has stopped responding to input, and the Plasma Panel has inappropriately appeared on top of it, at the bottom of the screen. Is that correct? (In reply to Nate Graham from comment #5) > Thanks for the video, it helps. > > To make sure I'm understanding it properly: when you are playing a > full-screen game and you turn off your screen and then turn it on again, the > game has stopped responding to input, and the Plasma Panel has > inappropriately appeared on top of it, at the bottom of the screen. > > Is that correct? For the specific game in the video, yes. For other games or tasks, the behavior can be different. But in all cases, the game or task freezes. > game has stopped responding to input And a small correction, just "game has stopped responding to input" - it's not like that. The game is completely frozen. The visuals as well. (In reply to Nate Graham from comment #5) > full-screen game and you turn off your screen and then turn it on again And it doesn't matter if the game is full-screen or not. It happens even if the game is windowed. (In reply to Fahim Shahriar from comment #7) > And it doesn't matter if the game is full-screen or not. It happens even if > the game is windowed. When the game is not full-screen, and you encounter this behavior - is the plasma panel frozen or maybe it disappears and reappears? (In reply to Oded Arbel from comment #8) > (In reply to Fahim Shahriar from comment #7) > > And it doesn't matter if the game is full-screen or not. It happens even if > > the game is windowed. > > When the game is not full-screen, and you encounter this behavior - is the > plasma panel frozen or maybe it disappears and reappears? No. Panel is working fine when I do it. Ok, so the issue happens with that game, whether fullscreen or windowed. Does it happen with any other games, either fullscreen or windowed? Or just that one? Or just a few select games? Does it happen with any fullscreen windows that are not games, such as Firefox? (In reply to Nate Graham from comment #10) > Ok, so the issue happens with that game, whether fullscreen or windowed. Yes. > Does it happen with any other games, either fullscreen or windowed? Or just > that one? Or just a few select games? I've tested it with several games. It happens with every game. > Does it happen with any fullscreen windows that are not games, such as > Firefox? No. But the focus of any fullscreen window is lost when I do it. Here's a video which explains the situation: https://youtu.be/wQJ_GW4Eg6U Ok, thanks. Moving to KWin for further investigation. Windows losing focus is caused by plasmashell creating a new desktop window, which steals focus away (https://invent.kde.org/plasma/kwin/-/merge_requests/4349). > EXPECTED RESULT > It should resume the display from where it has been left off. Shouldn't reload the settings Your monitor is getting disconnected and reconnected. The system can't not react to that. Let's focus on the actual problem at hand: the game freezes. I tested this situation with a few games myself and I can somewhat confirm this: - The Entropy Center becomes completely black and doesn't react to inputs / has to be killed - CS:GO continues to work just fine - Red Dead Redemption becomes black and doesn't react to inputs - Horizon Zero Dawn freezes with part of the window becoming black, after minimize+maximize also completely black, and also doesn't react to inputs - Xonotic continues to work just fine The pattern I see here is that all affected games are using Proton, and it looks like there's already a bug report about this sort of thing for it: https://github.com/ValveSoftware/Proton/issues/7021 |
Created attachment 161222 [details] Screenshot of Display and Monitor settings after turning on the monitor. SUMMARY When I turn off my monitor by pressing the physical button on it, then turn it back on, Plasma detects a new display output and reloads the display settings. I know this by checking "Display and Monitor settings", where I see a new popup saying "A new output has been added. Settings has been reloaded". STEPS TO REPRODUCE - From a running system, turn off the monitor and turn it back on. OBSERVED RESULT Plasma is initializing a new display output and reloading all of the settings. The problem with it is that if some heavy task is running, like a game, restarting the monitor results in freezing or sometimes even crashing the task. Sometimes the whole desktop crashes and restarts itself. And sometimes (rarely) the whole system freezes and becomes unusable. Need to reboot in order to make it usable again. EXPECTED RESULT It should resume the display from where it has been left off. Shouldn't reload the settings. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20230823 KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.109.0 Qt Version: 5.15.10 Kernel Version: 6.4.11-1-default (64-bit) Graphics Platform: Wayland Processors: 4 × AMD Ryzen 3 3200G with Radeon Vega Graphics Memory: 13.5 GiB of RAM Graphics Processor: AMD Radeon Vega 8 Graphics Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C52 System Version: 1.0 ADDITIONAL INFORMATION - Unplugging the monitor should result in a same behavior, but I haven't tested it. - I haven't tested it on multi-monitor. - The issue is present on both Wayland and X11 session. - I'm using HDMI for display output. - Have tested on Fedora and openSUSE. Problem persists.