Bug 487728 - With NVIDIA GPU, Plasma panel/widgets freeze randomly with explicit sync, can be unfrozen by going into overview
Summary: With NVIDIA GPU, Plasma panel/widgets freeze randomly with explicit sync, can...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.1.3
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 487547 489218 489438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-29 07:51 UTC by kodatarule
Modified: 2024-07-24 00:20 UTC (History)
7 users (show)

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


Attachments
panel screenshot (153.74 KB, image/png)
2024-07-22 13:49 UTC, Landgraf132
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kodatarule 2024-05-29 07:51:40 UTC
SUMMARY
the plasma panel and widgets would randomly freeze when kwin has explicit sync patched in

STEPS TO REPRODUCE
1. use kwin with explicit sync, panel & widgets would randomly freeze, open overview a few times to unfreeze


OBSERVED RESULT
panel & widgets - random freeze

EXPECTED RESULT
To continue working correctly

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.2-273-tkg-eevdf (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3090/PCIe/SSE2

Kwin patched with explicit sync from aur: https://aur.archlinux.org/packages/kwin-explicit-sync
On a side note: this also affects 6.1 beta as well
Comment 1 kodatarule 2024-05-29 11:35:55 UTC
Just wanted to make a note that I was able to test other compositors which do have explicit sync(gnome & gamescope) in their own separate session and neither exhibit any problems. This was the reason I opened a different thread from my previous one and more on what the issue is more correctly.
Comment 2 kodatarule 2024-05-30 03:35:35 UTC
Just a small update, I was able to trigger a reproducible state 100% on plasma 6.1 beta:
Have 2 panels on 2 different monitors, both floating, the one on your second monitor to dodge windows(being hidden underneath them).
Open browser on main monitor where floating panel just maximizes then super+shift+right/left arrow to move it to the monitor where it hides the panel, boom the desktop/widgets/panels freeze and opening overview a few times fixes this state.

I also noticed these in my journalctl
kwin_core: Failed to focus 0x4000034 (error 8)
kwin_core: Failed to focus 0x3800005 (error 3)
kwin_core: Failed to focus 0x3800005 (error 3)
Comment 3 kodatarule 2024-05-30 03:54:51 UTC
Apologies for another reply, but I found an even easier way to reproduce it, launch mpv get it to the screen where the panel dodges windows, make it fullscreen = desktop/panels/widgets/etc have frozen, make it back windowed everything is flawless like in 6.0.5
Comment 4 Zamundaaa 2024-06-03 17:12:05 UTC
I looked into this, and it's hanging in the NVidia driver, which waits for KWin to release a buffer that will only be released once the window is shown. This will need to be fixed in the driver
Comment 5 Nate Graham 2024-07-10 18:20:40 UTC
*** Bug 487547 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2024-07-10 19:16:43 UTC
*** Bug 489218 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-07-10 21:18:06 UTC
*** Bug 489438 has been marked as a duplicate of this bug. ***
Comment 8 Landgraf132 2024-07-22 13:49:15 UTC
Created attachment 171891 [details]
panel screenshot
Comment 9 Landgraf132 2024-07-22 13:49:23 UTC
The panel freezes began to occur less frequently, now only with notifications in Thunderbird (X11 application). But when I restart the plasma (killall -9 plasmashell && plasmashell --replace), I get a completely incorrect display of the panel (functionally everything works and all the icons are actually in their places)
Comment 10 Tom 2024-07-24 00:20:39 UTC
(In reply to Landgraf132 from comment #8)
> Created attachment 171891 [details]
> panel screenshot

This is unrelated to this bug but I can help with it because I also had this after an update. A session file gets confused when switching between X11/Wayland. 
Run: kcmshell6 qtquicksettings and change your settings to "Automatic". When I had the bug it was set to "Software".