SUMMARY *** When plugging in a monitor into the HDMI port on the laptop, the monitor is not detected in Display Settings panel. The laptop that has the issue is a Sager NP8775E, (Identical to Tuxedo Gemini Gen 2, and Clevo PD70SNE-G) but I believe you will be able to reproduce this issue on any laptop that has nVidia's Advanced Optimus controlling the handoff between the integrated and dedicated GPU's where the dGPU is hard-wired to the HDMI port. The laptop has no xorg.conf, and relies completely on auto detection for the xserver setup. On X11, this works well, and the issue mentioned below is not present. On Wayland, it also works really well, apart from the issue below. *** STEPS TO REPRODUCE 1. Run a Wayland KDE session on a notebook that has nVidia's Advanced Optimus, and where the dGPU is hard-wired to the HDMI port. 2. Plug a monitor into the HDMI port on the laptop OBSERVED RESULT Monitor is not detected. As far as I can tell, there is no event. The dedicated GPU does not wake up, and there is no output to the monitor. EXPECTED RESULT The monitor to be detected, configured and presented in the Display Settings panel. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Kernel Version: 6.5.5-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 32 × 13th Gen Intel® Core™ i9-13900HX Memory: 62.5 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: Sager Product Name: PD5x_7xSNC_SND_SNE System Version: Not Applicable ADDITIONAL INFORMATION Ah it took me embarrasingly long to get here. First I thought it was an issue with the nVidia drivers, then with Wayland itself. Through all this I did manage to get a lot of information that could help. First, a quick description. nVidia's Advanced Optimus is a newer way of managing the two video cards in some laptops. The laptop panel is driven through a MUX that the drivers control, and it decides whether to take input from the integrated or dedicated CPU. This part works flawlessly under Windows, X11 and Wayland. The HDMI port on these laptops is hardwired to the dedicated high power GPU. Under X11, when I plug a monitor into the HDMI port, it is detected, configured and presented to me in the display settings panel. In Windows, it also just works. When the external monitor is plugged into a usb-c laptop dock, it also works on Wayland. Interestingly enough, I can switch the laptop to dedicated GPU only mode in the BIOS, and then I am able to get output to the monitor connected to the HDMI port, but it is not detected as a separate monitor, and so is just a duplicate of the laptop panel. I am fully aware that this hardware is rare and quite expensive, and that not many people have access to it. I am willing to run tests and provide logs to you if you feel like tackling this issue. I can also compile and run development packages from git if you think you have a fix we can try. I use Wayland as my daily driver, and it was more than a month before I even thought of trying this on X11, which is a testament to how well this compositor works on Wayland.
Did you do the necessary setup to enable modesetting for the NVidia driver?
As stated, everything on this driver works except for the monitor detection under Wayland when it is plugged into the HDMI port on the laptop. No configurations were necessary, just the nVidia driver installed from Arch Linux and rebooted. The monitor detection works properly when changing the session type from Wayland to X11. If there is something special that must be done to get this driver to work under Wayland, can you point me to the documentation for that, please? I have not found anything online after quite a bit of searching.
You need to opt in to making the NVidia driver work with Wayland, see https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
Thanks for providing the fix. I can confirm that the HDMI port now properly works under Wayland, after adding in the kernel parameter as suggested by the Arch Wiki. It is strange that something special is still needed to make it work with Wayland where it's not needed with X11, but at least this bug report will show other people with the same symptoms what to do. Thanks so much, again!
Yeah it would be good if NVidia would change the default. There's a lot of other users that have been confused by this