I’ve spent all day messing with it.
Can anyone that has it working say if they are using Wayland or Xorg?
I followed the core steps from rpmfusion:
https://rpmfusion.org/Howto/NVIDIA
and the linked Optimus Page there, which also suggests the following
https://download.nvidia.com/XFree86/Linux-x86_64/495.46/README/primerenderoffload.html
Here is my xorg.conf file:
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "SLI" "Auto"
Option "BaseMosaic" "on"
EndSection
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
Screen 0 "igpu"
Inactive "nvidia"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "igpu"
Driver "modesetting"
BusID "PCI:6:0:0"
EndSection
Section "Screen"
Identifier "igpu"
Device "igpu"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "True"
# Option "PrimaryGPU" "yes"
EndSection
I’ve tried disabling Wayland, but I’m not sure I did with the right xorg.conf at the time.
With this xorg.conf, under wayland i get:
xrandr --listproviders
Providers: number : 0
With an earlier simpler xorg.conf, I had two providers, but right clicking steam to launch with discrete gpu wouldn’t do anything and xorg or gnome-shell always seemed like it was running from nvidia-smi. Ideally I’d like only heavy applications I tell to use the nvidia gpu to use it.