Bug 431062 - KDE does not detect a second monitor with NVidia/AMDGPU multigpu
Summary: KDE does not detect a second monitor with NVidia/AMDGPU multigpu
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 13:28 UTC by Robert-André Mauchin
Modified: 2021-06-13 22:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert-André Mauchin 2021-01-02 13:28:34 UTC
SUMMARY
I have a laptop with multi gpu, an integrated AMD Renoir and a dedicated NVidia RTX. The external display HDMI and DisplayPort are connected through the dedicated Nvidia gpu while the laptop display is connected to the integrated AMD one.

With both Nvidia proprietary drivers and Nouveau, the external screens are not detected.

Related to https://bugs.kde.org/show_bug.cgi?id=425586 but with Nvidia instead of AMD dedicated GPU.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 33 
Kernel: 5.9.15
(available in About System)
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.2

$ kscreen-doctor -o
Output: 1 BOE eDP-1-unknown enabled connected primary Panel Modes: 0:1920x1080@144*! 1:1680x1050@144 2:1280x1024@144 3:1440x900@144 4:1280x800@144 5:1280x720@144 6:1024x768@144 7:800x600@144 8:640x480@144 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 primary
Comment 1 Zamundaaa 2021-01-05 22:58:00 UTC
We can't really do anything about the proprietary driver at the moment but it should be possible to make Noveau work.

Note that you do need to run KWin from master, make sure your session actually uses it (just saying because you're stating Plasma version 5.20.4). 

To get the debug output you will need to pass the environment variable
QT_LOGGING_RULES="kwin_*.debug=true"
to KWin, the easiest way to do that is probably to just put that line into /etc/environment and reboot. Then log into the wayland session and upload ~/.local/share/sddm/wayland-session.log
Comment 2 Robert-André Mauchin 2021-03-07 10:43:54 UTC
(In reply to Zamundaaa from comment #1)
> We can't really do anything about the proprietary driver at the moment but
> it should be possible to make Noveau work.
> 
> Note that you do need to run KWin from master, make sure your session
> actually uses it (just saying because you're stating Plasma version 5.20.4). 
> 
> To get the debug output you will need to pass the environment variable
> QT_LOGGING_RULES="kwin_*.debug=true"
> to KWin, the easiest way to do that is probably to just put that line into
> /etc/environment and reboot. Then log into the wayland session and upload
> ~/.local/share/sddm/wayland-session.log

I haven't found that file and journalctl doesn't report anything related.

Note that the external screen doesn't work either with Xorg so it might be another problem altogether.
Comment 3 Bug Janitor Service 2021-05-23 21:11:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1031
Comment 4 Zamundaaa 2021-06-07 11:20:30 UTC
Git commit cfd7af01795af365cbaa6aea11a3b2009bbbd3c8 by Xaver Hugl.
Committed on 07/06/2021 at 07:23.
Pushed by zamundaaa into branch 'master'.

platforms/drm: support NVidia as secondary GPU with CPU copy

M  +1    -1    src/plugins/platforms/drm/abstract_egl_drm_backend.h
M  +32   -20   src/plugins/platforms/drm/drm_backend.cpp
M  +8    -10   src/plugins/platforms/drm/drm_output.cpp
M  +1    -1    src/plugins/platforms/drm/dumb_swapchain.cpp
M  +8    -3    src/plugins/platforms/drm/egl_gbm_backend.cpp
M  +1    -1    src/plugins/platforms/drm/egl_gbm_backend.h
M  +11   -8    src/plugins/platforms/drm/egl_multi_backend.cpp
M  +1    -2    src/plugins/platforms/drm/egl_multi_backend.h
M  +130  -88   src/plugins/platforms/drm/egl_stream_backend.cpp
M  +7    -4    src/plugins/platforms/drm/egl_stream_backend.h

https://invent.kde.org/plasma/kwin/commit/cfd7af01795af365cbaa6aea11a3b2009bbbd3c8
Comment 5 Zamundaaa 2021-06-13 22:09:13 UTC
Git commit 5363451eae46aa87c4fffb27a197c2902f67e817 by Xaver Hugl.
Committed on 13/06/2021 at 21:06.
Pushed by zamundaaa into branch 'Plasma/5.22'.

platforms/drm: support NVidia as secondary GPU with CPU copy
(cherry picked from commit cfd7af01795af365cbaa6aea11a3b2009bbbd3c8)

M  +1    -1    src/plugins/platforms/drm/abstract_egl_drm_backend.h
M  +32   -20   src/plugins/platforms/drm/drm_backend.cpp
M  +8    -10   src/plugins/platforms/drm/drm_output.cpp
M  +8    -3    src/plugins/platforms/drm/egl_gbm_backend.cpp
M  +1    -1    src/plugins/platforms/drm/egl_gbm_backend.h
M  +11   -8    src/plugins/platforms/drm/egl_multi_backend.cpp
M  +1    -2    src/plugins/platforms/drm/egl_multi_backend.h
M  +130  -88   src/plugins/platforms/drm/egl_stream_backend.cpp
M  +7    -4    src/plugins/platforms/drm/egl_stream_backend.h

https://invent.kde.org/plasma/kwin/commit/5363451eae46aa87c4fffb27a197c2902f67e817