Bug 494839 - kwin_wayland crash with external monitor on hybrid GPU system
Summary: kwin_wayland crash with external monitor on hybrid GPU system
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.2.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-16 04:00 UTC by sunghwan
Modified: 2024-10-16 21:35 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.1.1-1
Sentry Crash Report:


Attachments
It looks like the relevant log starts in line 2136. (659.97 KB, text/plain)
2024-10-16 04:00 UTC, sunghwan
Details
Journal of the crash (1.17 MB, text/plain)
2024-10-16 06:09 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunghwan 2024-10-16 04:00:05 UTC
Created attachment 174869 [details]
It looks like the relevant log starts in line 2136.

SUMMARY
Kwin_wayland is not working with an external monitor on hybrid GPU system (intel, nvidia)

STEPS TO REPRODUCE
1. internal monitor is connected to iGPU(intel)
2. external monitor is connected to dGPU(nvidia)
3. login to wayland session

OBSERVED RESULT
kwin_wayland is not working

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
Manufacturer: Acer
Product Name: Predator PHN16-71
System Version: V1.18

ADDITIONAL INFORMATION
Nvidia driver: 560.35.03-13
kwin is working when only one GPU is connected to both internal and external monitors.
Comment 1 Evert Vorster 2024-10-16 06:09:33 UTC
Created attachment 174874 [details]
Journal of the crash

It happens on my system too. 
External Monitor connected, kwin_wayland crashes. The journal is attached with this comment. It's a bit wordy, but there is some backtraces and coredumps in there. 
For reference, the journal is from boot. I tried to log in exactly once with a Wayland session, and then logged in with an X11 session. 

About this system:
Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.1-arch1-1.1-g14 (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 7945HX3D with Radeon Graphics
Memory: 62.0 GiB of RAM
Graphics Processor: AMD Radeon 610M
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Strix G733PYV_G733PYV
System Version: 1.0
Comment 2 sunghwan 2024-10-16 06:12:50 UTC
(In reply to sunghwan from comment #0)
> Created attachment 174869 [details]
> It looks like the relevant log starts in line 2136.
> 
> SUMMARY
> Kwin_wayland is not working with an external monitor on hybrid GPU system
> (intel, nvidia)
> 
> STEPS TO REPRODUCE
> 1. internal monitor is connected to iGPU(intel)
> 2. external monitor is connected to dGPU(nvidia)
> 3. login to wayland session
> 
> OBSERVED RESULT
> kwin_wayland is not working
> 
> SOFTWARE/OS VERSIONS
> Operating System: Arch Linux 
> KDE Plasma Version: 6.2.1
> KDE Frameworks Version: 6.7.0
> Qt Version: 6.8.0
> Kernel Version: 6.11.3-arch1-1 (64-bit)
> Graphics Platform: Wayland
> Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
> Memory: 31.1 GiB of RAM
> Graphics Processor: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
> Manufacturer: Acer
> Product Name: Predator PHN16-71
> System Version: V1.18
> 
> ADDITIONAL INFORMATION
> Nvidia driver: 560.35.03-13
> kwin is working when only one GPU is connected to both internal and external
> monitors.

Downgrading kwin to 6.2.0 fixed this issue.
Comment 3 sunghwan 2024-10-16 06:40:41 UTC
After reverting commit https://invent.kde.org/plasma/kwin/-/commit/446423407104461c9936c107616ccec7b2432867, external monitor is working. But mouse cursor on external monitor disappeared.
Mouse is working again after reverting commit https://invent.kde.org/plasma/kwin/-/commit/72f1dd2af31659ea076c13bd6a5aaa686edde0b7.
Comment 4 Poci 2024-10-16 12:08:04 UTC
Can reproduce, and also confirm downgrading kwin to 6.2.0 resolves it. Should mention that it's taking now plenty more seconds for my KDE to transit from SDDM to my desktop, no matter if X11 or Wayland, kwin 6.2.0 or 6.2.1.

On hybrid GPU laptop too, CPU is i7-7700HQ and GPU, GTX1050 Ti.
Comment 5 Lee Zongze 2024-10-16 14:45:14 UTC
It happens on my system too. 
External Monitor connected, kwin_wayland crashes.

Intel(UHD Graphics)
Nvidia(GeForce RTX 2070 Mobile / Max-Q Refresh)

Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Core™ i7-10875H CPU @ 2.30GHz
Memory: 62.7 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: GIGABYTE
Product Name: AERO 15 WB
Comment 6 Zamundaaa 2024-10-16 14:54:51 UTC
This has been fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/6636

(In reply to sunghwan from comment #3)
> After reverting commit
> https://invent.kde.org/plasma/kwin/-/commit/
> 446423407104461c9936c107616ccec7b2432867, external monitor is working. But
> mouse cursor on external monitor disappeared.
> Mouse is working again after reverting commit
> https://invent.kde.org/plasma/kwin/-/commit/
> 72f1dd2af31659ea076c13bd6a5aaa686edde0b7.
Yeah, sorry about that. https://invent.kde.org/plasma/kwin/-/merge_requests/6641 fixes that, and then we'll respin KWin to get those fixes released ASAP.
Comment 7 qmaru99 2024-10-16 17:54:50 UTC
Same think here

Operating System: EndeavourOS 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-arch1-1 (64-bit)
Graphics Platform: X11 (as the wayland is borked rn)
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 62.0 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: ASUS