Fedora 31 + Nvidia Prime laptop - Gnome display settings and xrandr fails to detect external monitor, but Nvidia settings can see it

Looks like this is a known issue for laptop Nvidia cards with Optimus technology (fallback display and power-saving via Intel graphics). From RPM Fusion’s documentation for Optimus, in the External Monitors detection section:

You have to set the PrimaryGPU option in the Xorg configurations. They recommend doing this by copying the full default config file…

sudo cp -p /usr/share/X11/xorg.conf.d/nvidia.conf /etc/X11/xorg.conf.d/nvidia.conf

And then editing the /etc/ copy of the file to include Option "PrimaryGPU" "yes" in the "OutputClass" section.

So, as of December 2019, /etc/X11/xorg.conf.d/nvidia.conf now looks like this for me:

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

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

Using this Xorg config has the benefit of not interfering with Intel graphics, if you want or need to use those at some point.

1 Like