Bug 506651 - Panels and widgets hanging with __GL_SYNC_TO_VBLANK=1 set in environment
Summary: Panels and widgets hanging with __GL_SYNC_TO_VBLANK=1 set in environment
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: 6.4.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-05 19:52 UTC by kde
Modified: 2025-09-24 20:56 UTC (History)
3 users (show)

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


Attachments
lournal.log containing stack straces of threads after SIGQUIT (37.32 KB, text/x-log)
2025-07-05 19:52 UTC, kde
Details
strace output of plasmashell session (zstd) (2.37 MB, application/zstd)
2025-07-05 19:53 UTC, kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2025-07-05 19:52:43 UTC
Created attachment 182984 [details]
lournal.log containing stack straces of threads after SIGQUIT

SUMMARY
Panels and widgets get unresponsive. Time display is frozen. Can't switch to applications by clicking on task panel.

STEPS TO REPRODUCE
1. Most likely reproducible for me: Add a timer widget next to a clock widget on a panel.
2. Click and mouse move on both of them like crazy for a few seconds

OBSERVED RESULT
Time widget (seconds are displayed) frozen
All panels and widgets unresponsive.
All other applications not affected.

EXPECTED RESULT
No hang of plasmashell process.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.4-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 4060 Ti

ADDITIONAL INFORMATION
XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=KDE
WAYLAND_DISPLAY=wayland-0

Some static ENVs for forcing pure wayland and which avoided flickering in the past. Will test unsetting them.

# Enable Wayland
QT_QPA_PLATFORM="wayland;xcb"
SDL_VIDEODRIVER="wayland,x11"
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
KWIN_TRIPLE_BUFFER=0

# Debugging
QT_LOGGING_RULES="qt.qpa.*=true;qt.wayland.*=true"
QT_DEBUG_PLUGINS=1

Does not help:
KWIN_DRM_USE_MODIFIERS=0
QT_WAYLAND_DISABLE_WINDOWDECORATION=1

Workaround which helps:
QT_QUICK_BACKEND=software

I just know and understand threads in Python.
Strace output of plasmashell process told me that the main thread suddenly does not realease a futex of a another thread.

Full strace log attached. Just added some comments "^# " and renamed some thread numbers to "115775_Main, 115777_Hanger" for readability.
Also attached a dumped stack trace of threads.
Comment 1 kde 2025-07-05 19:53:46 UTC
Created attachment 182985 [details]
strace output of plasmashell session (zstd)
Comment 2 kde 2025-09-24 20:52:56 UTC
Just found another bunch of environment variables hiding in /etc/environment

This old tweak coming from old and painful NVidia troubleshooting days got forgotten and causes the hangs on plasmashell:
__GL_SYNC_TO_VBLANK=1

It's clearly reproducible with:
$ __GL_SYNC_TO_VBLANK=1 plasmashell

Still kind of a bug but doesn't affect many people probably? I'll close the topic for now.

Thank you!
Comment 3 Nate Graham 2025-09-24 20:56:12 UTC
Thanks, good find!