[Silverblue] Switching Between NVIDIA and Intel


I am using Silverblue (based on F30) on a laptop with an NVIDIA GPU (1050 Ti Mobile). I am using the proprietary drivers that I installed by following the blog post.

My problem is that the NVIDIA GPU is powered on all the time. Which is a problem with the thermals and battery life.

How would I go about completely powering off the NVIDIA GPU and use the integrated Intel one? It is fine if I have to reboot or log off. I am considering writing a script but I don’t know enough to do that. I know Ubuntu variant of the NVIDIA drivers have PRIME profiles to switch between GPUs. Is there anything like that in Silverblue?

Technically there’s Bumblebee although I’ve seen mixed success rates there. The most reliable method I’ve seen across multiple distros is unfortunately the most awkward to set up, nvidia-xrun, which also has the benefit of working without a reboot.

I have used Bumblebee in vanilla Fedora before, it worked fine for most of my use cases. And I was aware of the alternatives you gave here. One problem is that both of these alternatives require the usage of COPR repositories. As far as I know you cannot use COPR with rpm-ostree. Am I missing something? I want to do this on Silverblue.

One possible way I can think of is to force unlock the immutable OS, make the necessary changes and lock it again. But that sounds like a very problematic solution.

You can! You just need to download the repository file for your Fedora version from the COPR website and drop it in /etc/yum.repos.d manually. I use a few COPRs on Silverblue myself.

1 Like

There are fews more or less broken [deprecated] hacks to allow switching between NVIDIA or Intel.
The long term goal is probably be solved with next Xorg server, if it will allow “offloadsink”. This is not the case as of today.

  • Bumblebee. I was addressed on few others post already. This method is not supported by upstream (xorg, mesa, libdrm, etc) or NVIDIA. But can mimic what one expect by using Optimus on others OSes.
  • nvidia-prime. This is a Ubuntu collection of scripts (hacks) to switch between NVIDIA and Intel in the back of end-users. This is not at all related/interfaced to the so called “prime” support, which is a buffer sharing mechanism in kernel space.
    (see also:) https://en.wikipedia.org/wiki/Direct_Rendering_Manager#DMA_Buffer_Sharing_and_PRIME

As soon as Fedora is concerned, the only method that can be recommended (if ever using the NVIDIA driver is supported, at least it’s what we can support on the RPM Fusion side), are the following.

  • Switch between NVIDIA and FLOSS driver. This is easy as to reboot and remove all of “rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1” on the grub line. You will use the FLOSS driver (intel, nouveau) and nouveau will shutdown the GPU if not used.
  • Use the Intel driver as default on optimus system, (undocumented yet), you will use intel for all desktop operations. NVIDIA can be used to do some non-GL related tasks (so CUDA without gl_interop functions). This solution cannot be relevant for all end-users.

Personally, I recommend (and support as RPM Fusion NVIDIA package maintainer) only the 2 latter solutions.
If you have question of theses solutions you can ask on the RPM Fusion end-users mailing list https://lists.rpmfusion.org or Report issue to https://bugzilla.rpmfusion.org

I think my experience over the last few days deserves a small write-up for those who come across this thread in the future.

I am using a Dell Inspiron 7567 laptop. It used to work fine with open source drivers on Ubuntu 16.04 and some old kernel version. Then an update broke everything and nouveau drivers made the system unusable. Which is why I can’t stick to open source drivers.

Now, on the Silverblue side of things. I had installed the proprietary NVIDIA drivers. But dGPU was always on and at the maximum performance mode. Which caused bad thermals and low battery life. So, I sought help and started this thread. Based on the suggestions I decided to fiddle with setting up nvidia-xrun. However, I broke my installation during the process.

Everything went fine until I tried to disable both nouveau and nvidia drivers by setting the kargs (didn’t change what should be there, such as boot image; so the issue is not that)


I don’t know what exactly went wrong, but it is similar to what happens when using the nouveau drivers. The system boots fine until the login screen, but gets stuck while loading the desktop. Right between entering the credentials and change of the background. I rolled back to a safe image. I decided to test which parameter exactly causes the problem. During the process I tried to keep a safe image. But, apparently it didn’t work. After a while I couldn’t get past the login screen even though I manually changed the kernel parameters during boot.

There is an issue I have with this. Maybe I am doing it wrong but I couldn’t find any documentation to show me otherwise. In my system, Silverblue only keeps two images at a time. Moreover, you can’t manually create new images. It would be much better if you could manually set aside a safe image.

After I broke my installation, I installed vanilla Fedora to see if I could make nvidia-xrun work. I managed to run an Openbox session with it in an alternate tty. However, I couldn’t open any applications in it. So I decided to go back to Silverblue and stick to Intel graphics for now.

However, there is another issue with this. Which happened before I set up Bumblebee in Fedora too. Even though no NVIDIA driver is loaded or installed, dGPU is still drawing power. Enough to warm up the keyboard. I checked and I can’t disable it through the BIOS. I tried to install bbswitch or acpi_call but both of these packages are not available.

Now, I will try the mailing list for an answer for my last problem. When and if I get an answer I will update here. I will also try to open an issue or whatever is appropriate about the Silverblue image management. For any readers, help is much appreciated so please feel free to contact me.

From the blacklist perspective, either use (and exactly that):
modprobe.blacklist=nvidia,nvidia_drm,nvidia_modeset # → to use nouveau
rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 # to use nvidia

Reminder, this will only works with RPM Fusion packaged driver for Fedora (or Silverblue), not the one packaged by NVIDIA using the installer or else.

Now to verify that the device driven by nouveau is poweroff, you can have a look at:

cat /sys/kernel/debug/vgaswitcheroo/switch
1:DIS: :DynOff:0000:01:00.

So it’s disabled automatically in my case.

First of all, thanks for sticking with me.

  • I am certain that the dGPU is powered on.
  • I don’t have the proprietary drivers installed at the moment, I am on a clean install.
  • I can’t get past the login screen if I don’t disable nouveau. Setting nouveau.modeset=0 works fine and actually loads the driver, when checked with lsmod.

I tried running this but I get:

cat: /sys/kernel/debug/vgaswitcheroo/switch: No such file or directory

This happens both when nouveau is blacklisted and when modeset=0 is set.

Following are some information related to my system:

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
1920x1080 59.96*+

$ xrandr --listproviders
Providers: number : 0

Check out ostree admin pin.