If you're running Fedora on a laptop with NVIDIA + Intel hybrid graphics (like most modern laptops with Optimus), you're in luck — Fedora makes it easy to use GPU offloading, giving you the best of both worlds: power efficiency with Intel and performance with NVIDIA when needed.
In this guide, you'll learn how to:
- ✅ Install NVIDIA drivers with offloading support on Fedora
- ⚙️ Run any app using the NVIDIA GPU on demand
- 🛠️ Create a helper script and launcher to make offloading seamless
- 🔁 (Optional) Switch to full-time NVIDIA mode for gaming laptops
🎯 What is NVIDIA Offloading?
NVIDIA Offloading allows you to use the Intel GPU as the default (great for battery life), but launch specific apps — like Steam, Blender, or Firefox — on the NVIDIA GPU for better performance.
Unlike Windows' automatic switching with Optimus, Linux uses explicit offloading — but it’s easy and powerful when configured right.
✅ Step 1: Enable RPM Fusion
First, enable RPM Fusion repositories (Free + Non-Free) to get access to proprietary NVIDIA drivers:
sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
✅ Step 2: Install NVIDIA Drivers with Optimus Support
Update your system and install the required NVIDIA driver packages:
sudo dnf update --refresh
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
If you need 32-bit support (for Steam, Wine, etc.):
sudo dnf install xorg-x11-drv-nvidia-libs.i686
✅ Step 3: Verify Intel is the Default GPU
Fedora (with X11) uses Intel as the default renderer automatically.
To confirm:
glxinfo | grep "OpenGL renderer"
You should see something like:
OpenGL renderer string: Mesa Intel(R) UHD Graphics ...
✅ Step 4: Run Apps with NVIDIA Offloading
You can offload any app to the NVIDIA GPU using this command format:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <your-app>
Example:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia firefox
To verify:
glxinfo | grep "OpenGL renderer"
It should now say something like:
OpenGL renderer string: NVIDIA GeForce RTX 3050 ...
✅ Step 5: Confirm with nvidia-smi
Want to make sure the NVIDIA GPU is active?
nvidia-smi
You’ll see the process listed if it’s using the GPU.
🔄 Bonus: Make It Seamless with a Helper Script
Let’s make offloading as easy as typing nvidia-run <app>
.
🔹 Create the Script
mkdir -p ~/.local/bin
nano ~/.local/bin/nvidia-run
Paste the following:
#!/bin/bash
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"
Make it executable:
chmod +x ~/.local/bin/nvidia-run
Add to PATH (if not already):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
🔹 Use It Like This:
nvidia-run blender
nvidia-run code
nvidia-run steam
🖥️ Optional: Create App Launchers
Want to launch apps from GNOME or KDE menu using NVIDIA?
Create a .desktop
file:
[Desktop Entry]
Name=Blender (NVIDIA)
Exec=nvidia-run blender
Type=Application
Categories=Graphics;
Save it to:
~/.local/share/applications/blender-nvidia.desktop
This will now appear in your app launcher.
🔒 Secure Boot Note
NVIDIA kernel modules are unsigned, so Secure Boot will block them by default.
You can either:
- Disable Secure Boot in your BIOS, or
- Use MOK (Machine Owner Key) to sign and enroll the NVIDIA module (more complex).
🔋 Want Full-Time NVIDIA Mode?
You can switch your system to always use NVIDIA for everything (great for gaming, not so much for battery life), but it requires:
- Setting NVIDIA as the primary GPU
- Using Xorg configs or kernel parameters
Let me know in the comments if you want a full guide on that!
📌 TL;DR Cheatsheet
Task | Command Example | Description |
---|---|---|
Run app on NVIDIA GPU | nvidia-run <app> |
Offloads app to NVIDIA GPU |
Check GPU used |
glxinfo > temp && grep "OpenGL renderer" temp or nvidia-smi
|
Shows whether Intel or NVIDIA is being used |
Confirm Intel is default | glxinfo > temp && grep "OpenGL renderer" temp |
Should show "Mesa Intel..." as the renderer |
Create launcher |
.desktop file with Exec=nvidia-run your-app
|
Launch app with NVIDIA from desktop environment |
🚀 Final Thoughts
Fedora makes hybrid GPU support smooth and developer-friendly. With just a few commands and a tiny helper script, you can run games, Blender, Steam, or CUDA tools using the power of NVIDIA — while keeping Intel as the default for efficiency.
Have questions or want help creating .desktop
entries for your apps? Drop a comment!
Top comments (0)