| Summary: | kwin_wayland freezes on 2nd GPU hotplug | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Marc Riedel <m.riedel.nrw> |
| Component: | core | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | normal | CC: | haagch.christoph, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 6.5.1 | ||
| Target Milestone: | --- | ||
| Platform: | Debian unstable | ||
| OS: | Linux | ||
| See Also: | https://gitlab.freedesktop.org/mesa/mesa/-/issues/14148 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
journalctl, gdb backtrace
journalctl |
||
|
Description
Marc Riedel
2025-11-04 12:34:30 UTC
Forgot to mention, that when exporting KWIN_DRM_DEVICES="/dev/dri/card0" kwin will not freeze. But it will not be possible to use the discrete GPU for driving a display. Please attach the output of > journalctl --user-unit plasma-kwin_wayland --boot 0 after triggering the freeze. Getting a backtrace of KWin when it's frozen may also be useful: > sudo gdb -p $(pidof kwin_wayland) > bt Created attachment 186670 [details]
journalctl, gdb backtrace
Archlinux with kwin 6.5.2 and 7940HS (Radeon 790M) + 3080Ti eGPU here.
The only thing relevant in the logs seems to be
Nov 10 15:42:34 fw16 kwin_wayland[1458]: Failed to open /dev/dri/renderD129 device (No such device)
Nov 10 15:42:34 fw16 kwin_wayland[1458]: failed to open drm device at "/dev/dri/renderD129"
Race condition perhaps?
Ideally we'd do a better job of filtering out render devices in the first place, but KWin wouldn't use them anyways, as they're not KMS capable, so the warning shouldn't be relevant. That backtrace however shows the freeze is in Mesa - the device select layer specifically, it's waiting for the Wayland compositor to respond, which will hang for obvious reasons. Hi, sorry for the late response, I was on vacation. @Christoph Haag Thank you for reproducing and doing the back trace @Zamundaaa I don't fully understand the answer. My understanding is that nouveau is KMS capable. So what reasons are obvious? Do you need more information? Best regards, Marc When KWin creates a gbm device for the new KMS node, Mesa blocks in a Vulkan layer, waiting for KWin to respond to it through Wayland. So it's making KWin wait on KWin, which just hangs infinitely. Zink had some similar issues before, this needs to be reported at https://gitlab.freedesktop.org/mesa/mesa/-/issues and fixed in Mesa To keep track of the bug in mesa: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14148 Created attachment 186740 [details]
journalctl
I just want to confirm that with merge request https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38252 KWin does not freeze anymore when hot plugging my second GPU. But KWin will hang for a short time (see attachment) |