Story opener
You boot your Fedora laptop and notice the battery draining in half the usual time. You open a game or a video editor and the frame rate stutters. The system is running both an integrated Intel or AMD GPU and a discrete NVIDIA card, but they are not talking to each other correctly. The display server is likely routing everything through the wrong adapter, or the NVIDIA driver is missing entirely.
What is actually happening
Hybrid graphics hardware splits the workload between two chips. The integrated GPU handles the desktop environment, video playback, and general window compositing. It draws power from the main system bus and stays active constantly. The discrete NVIDIA GPU sits in a low-power state until a demanding application requests it. Linux does not automatically switch between them like Windows does. You have to tell the display server and the kernel which chip handles rendering and which chip drives the actual screen.
Think of it like a two-engine aircraft. The integrated GPU is the reliable engine that keeps the plane in the air during normal flight. The NVIDIA GPU is the afterburner. You do not want the afterburner running while taxiing. You only engage it when you need maximum thrust. Fedora gives you three ways to manage this split. The display server composites frames from whichever GPU you assign, then sends the final image to the panel. Routing the wrong chip to the display causes thermal throttling and wasted battery.
Prerequisites and driver installation
Fedora does not ship proprietary NVIDIA drivers in the default repositories. You need RPM Fusion to pull the kernel module and the display server drivers. Run the repository setup first.
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
# WHY: Adds the free and nonfree RPM Fusion repositories to your dnf configuration.
# WHY: The $(rpm -E %fedora) variable ensures the correct Fedora release number is used.
Install the driver package and the CUDA toolkit if you plan to run GPU compute workloads.
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda
# WHY: akmod-nvidia compiles the kernel module against your currently running kernel.
# WHY: xorg-x11-drv-nvidia provides the display server driver for X11 and Wayland.
# WHY: The cuda package is optional but required for applications that use NVIDIA compute APIs.
The akmod package triggers a background compilation job. Do not reboot immediately. Wait until the terminal returns to the prompt. A botched reboot during module compilation leaves you with a broken graphics stack and a black screen. Monitor the build with sudo systemctl status akmods.service. The service will show active (exited) when the module is ready. Run sudo reboot only after the build finishes. Trust the package manager. Manual file edits drift, snapshots stay.
Verify drivers are loaded
Confirm the kernel module is active and the hardware is recognized.
nvidia-smi
# WHY: Queries the NVIDIA management interface. A table with GPU utilization means the driver is loaded.
lspci -k | grep -A 3 -i "VGA\|3D"
# WHY: Lists PCI devices and shows which kernel driver is currently bound to each GPU.
If nvidia-smi prints NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, the module failed to build or load. Check the build logs with sudo journalctl -xeu akmods.service. Read the actual error before guessing. Run journalctl -xe first. Read the actual error before guessing.
Option 1: PRIME render offload
This is the default and most efficient method for laptops. The integrated GPU continues driving the display. You launch specific applications on the NVIDIA card using a wrapper script. The desktop environment stays light, and the discrete GPU powers down when the application closes.
Install the prime utilities if they are missing.
sudo dnf install nvidia-prime
# WHY: Provides the prime-run wrapper and configuration files for render offloading.
Launch your application through the wrapper.
prime-run glxgears
# WHY: Sets the required environment variables and routes the OpenGL context to the NVIDIA GPU.
You can verify the routing by checking the renderer string.
prime-run glxinfo | grep "OpenGL renderer"
# WHY: Confirms that the application is actually using the NVIDIA hardware for rendering.
The wrapper sets __NV_PRIME_RENDER_OFFLOAD=1 and __GLX_VENDOR_LIBRARY_NAME=nvidia behind the scenes. You do not need to type those variables manually unless you are writing a custom launch script. PRIME offload works on both X11 and Wayland sessions. The integrated GPU handles the desktop, and the NVIDIA card activates only for demanding workloads. Keep the wrapper in your terminal aliases or desktop shortcuts for quick access.
Option 2: Session-level switch
Some workflows require the entire desktop environment to run on the NVIDIA GPU. GNOME on Wayland exposes this choice directly at the login screen. After the driver installation, a gear icon appears next to the login button. Click it and select GNOME on NVIDIA GPU. The display server will start with the discrete card handling all compositing.
X11 sessions do not show the gear icon. You must use the NVIDIA settings utility to change the profile.
sudo dnf install nvidia-settings
# WHY: Provides the graphical configuration tool for X11 PRIME profiles.
nvidia-settings
# WHY: Opens the configuration window where you can switch PRIME profiles.
Navigate to the PRIME Profiles section. Select NVIDIA (Performance Mode) to route the entire session to the discrete card. Log out and back in for the change to take effect. The integrated GPU will be completely disabled for rendering. Reboot before you debug. Half the time the symptom is gone.
Option 3: Kernel parameter for modesetting
Modern NVIDIA drivers require kernel modesetting to work correctly with Wayland and modern display managers. If your screen flickers during boot or the NVIDIA option never appears in GNOME, you need to enable it at the kernel level.
sudo grubby --update-kernel=ALL --args="nvidia-drm.modeset=1"
# WHY: Appends the modesetting flag to every installed kernel boot entry.
# WHY: nvidia-drm.modeset=1 allows the NVIDIA driver to handle display output directly.
Reboot the system. This parameter is mandatory for Wayland sessions and highly recommended for X11. Without it, the display server falls back to a software renderer or crashes during startup. Use grubby instead of editing /boot/loader/entries/ manually. The tool updates all kernel symlinks and prevents boot menu drift. If the boot menu is gone, GRUB rescue is your friend, not your enemy.
Verify it worked
Check which GPU is handling your current workload.
glxinfo | grep "OpenGL renderer"
# WHY: Shows the active OpenGL provider for your current session.
vulkaninfo | grep deviceName
# WHY: Lists the Vulkan devices and indicates which one is active for Vulkan applications.
nvidia-smi
# WHY: Displays real-time memory usage and process list for the NVIDIA GPU.
If you see Intel or AMD Radeon in the renderer output, the integrated GPU is active. If you see NVIDIA, the discrete card is handling rendering. Run nvidia-smi to see which processes are consuming VRAM. Check the utilization column to confirm the discrete GPU is actually doing work. Trust the output. The renderer string does not lie.
Common pitfalls
The akmod-nvidia package rebuilds automatically when you update the kernel. Fedora pushes kernel updates frequently. If you boot into a new kernel before the module finishes compiling, you will lose hardware acceleration. Wait for the akmods service to complete. You can monitor it with sudo systemctl status akmods.service.
Config files in /etc/ are user-modified. Files in /usr/lib/ ship with the package. Edit /etc/. Never edit /usr/lib/. The NVIDIA driver places configuration snippets in /usr/lib/modprobe.d/. If you need to override a setting, create a file in /etc/modprobe.d/ instead. Package updates will overwrite /usr/lib/ changes without warning.
SELinux denials sometimes block the NVIDIA driver from accessing DRM devices. You will see audit: type=1400 entries in the journal. Run sudo ausearch -m avc -ts recent to inspect the denials. Do not disable SELinux. Fix the context or report the bug. The driver works correctly with enforcing mode when installed via RPM Fusion. SELinux denials show up in journalctl -t setroubleshoot with a one-line summary. Read those before disabling SELinux.
When to use which method
Use PRIME Render Offload when you want maximum battery life and only run GPU-intensive applications occasionally. Use the GNOME login screen switch when you need the entire desktop environment to run on the discrete GPU for consistent performance. Use the kernel parameter when Wayland fails to start or the NVIDIA session option is missing from the login screen. Stay on the integrated GPU when you are traveling without a power adapter and only need web browsing and document editing.