[Optimus] Setting the NVIDIA GPU as primary (RPMFusion in Fedora 32 Workstation)

Well, i admit that to know which number version i can use, is confusing me because looking nvidia driver web site, it purpose only a 435.21 for laptop version.
Rpmfusion purpose only 390xx or 440.82 (but this last it is not for laptop version following nvidia recommendation, it is only desktop version of the 1660ti).

I have been lost by this.

@t0xic0der

the last step i would say is the integration with a GUI solution to switch between intel and nvidia gpu (Gnome and others) to make user friendly solution even if a reboot is needed.

I like the research of simplicity and perfection at same time :stuck_out_tongue:

RPMFusion’s latest driver works just as good as you think it should. Check the screenshot that I am attaching. There is no such distinction in laptop and desktop drivers that I saw when it comes to the RPMFusion repository.

Check the version. 440.82. Works just great.

1 Like

Those 90’s CRT monitor illustrations are fantastic… (set the resolution to 640x480, eh 1920x1080)

2 posts were split to a new topic: How to enable RPM Fusion NVIDIA driver from command line

sed '/BaseMosaic/a\\tOption "PrimaryGPU" "yes"' /usr/share/X11/xorg.conf.d/nvidia.conf | sudo dd of=/etc/X11/xorg.conf.d/nvidia.conf

Lol yes :joy: I wish the community got some “4K-UHD” attention

I wish for it too.

But in the wake of continuous change in how Optimus works and how Bumblebee got obsolete, there is little hope of seeing something like a GUI tool in near future. There are multiple repositories on GitHub about Fedora PRIME shell scripts that you can look up though.

(P.S. Actually do not do that. Latest commit to those repositories are as old as about a year and a half old so they will not function that good)

Thanks a lot for this guide ! Full Nvidia on both monitors WORKS !!!

So, i followed in details all the procedure on my MSI GP75 Leopard laptop.

To give a feedback :

  1. even with lsmod, i was unable to know when the modules nvidia where loaded or not by the kernel
  2. First boot only the internal screen was detected, i suppose because the intel GPU was used
  3. After adding “Option PrimaryGPU yes” en reboot, both screens monitors were working :slight_smile: :slight_smile:

I supposed that on my laptop, the DP port for external monitor is connected directly to the Nvidia GPU.

I don’t know how the “Nouveau” driver did to make both monitors works with intel GPU but i did try.
With hdmi connection or DP connection or HDMI connector to USBC hub, in NO one case the external monitor has been used by Intel GPU in the configuration “Option PrimaryGPU yes” removed.

Perhaps in xorg conf file, it exists a option to add that make external monitor usable by Intel GPU passing thru nvidia even if it is Intel GPU as primary.

Hard to find this full Optimus behavior.

First step for me was to be able to use full Nvidia configuration on both monitors, done !!!
Swicth between GPU with multi monitors will be a next step, one day. :stuck_out_tongue:

Hi @t0xic0der,

Nice work.
I’d just like to point out a couple of things.

At step 5, you don’t have to blindly wait for something to happen. As soon as you’ve installed akmod-nvidia and that transaction completes, the kernel modules will start building. On my laptop I can see a spike in CPU usage for a few seconds and my fans run at full speed as all the cores are firing up. You can check what is going on with e.g. top, it should show you multiple cc1 threads running as the packages are being compiled.
Everything that takes place after the akmod-nvidia package is installed or updated (or if you have just updated your kernel) is logged in /var/cache/akmods/nvidia/.last.log. I guess you could run tail -f on that file to see what’s happening. Alternatively, once your system settles down, dnf history info last should show that kmod-nvidia-kernel_version was installed successfully, e.g. something like this:

[multiple lines clipped]

Running transaction
  Preparing        :                                                        1/1 
  Installing       : kmod-nvidia-5.6.8-300.fc32.x86_64-3:440.82-1.fc32.x8   1/1 
  Running scriptlet: kmod-nvidia-5.6.8-300.fc32.x86_64-3:440.82-1.fc32.x8   1/1 
  Verifying        : kmod-nvidia-5.6.8-300.fc32.x86_64-3:440.82-1.fc32.x8   1/1 

Installed:
  kmod-nvidia-5.6.8-300.fc32.x86_64-3:440.82-1.fc32.x86_64                      

Complete!

You don’t need to run akmods --force, you’d be doing the same thing all over again.

Even if you shutdown the machine before this phase completes, akmod will build everything at next boot.

When you need to troubleshoot something, check the transaction info; if the modules for the kernel version you are using were built and installed, look for the problem elsewhere.

1 Like

A downgrade of the kernel is not the way to go.
Also, your card will NOT work with the 390 driver.

I do not use the nvidia site drivers, but instead use those from RPMFusion as instructed in this thread. I believe that the 440 drivers are supposed to support all boards produced since 2012, and the ones from RPMFusion have worked flawlessly for me for many years (except for the 'optimus" and ‘prime’ cards in laptops).

I had previously followed the procedure about the NVIDIA Prime cards from RPM Fusion and had run into a road block in that my external monitor would power down when the system switched off the nvidia card. (GTX 1660 Ti) and I could not get it back on until the next reboot.

I just now followed the steps in this thread and found the only thing I had previously missed that were put here by @t0xic0der were his steps 8 - end.
Now the NVIDIA card is primary and on all the time.

My system is F31, fully upgraded with kernel 5.6.8 and nvidia drivers 440.82

1 Like

Glad that the solution I provided worked for you. The configuration would also work in external monitors out-of-the-box so you do not have to worry about configuring it again.

P.S. Why are you not moving onto Fedora 32? Did the blurry lockscreen not please you enough?

1 Like

Thanks @t0xic0der , I did move to F32.
Just did the config for the video on my laptop before the update was done.
Had a small snag when I first tried the upgrade on another machine and had to figure out what had happened and fix that before I could complete the upgrade there. Your “tutorial” here came at the same time so I did things in sequence.
I thought I had done the /etc/X11/xorg.conf.d/nvidia.conf file previously but apparently missed that so your instructions fixed it for me.

1 Like

Hi, ty for this guide. Only one question: why would you download any 32-bit package? Not necessary imho.

https://rpmfusion.org/Howto/NVIDIA?highlight=(CategoryHowto)#x86_64_.2864bit.29_users

1 Like

I am glad that this guide could be of help to you @nippur!

If you are installing the NVIDIA drivers in an Optimus laptop for playing games on Wine, Steam Proton, Lutris or using 3D acceleration in some other 32-bit packages - you must install the 32-bit libraries. The only thing that is unnecessary is explicitly listing the package during installation for it automatically gets installed as it belongs to the core (read strong) dependencies.

Hi all, I’m facing a problem. I’ve followed every step in the guide above and all worked for the driver part (I can use the nvidia card if I set the environment variable as described by RPM Fusion) but after creating a copy of the nvidia.conf with the option “PrimaryGPU” “yes”, when i reboot I get only a black screen. If I change to a different tty and start the xserver seems to be working properly on the nvidia. What problem it could be? I’m using the Fedora 32 kde spin (plasma 5.18.4) on Lenovo ideapad 100 15ibd with core i5 5200u and nvidia GeForce 920M (enabled in bios).

1 Like

I would create a new issue for that. This is now more a “howto” reference thread.

1 Like

Hi, what do you mean with “create a new issue”?
Sorry but I read most of this thread this morning and I didn’t check if there is a wiki page on this topic. Did you mean an issue on Bugzilla? If so I can open a new issue for kde-plasma but I’m not sure if is plasma the problem.

1 Like

Just a new topic so that folks can help you specifically with your issue :slight_smile:

1 Like