If Not True Then False

Fedora 27/26/25 nVidia Drivers Install Guide - Comment Page: 59

This is guide, howto install nVidia proprietary drivers on Fedora 27/26/25/24/23/22/21 and disable Nouveau driver. This guide works with GeForce 6/7/8/9/200/300/400/500/600/700/800/900/10 series cards. GeForce 400/500/600/700/800/900/10 series cards works with 384.xx, 387.xx and 390.xx nVidia drivers GeForce 8/9/200/300 series cards works with 340.xx nVidia drivers GeForce 6/7 series cards works...
Categories:
Tagged with:

1574 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Input your comment.
help

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.

bill

I upgraded F26 to 27 with the command line tool, and that’s it.

The driver have been correctly taken care of by dkms, I guess, so that’s great.

If anybody is wondering how to correctly upgrade Fedora with these drivers installed (I confess I was a bit worried and prepared for text-based system adjustments)… well just upgrade ;-)

reply Reply
Kevin De Baerdemaeker

nvidia-installer: version 384.111 (buildmeister@swio-display-x86-rhel47-01)

Linux fedora 4.14.14-300.fc27.x86_64 #1 SMP Fri Jan 19 13:19:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

20:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)

reply Reply
Rodrigo Hashimoto

Fantastic!! Coming from other OS such as Windows 10 (gaming) and Ubuntu (everything else), I’m surprise to see how smoothly Fedora is running. The only issue I found is the Network Manager applet in the top bar, not automatically connecting. I have to manually set IP / GW / DNS but honestly it’s not a big deal, certainly I’ll figure this out soon or later. In the worst case scenario, I’ll script it. Anyway, it recognized my 1080TI GPU even with nouveau driver, I surely wasn’t expecting this. Maybe cause my last GPU install trial was a very long time ago.

Congrats for your article, without it I certainly would not install it properly, I’d have no clue that this distro has this many tweaks for a simple driver install.

Keep it up!

reply Reply
Rodrigo Hashimoto

I’m just wondering how smoothly will run some native Gnu games.

Or even more importantly, will this driver support my GPU resources such as temperatue, cooler, etc?

I hope so :)

Trying to find out some nice monitoring applets or tools so I can keep an eye on it.

Maybe I can even switch places now. Running Gnu as main OS and Win10 as VM for specific apps that I might need.

Cheers!

reply Reply
Ming

Worked mostly for me. I had a hicup at some point because my system’s kernel headers were out of sync.

The NVIDIA installer errored out when running the dkms command. I had to make sure I had my kernel-headers installed properly.

dnf install kernel-devel-$(uname -r)

Fixed it for me.

[root@redberret ~]# nvidia-installer -v |grep version
nvidia-installer: version 384.111 (buildmeister@swio-display-x86-rhel47-01) Wed Dec 20 00:05:39 PST 2017
[root@redberret ~]# uname -a
Linux redberret 4.13.9-300.fc27.x86_64 #1 SMP Mon Oct 23 13:41:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@redberret ~]# lspci |grep -E “VGA|3D”
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

reply Reply
JR

Hi Ming,

If you follow guide and fully update your system and reboot (Step 2.4), then you should have latest kernel on (step 2.5) and latest version of kernel-devel package installed.

reply Reply
DJ Gruby

Thank you so much for this guide! It works like a charm!

$ nvidia-installer -v | grep version
nvidia-installer: version 384.111 (buildmeister@swio-display-x86-rhel47-01) Wed Dec 20 00:05:39 PST 2017
$ uname -a
Linux localhost.localdomain 4.14.14-300.fc27.x86_64 #1 SMP Fri Jan 19 13:19:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lspci |grep -E “VGA|3D”
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050] (rev a1)

reply Reply
Angus

Got to installing the .run and got an error that :

ERROR: Failed to run `/sbin/dkms build -m nvidia -v 304.137 -k 4.14.14-200.fc26.x86_64`:
Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
make -j2 KERNELRELEASE=4.14.14-200.fc26.x86_64 module SYSSRC=/lib/modules/4.14.14-200.fc26.x86_64/build………………(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.14-200.fc26.x86_64 (x86_64)
Consult /var/lib/dkms/nvidia/304.137/build/make.log for more information.

Destroyed the kernel. Not boot-able. Kernel panic.

Spent a good amount of time trying to recover. Moral: don’t use a machine that you _need_.

reply Reply
Mario Junior

Same problem here with Fedora 27, Nvidia 390.25 and kernel 4.4.16-300.fc27.x86_64. My GPU is a GTX 1080.

reply Reply
bill

According to this thread:
https://ask.fedoraproject.org/en/question/117023/kernel-41416-300-gcc-731-dkms-failure-solved/
It’s an issue with the latest stable Fedora kernel and dkms.
Basically, the newest kernel (4.14.16-300) has been compiled with gcc-7.3.1, while the latest available version of gcc for Fedora 27 is gcc-7.2.1, hence dkms can’t compile the kernel correctly to add the NVIDIA module.

So, my solution is to start the PC with the previous kernel (4.14.14-300) selecting it from grub, or you can update the gcc to the test version.

I hope in a future update they fix this mess.

reply Reply
JR

Hi Alex,

Sorry this was my mistake. Try:

wget https://rpms.if-not-true-then-false.com/nvidia/NVIDIA-Linux-x86_64-340.106-patched.run
reply Reply
Keith

I got a similar error to Angus, I just was using a different driver and kernel :

ERROR: Failed to run `/sbin/dkms build -m nvidia -v 390.25 -k 4.14.16-300.fc27.x86_64`:
Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
make -j2 KERNELRELEASE=4.14.16-200.fc27.x86_64 module SYSSRC=/lib/modules/4.14.16-200.fc27.x86_64/build………………(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.16-200.fc27.x86_64 (x86_64)
Consult /var/lib/dkms/nvidia/390.25/build/make.log for more information.

I was able to recover by uninstalling and going back to nouveau. In looking at the log files, make failed due to a mismatch of gcc, 7.2 versus 7.3. Looks like the make is looking for gcc 7.3 and the kernel was complied with 7.2. Anyone else have this problem? It says you can change the mismatch flag to ignore it, but I am unsure what that will do to other modules. Feedback would be appreciated.

reply Reply
Keith

I found three solutions to this other than what was done above. This is for Fedora 27 and .16 kernel.

1. Use the -A and –no-cc-version-check options when running the NVIDIA*.run file. A little risky if you ask me as it may cause other issues as noted in the log file.
2. Install gcc 7.3 from the testing repo
# dnf –enablerepo=updates-testing install gcc-c++
3. Wait until gcc is moved from testing to main repo

I hope this helps. I am going to use option 2.

reply Reply
JR

Excellent! Thanks Keith!

Yes, sometimes you might see this happening.

reply Reply
Mihael

Thanks for the guide.

I tried this on Fedora 27 today (5 Feb 2018). I had to set: “export IGNORE_CC_MISMATCH=1” because the new kernel was compiled with gcc 7.3.1 and the Fedora 27 repository only has gcc 7.2.1. I also needed to change /etc/gdm/custom.conf to disable Wayland.

reply Reply
Mario Junior

Reinstalled the OS and now works!

nvidia-installer: version 390.25 (buildmeister@swio-display-x86-rhel47-03)

Linux localhost.localdomain 4.14.16-300.fc27.x86_64 #1 SMP Wed Jan 31 19:24:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)

Many thanks for this tutorial! :)

reply Reply
Demorgan’s Paw

Hey,

I would just like to thank you for this guide. It worked perfectly for Centos 7.4 and Nvidia 387.34 drivers.

I used the Fedora 21 portions when there were two options. Again, thanks a ton!

reply Reply
Chingyat

I got an error when running ./NVIDIA-Linux-*.run. The log said that gcc version 7.3.1 is required but mine is 7.2.1. I tried again with “IGNORE_CC_MISMATCH=1” and succeeded.

reply Reply
Timon

Got it working, thanks!

Did this on a Dell XPS 15 9560, tried it with the Cinnamon spin first, but could get it to work (it would succesfully run the Nvidia installer, but no GFX support when booting Cinnamon). Using Gnome 3 it went rather smoothly, extra steps I had to take:

– turn off secure boot (else it fails at the last step of the installer)
– downgrade gcc to 7.2 instead of 7.3
– get 4.13 kernel-headers instead of 4.14 that’s installed by default

output of the commands:

nvidia-installer: version 390.25 (buildmeister@swio-display-x86-rhel47-03) Wed Jan 24 20:46:20 PST 2018

Linux laptop 4.13.9-300.fc27.x86_64 #1 SMP Mon Oct 23 13:41:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

reply Reply
JR

Excellent Timon,

Normally downgrading gcc or kernel is not needed, if you run fully up-to-date system, but currently it’s needed. You can alternatively use IGNORE_CC_MISMATCH=1 or –no-cc-version-check with installer.

reply Reply
Chris

Your guide worked great. Fresh install and I was up and running in no time. Thanks so much!

[chris@desktop ~]$ nvidia-installer -v|grep version
nvidia-installer: version 390.25 (buildmeister@swio-display-x86-rhel47-03)
[chris@desktop ~]$ uname -a
Linux desktop.local 4.14.16-300.fc27.x86_64 #1 SMP Wed Jan 31 19:24:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[chris@desktop ~]$ lspci |grep -E “VGA|3D”
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
[chris@desktop ~]$

reply Reply
Blair

Another thing that no one mentioned was that Secure Boot must be disabled, otherwise the install will fail. This is pretty common knowledge to more experienced users, but I think it should still be mentioned (in the Before Installation section).

reply Reply
JR

Hi Blair,

Added this to guide. Check step 1.3. you have to disable it or sign kernel module.

reply Reply