How to Install NVIDIA Drivers on Fedora Linux

Do you own an NVIDIA graphics card and want to use NVIDIA drivers instead of the default Nouveau driver in Fedora to enhance your gaming, video editing, and 3D rendering experience? If so, don’t worry, because this blog will explain various methods for installing NVIDIA Drivers on your Fedora, allowing you to unlock your GPU’s full potential.

Note: If you are a beginner Fedora user or prefer a more automated and easy method, we recommend you opt for the RPM Fusion method. However, if you are an experienced Fedora user, you can install NVIDIA Drivers manually to get more control over the versions of your drivers that best suit your GPU.

Let’s jump straight into the process of installing NVIDIA Drivers on Fedora.

Check NVIDIA GPU in Fedora

To determine if an NVIDIA GPU is installed on your computer, execute the following command, which will display information about the graphics and 3D acceleration devices connected to your system.

lspci | grep -Ei 'VGA|3D'

Sample Output:

00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1)
Check NVIDIA Card in Linux
Check NVIDIA Card in Linux

For the proprietary/official NVIDIA GPU drivers to function properly, you must update all the pre-installed packages using the following dnf command.

sudo dnf update --refresh

Now that your system is up-to-date, you can install your NVIDIA drivers to get the best performance out of your GPU.

Method 1: Installing NVIDIA Drivers Using RPM Fusion in Fedora

RPM Fusion is a third-party repository that offers numerous Fedora packages that are not available in the official repositories, and one of these packages is NVIDIA Drivers.

Many users prefer the RPM Fusion Repository for installing NVIDIA drivers as it is a more hassle-free method. Moreover, it may not offer the most recent drivers, but it surely offers the latest drivers that are tested and supported by the Fedora community.

However, if you utilize the RPM Fusion repository for NVIDIA driver installation, they will automatically receive updates alongside your system.

Install Kernel Headers and Development Tools

To install NVIDIA Drivers via RPM Fusion, you need to first install kernel development tools and kernel headers required for NVIDIA driver installation by running the following command:

sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
Installing Kernel Headers and Development Tools
Installing Kernel Headers and Development Tools

Install RPM Fusion Repositories in Fedora

After installing the required tools, you must execute the commands given below to add free and non-free RPM Fusion repositories to your system.

sudo dnf install$(rpm -E %fedora).noarch.rpm
sudo dnf install$(rpm -E %fedora).noarch.rpm
Install RPM Fusion in Fedora
Install RPM Fusion in Fedora

Once the repositories are added, you must update the package repository cache by executing the following command.

sudo dnf makecache
Update Dnf Package Repository
Update Dnf Package Repository

Install NVIDIA Driver and CUDA Support in Fedora

After updating the package repository, you can install NVIDIA drivers and CUDA toolkit for graphics-intensive tasks and GPU development using the command stated below.

sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
Install NVIDIA Driver and CUDA Toolkit
Install NVIDIA Driver and CUDA Toolkit

Finally, reboot your system to ensure that changes take place and auto-disable the Nouveau drivers so that you get to experience optimal performance for graphics-intensive tasks because of NVIDIA Drivers.

Method 2: Installing NVIDIA Drivers Manually in Fedora

Let’s now install NVIDIA Drivers manually using the Runfile of a specific driver version directly from the official website of NVIDIA.

Install Development Tools and Kernel Headers

You must install kernel development tools and kernel headers before installing any NVIDIA Driver by running the command stated below.

sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
Install Development Tools and Kernel Headers
Install Development Tools and Kernel Headers

Download NVIDIA Driver

After installing the required tools and kernel headers, navigate to NVIDIA’s official website to search for the specific NVIDIA Driver by selecting “Product Type”, “Product Series” and “Product” according to your graphic card specifications/details. Also, choose “Operating System” as “Linux 64-bit” and press the “Search” button.

NVIDIA Driver Downloads
NVIDIA Driver Downloads

You will receive a list of drivers that meet the search criteria. Simply click on the one you want to install to view its details and press the “Download” button to download the Runfile of a specific NVIDIA driver.

Details of Selected NVIDIA Driver
Details of Selected NVIDIA Driver

Once you click on the download button, the “Agree & Download” agreement will open. Simply, click on the “Agree & Download” button to start downloading the Runfile automatically.

NVIDIA License Agreement
NVIDIA License Agreement

While the NVIDIA Driver “.run” file is downloading, you must disable the default Nouveau Drivers of your system to install this smoothly.

Disabling Nouveau Drivers in Fedora

Run the command given below to blacklist the Nouveau driver and disable mode-setting for the Nouveau driver, which will ensure that your Nouveau driver does not conflict with the NVIDIA driver.

$ echo -e "blacklist nouveau\noptions nouveau modeset=0" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
Disable Nouveau Driver
Disable Nouveau Driver

Regenerate Initramfs and Reboot

Next, let’s regenerate the initramfs image with the new blacklisting configuration to prevent the Nouveau driver from loading using the command stated below.

sudo dracut --force

Next, we’ll execute the following command to configure the system’s default target as ““, which will result in Fedora booting into a text-based, multi-user mode instead of a graphical user interface (GUI).

sudo systemctl set-default

Finally, reboot your system.

sudo reboot

Install NVIDIA Driver

Upon restarting your system, you’ll find yourself in command-line mode, just proceed to the directory where you saved the downloaded NVIDIA Runfile.

cd ~/Downloads

Next, change the permission of the downloaded NVIDIA Driver Runfile to executable using the command mentioned below.

chmod +x NVIDIA-Linux-*.run

Finally, you can install the NVIDIA Driver by running the below command.

sudo ./NVIDIA-Linux-*.run
Installation of NVIDIA Driver
Installation of NVIDIA Driver

During the installation, you will need to respond to some prompts based on your preferences.

For the prompt related to “NVIDIA 32-bit C compatibility libraries”, you can choose “yes” to enable your system to run 32-bit applications.

NVIDIA 32-bit C Compatibility Libraries
NVIDIA 32-bit C Compatibility Libraries

Next, when prompted about “Kernel Module Sources with DKMS”, you can choose the “Yes” option to enable DKMS for automatic module updates when your kernel is updated.

Kernel Module Sources with DKMS Prompt
Kernel Module Sources with DKMS Prompt

If you encounter any other prompts, choose an option according to your requirements and wait for the installation process to complete. Finally, select “OK” on the prompt that congratulates you on successfully installing the NVIDIA drivers.

Successful Installation of NVIDIA Driver
Successful Installation of NVIDIA Driver

Enable GUI and Reboot

Now that the NVIDIA driver is successfully installed in our system, it’s time to re-enable our system’s GUI mode by executing the command given below.

sudo systemctl set-default

To make changes take effect and use your system in GUI mode, you need to reboot your system.

sudo reboot

If you want to confirm if the NVIDIA Driver is working or not, execute the “nvidia-smi” command.

Confirm Installed NVIDIA Driver
Confirm Installed NVIDIA Driver

Enjoy the working of your graphic driver!

Installing NVIDIA VAAPI/VDPAU Drivers on Fedora [Optional]

Let’s conclude our blog post, by installing additional (optional) NVIDIA VAAPI/VDPAU drivers to enhance the performance of specific tasks, including video playback, streaming, and recording.

To install NVIDIA VAAPI/VDPAU drivers in your Fedora, simply run the command stated below.

sudo dnf install nvidia-vaapi-driver libva-utils vdpauinfo

Important: Don’t get confused by the installation of NVIDIA VAAPI/VDPAU drivers; they only boost the performance of your graphic card for special tasks. However, the NVIDIA drivers are required for the proper functioning of the NVIDIA graphics card.

That’s all for now! If you encounter any issues during the installation of your NVIDIA Drivers, please don’t hesitate to ask for guidance in the comment section.

You should now have the NVIDIA drivers installed on your Fedora system, and you can proceed to enjoy best games with improved graphics performance.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.


Leave a Reply
  1. Please stop recommending the Method 2 manual way of installing the Nvidia Driver on Fedora. The Nvidia driver has been in the Third Party Repos for a long time now, and the manual method causes too many problems.

    The Fedora Forums always have these links to sites with the manual method and peoples machines borking because of it.

    Anyone looking to install Nvidia Drivers on Fedora just use the Third party Repo, or the Negativo17 Repo from their site.

    • @Hammerhead,

      Thank you for the heads up! We’ll make sure to recommend the Third Party Repo or the Negativo17 Repo for Nvidia driver installation on Fedora moving forward. Appreciate the input!

  2. THANK YOU!!!

    The RPM method worked great and saved my life! The display looked HORRIBLE with the Nouveau driver.

    Fedora 39 workstation (desktop), GeForce RTX 4060 Ti

  3. “00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)”

    it is not showing my Nvidia Card… How to solve this?

  4. Hi,

    thank you for a great article! The described approach worked perfectly fine for me for the Lenovo ThinkPad P50 running RHEL 7.3 with the only discrete NVIDIA Quadro M1000M video card enabled.

  5. I had same problem with my Thinkpad T520. But instead of hacking away at kernel I did something more simple. First off I am using Centos7 I installed base system all worked fine. I then added GNOME GUI later which is when I started getting the problems mentioned above.

    I notice that a lot of manufacturers set up for Windows installs. The graphics card is setup usually for Win7 (NVIDIA OPTIMUS) I reset it to integrated graphics mode and no more hanging/errors.

    How to do it? Reboot your Thinkpad hit F1 or blue thinkvantage button to get into BIOS. Go to graphics select integrated graphics then F10 to save and exit. There are 3 setting for this card: Integrated,Discrete and NVIDIA OPTIMUS(Win7 only?)

    Hope this saves someone some time?

  6. I followed the guide to the point which I generate the X configuration file:

    Me: X -configure
    Linux: Number of created screens does not match number of detected devices.

    Looks like its a famous error – maybe because I have Nvidia Optimus selection locked in boot?!
    What do you think is the problem? Do you know any solutions?

    Thanks for the reply in advance!

  7. Hi!

    Most people say don’t disable Nouveau driver after installing Nvidia or the X-interface won’t come up.

    I haven’t tried this method yet (I have Bumblebee installed, but want to completely disable the Intel GPU)…

    Do you recommend it to me?

    • You have to add the repositories.

      You can:

      Search the internet for say Java Development Tools and from the tutorials execute only the lines that add the repos.


      Install Yumex (Yum Extender – Has a GUI) and in Yumex check “Development Tools” and apply the changes.

  8. Need some assist from you please. I’ve done all the steps, but when i start nvidia x server settings this pops up: “You do not appear to be using the NVIDIA X driver”. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server” . If i start nvidia-xconfig it creates config file but system never boots up saying “fatal error no screens found”. My laptop is lenovo y580 hd4000 + gtx660m + debian wheezy 7.6.0 , maybe this is due to the optimus? But in ubuntu 14.04 in additional drivers it installs and works out of the box. What could be the problem? Please, advise.

    • “Debian 7.5 lenovo y580 nvidia optimus. I didn’t everthing as it is said and the system desn’t see nvidia it log in with gnome classic. I got an error while runing this command X -cinfigure. At the end it said “number of created screens does not match numer of detected devices. Configuration faild.” Any ideas? The second day I’m trying to install nvidia graphic card and nothing works (tried with bumblebee without success).”

      Same story! I can not understand, if this problem due to optimus, why everything works in ubuntu with proprietary driver as a result it’s possible to choose between intel and nvidia graphics without any optimus, but in debian it it said “Configuration

      As the nvidia driver is not autodetected by Xorg, a configuration file is required to be supplied. For example:


      Section “Device”
      Identifier “My GPU”
      Driver “nvidia”

      Please note that this configuration will break Xorg on Optimus systems. For such hardware, see Bumblebee instead.”

  9. Hellooo .. how to install nvidia geforce gt 635m on oracle linux ? my laptop asus k55v, im a noob in linux .. could you guys help me ? pls

  10. Debian 7.5 lenovo y580 nvidia optimus. I didn’t everthing as it is said and the system desn’t see nvidia it log in with gnome classic. I got an error while runing this command X -cinfigure. At the end it said “number of created screens does not match numer of detected devices. Configuration faild.” Any ideas? The second day I’m trying to install nvidia graphic card and nothing works (tried with bumblebee without success).

  11. It works, thanks! Few tips on RHEL 6.5 & Lenovo W520 (NVIDIA GF108GLM Quadro 1000M):
    – On BIOS set video mode to Discrete
    – Add kernel parameter noapic to prevent hang on boot when video mode is set to Discrete

  12. Hi,

    Thankyou for writing this guide. I am new to Linux and I also folowed an other guide of you to install Mint the Dual Boot way.

    I followed every step, but I used service stop mdm. There was no gdm3. Now I can only run Mint in this safe mode.

    Is there any change I can change it back?

  13. Hello,

    Thanks for the tips. The driver installation nvidia quadro k2000 worked perfectly on CentOS 6.5. However, the startup and shutdown were the black screen mode, ie, no longer shows the logo CentOS Loading.

    I tried to reactivate the file /boot/initramfs-$(uname-r).img.bak, but he claims he does not think the nouveau.

    What should I do?

    Thanks in advance for your attention.

  14. I went the ElRepo direction for Cent OS 6.5, and it worked… sort of. My remaining issue is that the evaluation desktop I’m using has an older (6-8 yrs) Samsung LCD 26″ display, but the NVIDIA Config Wizard is sensing it as a 40″ display, so no matter what resolution I set it to, I cannot see the entire screen.

    Has anyone seen this? And if so, do you have a workaround that you’d like to share?


  15. FEDORA 20 error after X -configure. “… number of created screens does not match number of detected devices”. Do you know how to fix it? i am pretty new in linux world, so please understand my little knowledge about fedora

  16. I completely broke my install of Fedora 20 between rebooting and going into command mode. All I get is a blank screen. I can’t even get into a different run level using Grub2. Oh well. At least it was a [mostly] fresh install.

  17. I followed the instructions for a Debian Wheezy installation, except that I did the whole thing from the console, as I could never get x to start using nouveau. I am using an itx board but with a pcie video card (to run full hd on a mythtv installation). lspci finds the card, and only the card. In console mode the nouveau driver must be successfully blacklisted because it does not appear in lsmod, but nvidea does. So I guess in console I am using the nvidea driver. However X -configure fails, failing to write a screen into the configuration, so of course startx fails with the ‘no screen found error’

    • I have now got to the stage of getting the Nvidia driver into the conf file. But now it says input/output error on /dev/nvidia0 when I try to launch x

      • sorry abou the staggered replies, iḿ just a day old using linux and it has been quite overwhelming, i was able to log into root but then it asked me to use the telinit 3 user space, after that i still contunied to get errors.

        the error i seem to be getting is a Noueau driver error, but i thought i had blacklisted that.

        here is the log file entry

        nvidia-installer log file ‘/var/log/nvidia-installer.log’
        creation time: Tue Jan 7 00:32:14 2014
        installer version: 331.20

        PATH: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

        nvidia-installer command line:

        Using: nvidia-installer ncurses user interface
        -> Tagging shared libraries with chcon -t textrel_shlib_t.
        -> License accepted.
        -> Installing NVIDIA driver version 331.20.
        ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution’s documentation for details on how to correctly disable the Nouveau kernel driver.
        WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your system since these files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file. Please consult the NVIDIA driver README and your Linux distribution’s documentation for details on how to correctly disable the Nouveau kernel driver.
        ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at

        thanx again

  18. Hi!
    I have Debian 7 KDE (wheezy) and I’ve followed your guide upto killing X server (I did [code]# service kdm stop [/code]). After that my screen went black and the system rebooted. Since I have Debian in dual booting with Win7, when I picked Debian from GRUB’s menu, I was taken to the black-background command line instead of the typical Debian kde desktop. I logged in with username and password, but don’t know how to proceed from there on. I’ve pressed Ctrl+Alt+(F1 to F12) but nothing special happened.

    Can you tell me what to do after the command-line-style login? I don’t want to re-install Debian as Scott Borisch (above) had to do.

    • Once You logged onto Shell from command line, follow the above tutorial as

      # X -configure
      # cp /root/ /etc/X11/xorg.conf
      # startx

      It should work for you. Execute above command as root.

  19. Avishek – I’m new to the Debian distro …

    This seems very straight forward and I appreciate you taking the time to share this with the group – however before I attempt to make the Quadro 600 work properly with my Debian 6 Squeeze, I have a couple of questions…

    Since I’m running Squeeze and not Wheezy … should the line in my /etc/apt/sources.list file contain “squeeze” rather than wheezy like in my example below? Or are we specifically sourcing the drivers from the wheezy repository for this purpose?

    My sources.list file… see the last line for what I WANT to try…

    deb squeeze/updates main contrib
    deb-src squeeze/updates main contrib
    deb [arch=amd64,i386] squeeze main contrib non-free
    deb [arch=amd64,i386] squeeze-updates main contrib
    deb-src squeeze-updates main contrib
    deb squeeze main contrib non-free

    Thanks … I’ll hold off until I hear a response … unfortunately I can’t afford to rebuild this system if this fails :-( but on the other hand, having a second monitor is an indispensable feature that may be worth the gamble.


    • @ Ivan Tuma,
      since you are using squeeze, it is normal to have squeeze software sources in /etc/apt/sources.list.
      Before proceeding backup your /etx/X11/xorg.conf, so that in case u brake X, you can restore.

      If you face any problem, you can contact me here.
      Hope it Helps

      • Thanks – unfortunately there is something broken in my whole Xsession setup. My system is a “realized” VM (using P2V). I don;’t know how this effected my xsession config – but when I try running the X -configure, I get all kinds of error stating that the number of displays does not match. Unfortunately I didn’t capture the errors. It took me a couple of hours to back out of the changes (I uninstalled the Nvidia drivers).

        I would be perferctly content using the Nouveau driver … I don’t need 3D accelleration since my system is only being used to write code and look at pdf files. but even that one requires one to build a new xorg.conf file, and I get the same errors with mismatching number of displays.

        These instructions should allow you to configure nouveau for dual monitors (for those who cant make Nvidia work)…

        Once I find time to go through this again, I’ll post my results…

  20. Hi,

    When I run:

    service gdm3 stop

    I get a completely black screen, with a cursor. which is NOT a prompt.
    That is, if I type, say, ls, and hit return, I get nothing but a new line.

    This black screen issue seems to be mentioned here:

    After rebooting, X windows was dead, and even using a recovery disk and reverting
    to the original did not fix the problem.
    I had to completely re install Debian Wheezy.
    Has anyone else seen this issue?

    – Scott

    • @ scott Borisch, if u get blank screen after killing X session.
      Goto console Ctrl+Alt+F1 ….. F6. Login, and then perform installation of NVIDIA driver as stated above. You may need to reconfigure your X session, if u finds it difficult u can send me ssh login details @ [email protected].

  21. Got stuck after performing the above steps for installing driver for Fedora 19(GT 520MX). “lspci” identified graphics card as 3D controller.

    Skipped the “X -configure” and “cp /etc/X11/xorg.conf” steps considering
    the above comment by John H. Installtion was successful without any errors. But Gnome is not loading (black screen and nothing happening). Help needed…….?

    • Dear Anoop,

      Please follow the steps correctly, don’t mix two concept, (from two people) at a point.
      Now for your problem.

      Run as root:

      /etc/init.d/gdm stop (to kill x server)

      X -configure (creates a file at /root/)

      cp /root/ /etc/X11/xorg.conf (copy this file to /etc/X11 as xorg.conf)

      /etc/init.d/gdm start (to start x server)

      Hope it helps.

  22. Hey,
    i did the instruction in the centos manual and when i reach the part where i need to install the nvidia driver i get this error:

    “ERROR: Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.”

    anyone can help?? please!

  23. Hi, guys! I am trying to install the drivers for Ubuntu system.
    However, I have problems with

    “apt-get install nvidia-kernel-dkms nvidia-glx nvidia-xconfig nvidia-settings”.

    The terminal gives me back this one:

    “Package nvidia-glx is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package nvidia-kernel-dkms is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package ‘nvidia-kernel-dkms’ has no installation candidate
    E: Package ‘nvidia-glx’ has no installation candidate
    E: Unable to locate package nvidia-xconfig”

    Any idea how to overcome this problem?

    • @ tonla install nvidia-glx, nvidia-kernel-dkms or anyother dependency by installing these manually, (Download these packages and dpkg -i *.deb to install them).

      You can alternatively set needed repo.

  24. So, attempted to install this on Ubuntu 12.04 and I cannot do an apt-get update without getting a NO_PUBKEY error:

    W: GPG error: wheezy Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA

  25. Or just use Mageia, the nvidia driver is in the supported repo, and there is a graphical tool to install, set up and switch to the driver if you don’t select it at install time.

  26. The nVidia driver should do that last step for you so you shouldn’t have to do X -configure, FYI. The last part of script copies to the xorg automatically.


Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.