Created attachment 188654 [details] optimus-manager.log SYSTEM - Operating System: Zenned - KDE Plasma Version: 6.5.5 - KDE Frameworks Version: 6.22.0 - Qt Version: 6.10.1 - Kernel Version: 6.18.5-zen1-1-zen (64-bit) - Graphics Platform: Wayland - Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz - Memory: 16 GiB of RAM (15.5 GiB usable) - Graphics Processor 1: Intel® UHD Graphics - Graphics Processor 2: NVIDIA GeForce GTX 1650 DESCRIPTION On Optimus graphics, without Optimus Manager, Kwin is unable detect any external monitor. On both the Plasma session, or using Kwin_wayland as back-end of SDDM. On both nouveau and nvidia-open drivers. Same behavior as: https://bugs.kde.org/show_bug.cgi?id=475168 But with modeset enabled. Checked with: `sudo cat /sys/module/nvidia_drm/parameters/modeset`.
> Same behavior as: https://bugs.kde.org/show_bug.cgi?id=475168 Does this mean your issue is the same as the one described there? Does it help to follow the steps at https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting? If following the steps there does resolve the issue, then, as Xaver said there, it's not a KWin issue but rather an NVIDIA issue that distros need to resolve for their users. If following the steps there does not resolve the issue, then it's not actually the same thing. In this case, please attach the output of running `kscreen-doctor -o` and `drm_info`. Thanks!
As I mentioned on the description DRM is enabled, what is the solution that fixed the bug for Xaver. Potentially related: SDDM Does not Detect External Monitors Connected Over NVIDIA PRIME: https://github.com/sddm/sddm/issues/1558 Let me collect the info of those commands...
Created attachment 188660 [details] drm-info.diff
Created attachment 188661 [details] drm-info.log
Created attachment 188662 [details] drm-info@optimus-manager.log
Created attachment 188663 [details] kscreen-doctor.diff
Created attachment 188664 [details] kscreen-doctor.log
Created attachment 188665 [details] kscreen-doctor@optimus-manager.log
Running SDDM with kwin_wayland as backend leads to the same logs. The only difference being than on X11 the login screen appears on the external monitor, and on kwin_wayland on the built-in one.
Thanks!
Wait... let me double-check that DRM works without optimus-manager...
Okay, looking at the diffs I have provided, I have figured out this was rather a bug in how the drivers are packaged. They need to be explicitly patched to enable DRM. I have fixed them to properly enable DRM. And not only that, to automatically use the discrete GPU on games on Wayland without the need of any external tools. Thanks! 👍 https://gitlab.com/es20490446e/express/-/commit/22885b09dc9c7dd5877075df1a17938c3eeeabc6
That's great news! Glad you figured it out.
What do you think about contributing that patch upstream to Arch? Looks like it could be useful for others, too.
I have proposed it directly to NVIDIA here: https://github.com/NVIDIA/open-gpu-kernel-modules/discussions/1005 After a week, with the feedback I receive, I will talk with the Arch guys.