After updating openSUSE Tumbleweed from Plasma 6.7 to 6.8, my desktop occasionally freezes for 1–2 seconds. Both my USB mouse and laptop trackpad stop responding, and the CPU monitoring widget on my desktop also stops updating during the freeze.
I have been running on Wayland and Intel GPU for quite a while now without issues. It was first after the upgrade I got this freeze issue.
My laptop has Intel and NVIDIA graphics, using i915 and Nouveau respectively. NVIDIA’s proprietary driver is not installed. Kernel: 7.2.11-1-default.
Each freeze coincides with this journal message:
kwin_wayland: The main thread was hanging temporarily!
At session startup, I also see:
MESA: error: ZINK: failed to choose pdev
drmSetClientCap for Atomic Mode Setting failed. Using legacy mode on GPU "/dev/dri/card0"
I was already using Wayland under Plasma 6.7 without these issues, so this isn’t caused by switching from X11 to Wayland. Could changes associated with retiring the X11 session have introduced a regression affecting existing Wayland users?
Is this a known regression? What additional information would help diagnose it?
glxinfo -B
name of display: :1
display: :1 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) UHD Graphics (TGL GT1) (0x9a60)
Version: 26.2.4
Accelerated: yes
Video memory: 31753MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (TGL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 26.2.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 26.2.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 26.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
When the freeze happens those journalctl command does not show anything new
okt. 20 09:10:14 AAP-CND2081462 kernel: [drm] Initialized nouveau 1.4.2 for 0000:01:00.0 on minor 0
okt. 20 09:10:14 AAP-CND2081462 kernel: nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
okt. 20 09:10:14 AAP-CND2081462 kernel: nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
okt. 20 09:10:14 AAP-CND2081462 kernel: nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
okt. 20 08:33:23 AAP-CND2081462 kernel: usb 3-8: reset full-speed USB device number 4 using xhci_hcd
okt. 20 08:37:01 AAP-CND2081462 kernel: usb 3-8: reset full-speed USB device number 4 using xhci_hcd
The output from this journalctl showa after each freeze journalctl --user -b -u plasma-kwin_wayland.service --no-pager -n 150
okt. 20 08:40:43 AAP-CND2081462 kwin_wayland[2453]: The main thread was hanging temporarily!
I haven’t found a reliable trigger. I’ve noticed freezes while scrolling web pages using keyboard keys, moving the pointer over links, window borders or taskbar icons, and moving it over empty areas.
The whole desktop appears to pause for 1–2 seconds, including my CPU monitoring widget. Each freeze coincides with “The main thread was hanging temporarily!” in KWin’s journal.
It also happens with the external monitor disconnected. I haven’t established any correlation with video playback, desktop effects, or waking from sleep.
The startup error you noted MESA: error: ZINK: failed to choose pdev drmSetClientCap for Atomic Mode Setting failed. Using legacy mode on GPU "/dev/dri/card0"
may be the crux of the issue here.
KWin or Mesa attempts to probe all available DRM nodes on the system. When a laptop is running with hybrid graphics, the idle discrete GPU suspends to a deep power-saving state. During the periodic polling of the graphics devices, it triggers the idle (NVIDIA) GPU to wake up, and as KWin handles this on its main rendering thread, this hardware wake-up block likely freezes your desktop for 1–2 seconds.
From a terminal you could try forcing legacy rendering with export KWIN_DRM_NO_AMS=1 to see if it helps as a quick test, or setting the DRM device explicitly as mentioned in the bug report.
You could try temporarily preventing the NVIDIA GPU from entering power-saving state to see if that makes a difference…
echo on | sudo tee /sys/bus/pci/devices/0000:01:00.0/power/control
If the freezes stop, that would support the theory that waking the discrete GPU is causing the issue. (The change is temporary and will normally reset at reboot.)
Plasma 6.8 includes changes to KWin’s GPU management, so it’s possible that a change in how KWin probes or accesses secondary GPUs has exposed the problem on your system.
Core/gpumanager: add KWIN_RENDER_NODES environment variable. Commit. See bug #521814
“Backends/drm: don’t remove GPUs without outputs” — Fixes bug #519461
“Backends/drm: remove DrmGpu when it becomes inactive”
Good to know. Yes, it is only a workaround, and it may increase power consumption and reduce battery life. (The actual impact depends on the laptop and GPU’s power state.)
Anyway, to make it persistent you could create a udev rule /etc/udev/rules.d/80-nvidia-runtime-pm.rules containing the following entry