How to Install RPM Fusion on Fedora Linux

RPM Fusion extends Fedora with software that cannot be included in the official repositories due to licensing, patents, or legal restrictions. Installing RPM Fusion unlocks multimedia codecs for playing MP3s and DVDs, proprietary NVIDIA graphics drivers for gaming and CUDA workloads, popular applications like Discord, VLC, Steam, and OBS Studio, and firmware packages that many hardware devices require for full functionality.

This guide walks you through enabling the RPM Fusion Free and Nonfree repositories, installing optional tainted branches for region-restricted software like libdvdcss, and configuring testing repositories for early access to package updates. By the end, you will be able to play commercial DVDs, install Windows-compatible games through Steam, encode video with full codec support, and run media applications like Plex and HandBrake without codec restrictions.

Update Fedora Linux Before RPM Fusion Installation

Ensure your Fedora Linux system is up-to-date before installing RPM Fusion repositories. This prevents potential conflicts and maintains good system health. For tips on improving update performance, see our guide on increasing DNF speed on Fedora.

Update your system with the following command:

sudo dnf upgrade --refresh

This command will refresh the repository metadata and upgrade all existing packages to their latest versions.

Check If RPM Fusion Already Exists Before Proceeding

Check whether RPM Fusion is already enabled before proceeding. You may have enabled third-party repositories during the Fedora installation process.

Verify the current repository status with this command:

dnf repolist | grep rpmfusion

This command searches the output of dnf repolist for any occurrences of “rpmfusion.” If RPM Fusion is not installed, you will see no output (empty result), indicating you can proceed to the next section. If repositories are already enabled, you will see output similar to:

rpmfusion-free                RPM Fusion for Fedora - Free
rpmfusion-free-updates        RPM Fusion for Fedora - Free - Updates

Install RPM Fusion Free Repository

Install the RPM Fusion Free repository if you prefer open-source software exclusively. Run the following command:

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

This command downloads and installs the RPM Fusion Free repository package, tailored to your specific Fedora version.

Install RPM Fusion Non-Free Repository

Install the RPM Fusion Non-Free repository to access both open-source and proprietary software packages. Execute the following command:

sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Similar to the previous step, this command downloads and installs the RPM Fusion Non-Free repository package tailored to your Fedora version.

Install Both Repositories at Once

If you want both Free and Nonfree repositories, you can install them in a single command:

sudo dnf install 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

After installing RPM Fusion, enable the Cisco OpenH264 repository for improved video codec support. This uses the modern DNF5 syntax:

sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1

Verify the RPM Fusion Installation

After importing and enabling the desired RPM Fusion repositories, verify the installation succeeded. Run the following command to confirm repositories were added correctly:

dnf repolist | grep rpmfusion

If the installation was successful, you should see output similar to the following:

rpmfusion-free                RPM Fusion for Fedora - Free
rpmfusion-free-updates        RPM Fusion for Fedora - Free - Updates
rpmfusion-nonfree             RPM Fusion for Fedora - Nonfree
rpmfusion-nonfree-updates     RPM Fusion for Fedora - Nonfree - Updates

Enable RPM Fusion Testing Updates (Optional)

Enabling the RPM Fusion Testing repositories might be helpful for users interested in accessing the latest bleeding-edge updates, such as beta releases or new NVIDIA drivers. Remember that packages in the Testing repositories may be unstable, so use them cautiously. If you plan to install NVIDIA drivers, ensure you have kernel headers installed first.

Enable the Free Testing Updates Repository

Enable the RPM Fusion Free Testing Updates repository with this command:

sudo dnf config-manager setopt rpmfusion-free-updates-testing.enabled=1

This command activates the RPM Fusion Free Testing Updates repository, granting access to the latest in-development packages that stable repositories do not yet include.

Enable the Non-Free Testing Updates Repository

Similarly, to enable the RPM Fusion Non-Free Testing Updates repository, run:

sudo dnf config-manager setopt rpmfusion-nonfree-updates-testing.enabled=1

Likewise, this command activates the RPM Fusion Non-Free Testing Updates repository, providing access to the newest proprietary packages still under development.

Verify the Enabled Testing Repositories

After enabling the desired RPM Fusion Testing repositories, confirm they appear in your repository list. Run the following command to verify the testing repositories are active:

dnf repolist | grep rpmfusion

This command searches the output of dnf repolist for any occurrences of “rpmfusion.” You should see additional testing repositories in the output:

rpmfusion-free                       RPM Fusion for Fedora - Free
rpmfusion-free-updates               RPM Fusion for Fedora - Free - Updates
rpmfusion-free-updates-testing       RPM Fusion for Fedora - Free - Test Updates
rpmfusion-nonfree                    RPM Fusion for Fedora - Nonfree
rpmfusion-nonfree-updates            RPM Fusion for Fedora - Nonfree - Updates
rpmfusion-nonfree-updates-testing    RPM Fusion for Fedora - Nonfree - Test Updates

Install Tainted RPM Fusion Repositories

RPM Fusion provides “tainted” repositories for both free and non-free software. These repositories contain packages that some countries may consider illegal, such as playing DVDs using libdvdcss. This section will guide you through installing these tainted repositories and provide examples.

Install Tainted RPM Fusion Free Repository

To install the tainted RPM Fusion Free repository, which includes support for free and open-source software packages, execute the following command:

sudo dnf install rpmfusion-free-release-tainted

Install libdvdcss

Once you install the tainted RPM Fusion Free repository, you can add packages like libdvdcss for DVD playback. Run this command:

sudo dnf install libdvdcss

Install Tainted RPM Fusion Non-Free Repository

To install the tainted RPM Fusion Non-Free repository, which provides support for non-free or proprietary software packages, execute:

sudo dnf install rpmfusion-nonfree-release-tainted

Install Additional Firmware Packages

Additionally, the tainted nonfree repository contains firmware packages without clear redistribution status but allowed for hardware interoperability. Install all available firmware with:

sudo dnf --repo=rpmfusion-nonfree-tainted install "*-firmware"

Verify Installed RPM Fusion Repositories

Once you have completed the installation process, you can verify the presence of all installed RPM Fusion repositories using the grep command. To check the dnf repolist, execute:

dnf repolist | grep rpmfusion

RPM Fusion Command Examples

After configuring RPM Fusion repositories, you can search for and install packages unavailable in Fedora’s default repositories. Popular applications such as Discord, Slack, and Google Chrome are now accessible through RPM Fusion.

Install RPM Packages

Install a package using the DNF package manager with the following syntax:

sudo dnf install <package name>

For example, to install Discord:

sudo dnf install discord

Search for Packages in the RPM Fusion Repository

Search for available packages across all enabled repositories, including RPM Fusion, using the dnf search command. For instance, to find Discord:

dnf search discord

Install DNF Utilities

For more detailed package information, install the dnf-utils package, which provides additional management tools:

sudo dnf install dnf-utils

Repo Query Command

Once dnf-utils is installed, use the repoquery command to retrieve detailed package metadata. Continuing with the Discord example:

repoquery -i discord

This displays detailed package information including the source repository:

Name         : discord
Version      : 0.0.37
Release      : 1.fc43
Architecture : x86_64
Size         : 91 M
Source       : discord-0.0.37-1.fc43.src.rpm
Repository   : rpmfusion-nonfree
Summary      : Discord Client

Install RPM Fusion AppStream Metadata

RPM Fusion provides AppStream metadata so packages appear in GNOME Software and KDE Discover. This enables GUI-based package browsing and installation through your desktop’s software center instead of requiring terminal commands. With DNF5, install the metadata packages directly:

sudo dnf install rpmfusion-free-appstream-data rpmfusion-nonfree-appstream-data

Switch to Full FFmpeg

Fedora ships ffmpeg-free by default, which works for most situations but can cause version mismatches with RPM Fusion packages. Therefore, switching to the full ffmpeg build from RPM Fusion provides better compatibility:

sudo dnf swap ffmpeg-free ffmpeg --allowerasing

Consequently, after switching, you do not need to install libavcodec-freeworld separately since it only complements ffmpeg-free.

Install RPM Fusion Multimedia Codecs

RPM Fusion repositories include additional codecs for GStreamer-based applications like VLC, Totem, and Firefox. Install the multimedia complements with:

sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

Install Hardware Accelerated Video Codecs

For optimal video playback and encoding performance, install hardware acceleration drivers matching your GPU manufacturer.

Intel (recent GPUs):

sudo dnf install intel-media-driver

Intel (older GPUs):

sudo dnf install libva-intel-driver

AMD (mesa freeworld drivers):

sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld

NVIDIA (VAAPI wrapper for NVDEC/NVENC):

sudo dnf install libva-nvidia-driver

Verify Hardware Acceleration

Once hardware acceleration drivers are installed, confirm they function correctly. For VAAPI support, install vainfo and examine available profiles:

sudo dnf install libva-utils
vainfo

Successful output shows your GPU and supported decode/encode profiles:

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
VAProfileH264Main               : VAEntrypointVLD
VAProfileH264Main               : VAEntrypointEncSlice
VAProfileHEVCMain               : VAEntrypointVLD

Alternatively, for VDPAU support (AMD/NVIDIA), install vdpauinfo:

sudo dnf install vdpauinfo
vdpauinfo

This displays your GPU capabilities for video decoding:

display: :0   screen: 0
API version: 1
Information string: Mesa Gallium driver 23.3.1 for AMD Radeon RX 6800

Video surface:
name   width height types
-------------------------------------------
420     16384  16384  NV12 YV12
Decoder capabilities:
name                        level macbs width height
------------------------------------------------------------
MPEG1                          NA  9216  2048  1152
H264_MAIN                      51  9216  2048  1152

Additional RPM Fusion Commands

This section will discuss additional RPM Fusion commands for use with Fedora Linux. We will explain how to disable RPM Fusion Testing Updates, remove RPM Fusion repositories, and reinstall them if necessary.

Disable RPM Fusion Testing Updates

If testing repositories are no longer needed, disable them by executing the commands corresponding to the repositories you previously enabled.

Disable the Free Testing Updates Repository:

sudo dnf config-manager setopt rpmfusion-free-updates-testing.enabled=0

Disable the Non-Free Testing Updates Repository:

sudo dnf config-manager setopt rpmfusion-nonfree-updates-testing.enabled=0

Remove RPM Fusion Repositories

To completely remove RPM Fusion repositories from your system, use the dnf remove command with the package names shown below.

Free RPM Fusion Repository Removal Command:

sudo dnf remove rpmfusion-free-release

Non-Free RPM Fusion Repository Removal Command:

sudo dnf remove rpmfusion-nonfree-release

Free (Tainted) RPM Fusion Repository Removal Command:

sudo dnf remove rpmfusion-free-release-tainted

Non-Free (Tainted) RPM Fusion Repository Removal Command:

sudo dnf remove rpmfusion-nonfree-release-tainted 

Consequently, removing these repositories will prevent your system from receiving updates or installing packages from the RPM Fusion sources.

Troubleshooting RPM Fusion Issues

Despite following standard installation procedures, you may encounter common issues when using RPM Fusion repositories.

Broken Dependencies During Updates

If dnf shows broken dependencies between Fedora and RPM Fusion packages during updates, you will see errors like:

Error:
 Problem: package vlc-1:3.0.20-1.fc43.x86_64 requires libavcodec.so.60, but none of the providers can be installed
  - conflicting requests
  - nothing provides ffmpeg-libs = 6.1 needed by ffmpeg-free-6.1-1.fc43.x86_64

This typically occurs when one package is in the testing repository while its counterpart remains in stable. Check which repositories provide the conflicting package:

dnf list --showduplicates ffmpeg-libs

Subsequently, enable the testing repository temporarily to resolve the conflict:

sudo dnf --enablerepo=rpmfusion-free-updates-testing --enablerepo=rpmfusion-nonfree-updates-testing update

Finally, after the update completes, verify all packages installed successfully:

dnf list installed | grep rpmfusion

Repository Metadata Errors

If you encounter metadata download failures, you will see errors like:

Error: Failed to download metadata for repo 'rpmfusion-free-updates': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

This indicates the RPM Fusion mirrors may be temporarily unavailable. First, check mirror connectivity:

curl -I https://mirrors.rpmfusion.org/free/fedora/

If mirrors are down, temporarily switch from mirrorlist to direct baseurl:

sudo sed -i 's|^#baseurl|baseurl| ; s|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/rpmfusion*free*repo

Then verify the repository is now accessible:

dnf clean metadata && dnf repolist | grep rpmfusion

Once mirrors recover, revert to mirrorlist with this command:

sudo sed -i 's|^baseurl|#baseurl| ; s|^#mirrorlist|mirrorlist|' /etc/yum.repos.d/rpmfusion*free*repo

Steam and Gaming Dependencies

Many gaming applications like Steam require 32-bit libraries from RPM Fusion. If Steam fails to launch, you will see errors like:

libGL error: failed to load driver: radeonsi
failed to initialize GL

First, check which 32-bit graphics drivers are installed:

rpm -qa | grep mesa.*i686

Next, install the 32-bit mesa freeworld drivers for full codec support:

sudo dnf swap mesa-va-drivers.i686 mesa-va-drivers-freeworld.i686
sudo dnf swap mesa-vdpau-drivers.i686 mesa-vdpau-drivers-freeworld.i686

Finally, verify the freeworld drivers are installed:

rpm -qa | grep mesa.*freeworld.*i686

You should see output confirming both packages:

mesa-va-drivers-freeworld-23.3.1-1.fc43.i686
mesa-vdpau-drivers-freeworld-23.3.1-1.fc43.i686

Conclusion

You now have RPM Fusion configured with access to the Free, Nonfree, and optional tainted repositories. With multimedia codecs and hardware acceleration drivers installed, you can play commercial DVDs, encode video with full codec support in applications like HandBrake, and run Windows games through Steam with proper graphics acceleration. Install multimedia applications such as VLC or Plex, set up OBS Studio for streaming, or configure NVIDIA drivers for CUDA workloads. Run sudo dnf upgrade --refresh periodically to keep both Fedora and RPM Fusion packages current.

Leave a Comment