Bug 482859 - Kwin_wayland crashes when opening a window on a screen connected to a secondary gpu
Summary: Kwin_wayland crashes when opening a window on a screen connected to a seconda...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-08 11:53 UTC by qlum
Modified: 2024-03-15 13:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.2


Attachments
Crash report (73.64 KB, text/vnd.kde.kcrash-report)
2024-03-08 11:53 UTC, qlum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qlum 2024-03-08 11:53:28 UTC
Created attachment 166707 [details]
Crash report

SUMMARY
When opening a program / window on a monitor connected to my GPU kwin crashes. My primary graphics device is integrated graphics, the secondary device is a GPU.


STEPS TO REPRODUCE
1.  Make sure the primary graphics adapter is set to integrated graphics
2.  Have multiple monitors connected, of which at least one to the GPU
3.  Open a window on the monitor connected to the GPU

OBSERVED RESULT
Kwin crashes


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0
Kernel Version: 6.7.8-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600 6-Core Processor
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
The integrated graphics are those from my Ryzen 5 7600
As for graphics cards I have tested multiple, an Nvidia GT 710, AMD HD5450, AMD R5 250, result is the same.

The important part is that the integrated graphics are the primary graphics processor, making the GPU the primary will make everything work fine. The reason the integrated graphics are the primary adapter is because they are simply faster than the alternative in my case. 

My setup uses 5 monitors 4 connected to integrated graphics 1 connected to the GPU

I think it worked fine on plasma 6 rc 2 using my hd5450 as secondary. But broke, upgrading to 6.0.1.

I know it's an edge-case, but it is what I use. 
I attached the crash report, automatic bug reporting and the backtrace somehow failed, so I can't provide those.
Comment 1 Bug Janitor Service 2024-03-08 15:49:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5391
Comment 2 Zamundaaa 2024-03-08 16:27:37 UTC
Git commit f3d9e5c90c2ac9a6363d03ac8021d37823252e0d by Xaver Hugl.
Committed on 08/03/2024 at 16:19.
Pushed by zamundaaa into branch 'master'.

backends/drm: handle dumb buffer target correctly

It's independent of the multi gpu import mode

M  +3    -0    src/backends/drm/drm_egl_layer_surface.cpp

https://invent.kde.org/plasma/kwin/-/commit/f3d9e5c90c2ac9a6363d03ac8021d37823252e0d
Comment 3 Zamundaaa 2024-03-08 17:19:01 UTC
Git commit cc7d71047688bc432fce8747b262510b4fadf624 by Xaver Hugl.
Committed on 08/03/2024 at 17:08.
Pushed by zamundaaa into branch 'Plasma/6.0'.

backends/drm: handle dumb buffer target correctly

It's independent of the multi gpu import mode


(cherry picked from commit f3d9e5c90c2ac9a6363d03ac8021d37823252e0d)

M  +3    -0    src/backends/drm/drm_egl_layer_surface.cpp

https://invent.kde.org/plasma/kwin/-/commit/cc7d71047688bc432fce8747b262510b4fadf624
Comment 4 qlum 2024-03-15 13:17:59 UTC
I just want to add that this is indeed fixed for my use with Plasma 6.0.2.