External monitor with Wayland and two GPUs (notebok)

So, long sory short, I recently bought an Acer Nitro 5 (AN515-44) and installed F35 on it (you can read the whole story here). It is working pretty great, and with Nvidia’s proprietary driver (the notebook has a AMD Renoir GPU and a Nvidia GTX 1650) even a dual-monitor setup works just fine – with X11.

This is already great, because I can use the external monitor if I use GNOME + X11. However, some clues suggest Wayland might be close to working, so I am trying to push my luck here.

Here’s the output of xrandr -q if I don’t plug in the external monitor:

Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080    144.04*+

As soon as I plug it (even if I don’t turn it on), here’s what I get:

  • gnome-shell usually crashes and throws me back to the login screen
  • GNOME correctly detects the new monitor and shows it on the Display tab on the configuration app
  • The external monitor remains black

Now xrandr -q shows me this:

Screen 0: minimum 16 x 16, current 1920 x 2160, maximum 32767 x 32767
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     59.96*+
XWAYLAND1 connected primary 1920x1080+0+1080 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080    144.04*+

And there is a XWAYLAND0 entry associated with the external monitor.

Just for comparison, this is the output of xrandr -q with two monitors on X11:

Screen 0: minimum 320 x 200, current 1920 x 2160, maximum 16384 x 16384
eDP connected primary 1920x1080+0+1080 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    144.15*+  60.20  
HDMI-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  59.94    50.00

~/.config/monitors.xml looks like this:

<monitors version="2">

Some additional info:

lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c6)
glxinfo | egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: AMD
OpenGL renderer string: AMD RENOIR (DRM 3.44.0, 5.16.11-200.fc35.x86_64, LLVM 13.0.0)

/etc/X11/xorg.conf.d/nvidia.conf :

Section "OutputClass"
	Identifier "nvidia"
	MatchDriver "nvidia-drm"
	Driver "nvidia"
	Option "AllowEmptyInitialConfiguration"
	Option "SLI" "Auto"
	Option "BaseMosaic" "on"

Section "ServerLayout"
	Identifier "layout"
	Option "AllowNVIDIAGPUScreens"

It seems I am close to finding a working configuration… Any help will be much appreciated :wink:

Some additional info: when the external monitor is plugged, actvating the lockscreen (either manually or by the timeout) causes the GNOME session to crash (resuing from the lock screen takes you to the login screen). ABRT doesn’t detect the crash.

I read from other forum that the problem actually are with GDM (Gnome login screen). You could try to switch to lightdm.

# Install lightdm
sudo dnf install lightdm

# Disable gdm
systemctl disable gdm
systemctl mask gdm

# Enable lightdm
systemctl enable lightdm

After that reboot your system.

Source here.

Thanks @oprizal , I would have never thought that replacing GDM would have any impact. However, I tried the commands above, and after rebooting it seems lightdm doesn’t kick in, there is no login screen. I will not be able to properly debug it until later, so if you have any hints, please let me know (I did a quick search and apparently it could be more complicated than I was expecting).

May bad for what happen to you. Could you go to console (tty) with ctr + alt + F3? If you able to login with console mode, check with systemctl status gdm and make sure it not running and also check with systemctl status lightdm to see if it already enabled and to see what is the problem.

If the problem persist, from the console (tty) you could revert back to gdm:

# Disable `lightdm` and mask it.
systemctl disable lightdm
systemctl mask lightdm

# Unmask `gdm` and `enable` it.
systemctl unmask gdm
systemctl enable gdm

Then reboot your computer.

Other way to booting to console, from booting list, press e and find part mentioning linux ... then add 3 to the end of line. After that press ctrl + x to continue booting. It will bring the boot to console mode.

No worries, I was able to switch to ctrl+alt+F2 and re-enable GDM from there :sweat_smile: I will try it again later to try to gather some additional info on why it could be aborting (or not starting). Thanks for your help!

After googling around, I switched to a terminal and ran lightdm --test-mode --debug, and found out that it was not finding the greeter. So I installed slick-greeter and created a /etc/lightdm/lightdm.conf.d/fedora.conf file with these entries:



(not sure if the first one was actually necessary; references here and here)

After that, lightdm was enabled and running on the next reboot. However, I could not login after choosing “GNOME on Wayland” as the session type, it apparently froze (I could still switch to a terminal, though). So, more debugging is needed to see what could be the problem now (BTW I was able to login while running manually with --test-mode --debug).

As a last note, IMHO the look & feel was too basic (black background), don’t know if it is configurable…

For theming, you could use lightdm-gtk-greeter-settings and lightdm-settings.

It’s on wayland or xorg? If it wayland, then it will be a good news for other users who have same problem with dual monitor and hybrid gpu.

Also check with directory /usr/share/wayland-sessions/. In this directory, if you found 2 file gnome.desktop and gnome-wayland.desktop move one of this file to other place (as backup) or you could rename one of them with name that not ended with *.desktop.

Sometime it will make fail to login with wayland session (even we successfully login, if we check the session it actually xorg).

The other things, if we login to wayland session usually there look like it bring us to console mode, but after seconds it will bring us to graphical session.

I switched to lightdm-gtk, and this time I was able to login to a Wayland session (after a brief console appearance, as you said). However, I still could not activate the external monitor :slightly_frowning_face: Thanks for all the help anyway, now I know I can switch to lightdm if I want to :wink: