You install Fedora and the CPU spikes to ninety percent
You install Fedora on a modern laptop, open a 4K YouTube video, and watch the CPU usage climb to ninety percent. The fan spins up, the playback stutters, and the battery drains in an hour. You know the GPU should be handling the decoding. You just need to tell the system how to use it.
What's actually happens
Linux splits hardware acceleration into two distinct pipelines. The first pipeline handles graphics rendering. Applications draw windows, games, and 3D scenes using OpenGL or Vulkan. The second pipeline handles media decoding and encoding. Video players and browsers use VA-API or NVDEC to offload H.264, HEVC, and AV1 streams to the GPU. Windows bundles these into a single driver package. Linux separates them into kernel modules, userspace libraries, and application plugins. When one piece is missing, the system falls back to software decoding. The CPU does the heavy lifting, and performance collapses.
Fedora ships with open-source drivers for Intel and AMD GPUs. They live in the kernel and the Mesa library. NVIDIA requires a proprietary driver because the company does not publish the source code. The installation path changes depending on which silicon is inside your machine.
Convention aside: Always check journalctl -xe after a driver change. The x flag adds explanatory context and the e flag jumps to the end of the log. Most driver failures leave a clear trace there before the system gives up.
Run journalctl -xe before you guess. Read the actual error before installing random packages.
The fix for Intel graphics
Intel integrated GPUs use the i915 kernel module. Fedora loads it automatically. You only need to install the userspace libraries for video acceleration. Modern Intel chips (Gen 9 and newer) require the intel-media-driver package. Older chips still use the legacy libva-intel-driver. Install both to cover every generation. The media driver uses a different code path that supports AV1 and newer HEVC profiles. The legacy driver covers older Skylake and Kaby Lake hardware that the media driver dropped.
Here is how to install the Intel VA-API stack and verify the installation.
sudo dnf install -y intel-media-driver libva-intel-driver libva-utils
# intel-media-driver handles Gen 9+ hardware decoding
# libva-intel-driver covers older Skylake and Kaby Lake chips
# libva-utils provides the vainfo diagnostic tool
vainfo
# Queries the VA-API stack and prints supported profiles
The output should list VAProfileH264Main, VAProfileHEVCMain, and VAProfileAV1Profile0. If you see VA-API version followed by a list of profiles, the pipeline is active. If vainfo prints libva error: can't find any driver, the system is missing the correct library or the GPU is not recognized.
Convention aside: dnf upgrade --refresh is the normal weekly maintenance command. It forces package metadata refresh and pulls in driver updates. dnf system-upgrade is for crossing major Fedora releases. They are different commands. Don't conflate them.
Install both Intel drivers. The legacy package costs nothing and saves you from codec mismatches.
The fix for AMD graphics
AMD RDNA and GCN GPUs rely on the amdgpu kernel module. Fedora includes it by default. Graphics rendering and video decoding both route through Mesa. You need the Vulkan drivers for games and the VA-API driver for video playback. Mesa handles both pipelines through a single codebase, which keeps updates predictable.
Here is how to install the AMD acceleration stack.
sudo dnf install -y mesa-vulkan-drivers vulkan-tools libva-mesa-driver
# mesa-vulkan-drivers provides RADV for Vulkan rendering
# vulkan-tools gives you vulkaninfo for diagnostics
# libva-mesa-driver routes video decoding through the GPU
vulkaninfo --summary
# Prints the Vulkan driver name and supported layers
Look for RADV in the driver name. That is the open-source Vulkan driver maintained by Valve and the community. It supports every modern AMD GPU. The VA-API driver will appear in vainfo output as Mesa VA-API. Both pipelines share the same underlying Mesa library, so a single dnf upgrade --refresh keeps them synchronized.
Run vulkaninfo --summary after the install. If the terminal prints Driver name: radv, the graphics pipeline is wired correctly.
The fix for NVIDIA graphics
NVIDIA GPUs require the proprietary nvidia driver. Fedora does not ship it due to licensing restrictions. You must enable the RPM Fusion repository first. The akmod-nvidia package builds the kernel module against your current kernel. The build process takes three to five minutes. Do not interrupt it. The akmods service runs in the background and compiles the module against the running kernel headers.
Here is how to enable RPM Fusion and install the NVIDIA driver.
sudo dnf install -y \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# Adds the free and non-free RPM Fusion repositories
# Uses rpm -E %fedora to auto-detect your release number
sudo dnf install -y akmod-nvidia xorg-x11-drv-nvidia-cuda
# akmod-nvidia compiles the kernel module for your running kernel
# xorg-x11-drv-nvidia-cuda provides the X11 driver and CUDA libraries
sudo reboot
# Restarts the system so the new kernel module loads at boot
After the reboot, run nvidia-smi. The terminal should display a table with your GPU name, driver version, and memory usage. If the command prints NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, the module failed to load. Check journalctl -xe for modprobe errors or Secure Boot denials. Secure Boot blocks unsigned kernel modules by default. You must either disable Secure Boot in the firmware or sign the module manually.
Convention aside: Config files in /etc/ are meant for user modifications. Files in /usr/lib/ ship with the package and get overwritten on updates. Never edit files in /usr/lib/. If you need to adjust driver parameters, create a drop-in file in /etc/modprobe.d/ instead.
Reboot before you debug. Half the time the symptom is gone after the module finishes compiling.
Hardware video decoding in browsers
Firefox and Chromium use different backends for hardware decoding. Firefox relies on FFmpeg and VA-API. Chromium uses its own ANGLE and VA-API integration. Both require the ffmpeg package and the correct VA-API driver for your GPU. The browser cannot decode video hardware-accelerated without the underlying VA-API stack.
Here is how to enable browser hardware decoding.
sudo dnf install -y ffmpeg libva-utils
# ffmpeg provides the codec libraries browsers need
# libva-utils lets you verify the VA-API stack is working
Open Firefox and navigate to about:config. Search for media.ffmpeg.vaapi.enabled. Set it to true. Chromium enables hardware decoding by default on most Linux systems. If it falls back to software decoding, check chrome://gpu for the Video Decode section. It should say Hardware accelerated. If it says Software only, the VA-API driver is missing or the browser cannot find it.
Verify vainfo returns profiles before you tweak browser flags. The browser will not magically create acceleration that the system does not provide.
Verify it worked
Run the diagnostic tools for your specific GPU. Intel and AMD users should run vainfo and vulkaninfo --summary. NVIDIA users should run nvidia-smi and vainfo. The vainfo command is the universal test for video acceleration. It queries the VA-API library and prints every codec profile the GPU supports. If the list is empty, the acceleration pipeline is broken.
Here is what a successful VA-API query looks like.
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.3.3
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
The output confirms the driver loaded, the library initialized, and the hardware supports the major video codecs. If you see VAEntrypointVLD next to the profiles, the video decode pipeline is active.
Run vainfo before you open a video player. If the terminal does not list your codec profiles, the GPU is not doing the work.
Common pitfalls and what the error looks like
The most frequent failure is a mismatch between the VA-API driver and the GPU generation. Intel users often install only the legacy driver on a modern CPU. The terminal prints VA-API error: failed to initialize display. Install intel-media-driver instead. AMD users sometimes see EGL: Failed to create EGL display when running Vulkan applications. That means the Mesa Vulkan driver is missing or the X11/Wayland session is misconfigured. Run dnf reinstall mesa-vulkan-drivers to restore the files.
NVIDIA users frequently encounter Error: could not load kernel module nvidia. This happens when the kernel updates but the akmod build fails or Secure Boot blocks the signature. Run sudo dnf distro-sync to align the kernel packages, then reboot. The akmod service will rebuild the module automatically. If the build fails, check /var/log/dkms/nvidia.log for compiler errors. Missing kernel-devel or gcc packages are the usual culprits.
Another common issue is the browser ignoring hardware decoding despite correct driver installation. Firefox sometimes requires the media.av1.enabled flag to be set to true for AV1 streams. Chromium may need --enable-features=VaapiVideoDecoder on the command line if the automatic detection fails. Always verify with vainfo before tweaking browser flags.
Convention aside: systemctl status <unit> shows recent log lines AND state in one view. Always check status before restart. If akmods.service failed, systemctl status akmods will show exactly which kernel version it tried to build against.
Trust the package manager. Manual file edits drift, snapshots stay.
When to use this vs alternatives
Use the open-source Mesa stack when you run Intel or AMD hardware and want seamless updates through dnf upgrade --refresh. Use the proprietary NVIDIA driver when you need CUDA compute, DLSS, or the latest game compatibility. Use VA-API for video decoding when you want low CPU usage during playback or streaming. Use NVDEC or NVENC when you are running NVIDIA hardware and need hardware encoding for OBS or video editing. Stay on the default Fedora packages unless a specific application demands a newer Mesa version or a beta driver.
Run vainfo first. Read the actual error before guessing.