Nvidia Optimus on Linux

It’s been a while since I monkeyed with this madness. I recently got an Optimus-equipped laptop, and am wondering if Linus’ famous flip off is still appropriate. How hard is it to get Optimus to play nice on a modern laptop? Any particular procedure, or is it (gasp!) plug and play?



Seems Pop_OS is the way to go with support (uefi support attributable to functioning) and driver support seems stable enough. Any modern distro (except for the niche amongst them) would seem to work fine, as graphics and linux gaming is a standout feature. Enjoy the laptop :slight_smile:
1 Like

Thanks for the videos. Unfortunately I installed Fedora instead of PopOs or Ubuntu. The reason that was an unforunate choice was that Fedora’s nvidia driver is unsigned cyrptographically. That means if Safe Boot is enabled, the driver will absolutely refuse to load. (I think the errors said something about a ‘tainted kernel.’) Beat my head against a wall for a couple of hours on that one.

But I finally got it working, so all’s well that ends well. Next time I’ll take the easy way out. :slight_smile:

Use negativo17 nvidia repository, he provides out of the box support for optimus and easy switching on Fedora 33. As well as instructions and packages required

Switching is rather a mystery to me. It used to be handled via a command, like ‘optirun /usr/bin/vulkan-game’. Now it’s supposedly managed by an environment variable, __NV_PRIME_RENDER_OFFLOAD=1. Except I’ve had zero luck making it work as expected. Sometimes a 3D game will launch automatically with full acceleration and no intervention, sometimes the environment variable is necessary, sometimes neither option will let the game launch, and sometimes it will launch with the iGPU regardless of what I want.

What is the proper way to launch a 3D game or app, and what adjustments to configuration files are necessary to ensure proper Optimus operation?

@imrazor Like I said, use negativo17’s nvidia repository for Fedora Workstation. He integrates a “launch with nvidia GPU” UI option in to gnome so you don’t need to always launch applications through the terminal.

I got it working on my own Acer Predator laptop with a 980m and Intel iGPU back in 2017 and it worked flawlessly

@DastardlyMuffin Problem is that I had to use the official Nvidia installer when the RPM Fusion drivers got hosed. There’s no telling if I’ll be able to purge Nvidia’s drivers, but I’ll try to roll them back and try negativo’s.

Optimus was unusable for me because fractional desktop scaling is broken on the NV side. Only scaling options are 100 and 200%. Scaling works fine on the Intel side.

Just last week I tried that with Fedora 33 on my Dell XPS 9500 with the Fedora-provided rpmfusion version of the drivers.

The Environment-Variables from Nvidias webpage (also mentioned above) was enough to run SuperTuxKart on the Nvidia GPU, worked pretty well. Cuda also ran without a hitch.

Although I am not running linux regularly on that machine, just for fun and to check in to the current state of Linux on Notebooks from time to time. So there might be problems that I did not come across in that relatively short time.

1 Like

I just noticed that the proprietary driver also adds a “Launch with Discrete GPU” menu option in GNOME. That works great with Fallout 4 (by launching native Steam first w/ discrete GPU), but fails to launch Cyberpunk 2077. Currently the ONLY way to launch Cyberpunk is if I 1) use XFCE w/o compositing as my desktop environment and 2) use an external monitor. Bizarro…

I suppose it’s possible GNOME w/ software rendering might work. I’ll investigate that shortly.

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.