Nvidia Prime on Fedora 30/31 - current state?

Hi,

So, I am finishing the setup of a clean install of Fedora 31 with Nvidia on my Gaming Laptop.

I’ve installed the drivers through RPM Fusion. And then, I installed bumblebee to switch between intel and Nvidia.

However, after facing this issue: https://github.com/flatpak/flatpak/issues/869
Steam cannot use bumlebee if used through Flatpak. It works well when installing Steam through DNF though, however dependency hell happens there.

After research, apparently, NVIDIA released PRIME on their linux drivers now. But I can’t find a well organized guide into how to set it up properly for my Intel/Nvidia switch to function accordingly like Windows does.

Any help appreciated

Check out the guide on rpmfusion.

It isn’t really clear if you take a deeper luck, and it doesn’t work out of the box with proprietary drivers by just installing rawhide Xorg. Have you tried it?

Ah, indeed I can see why that would seem rather thick. However, the code ideas are pretty simple.

You can copy paste the “NVIDIA PRIME Support” section in a terminal which will…well, enable prime support. Then, to run an application on your NVIDIA GPU, start it with __NV_PRIME_RENDER_OFFLOAD=1 set.

1 Like

I know, the thing is that just running that block does not turn off the GPU at all. So there’s nothing to run OFFLOAD at, since the GPU is all the time on. Maybe there is something to blacklist? not sure.

Also, I wonder how Windows does it to automatically know which applications trigger the offload.

Ubuntu on the other hand, has these prime-select scripts which either turn GPU off completely or turn it on completely. However the annoying piece is that you need to complete reboot your system for each swap (at worst scenario, there are some scripts that just require you to log off… but meh)

Just to be clear, you rebooted after running that right? It just sets everything up, the actual switching is handled by __NV_PRIME_RENDER_OFFLOAD. Did you see any errors from those commands?

The proprietary drivers by default do not enable PRIME support, so that extra snippet tries to enable it. If after a reboot, PRIME still isn’t working, then something didn’t enable properly, which is why I asked if there were any errors that appeared when you ran those commands.

@revolucion09
If I am understanding your problem you may have the dual video setup known as the optimus card. Fedora documents how to properly utilize it here, and if you did not follow that, the system may not be able to switch between the GPUs as needed.

More information is at rpmfusion including updates on Prime.

With the NVIDIA PRIME support, the default state of the dGPU (NVIDIA) is OFF (unless one is using PrimaryGPU directive to enable external monitors connected via NVIDIA for example).

There is a need to completely remove bumblebee, this piece of software is not a all involved in NVIDIA Prime and will conflicts with it.

1 Like

It’s not expected to have any dependency issue while installing steam with RPM. But if you ever used the fedora updates-testing repository for something, you might need to fetch the same version of the i686 counterpart.

1 Like

Hi, a quick update:

The xorg patch is already now in official Fedora 30+ repositories. So no longer needed to pull the rawhide Xorg (all this based on here: https://rpmfusion.org/Howto/Optimus)

I am not really sure how Fedora does it, but my laptop led-switch shows NVIDIA GPU is ON. However, my current power consumption is very low, so either the GPU is off and the led is wrong, or the dynamic power management is doing it’s job when enabled by running:

sudo -s
dnf update
cat > /etc/modprobe.d/nvidia.conf <<EOF
# Enable DynamicPwerManagement
# http://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/dynamicpowermanagement.html
options nvidia NVreg_DynamicPowerManagement=0x02
EOF

So I guess I am all happy now since the Nvidia drivers seem to be enabled, as opposed to Ubuntu’s prime-select which switches them off completely in order to get this lower power consumption I am getting now with the GPU on.

It is a bit confusing but I am good now!

1 Like