Installing Nvidia drivers

Issues related to hardware problems
Post Reply
ahmadofski
Posts: 3
Joined: 2019/05/10 18:26:03

Installing Nvidia drivers

Post by ahmadofski » 2019/05/10 20:30:45

Hi there,

I've been trying to install without success the official Nvidia drivers on a fresh install of centos. I looked around the web and followed the installation guides but I can't get it to work:

* I downloaded the drivers from the Nvidia website (driver version 418.74)
* updated yum and installed prerequisites:
- yum groupinstall "Development Tools"
- yum install kernel-devel epel-release
- yum install dkms
* Disabled Nouveau
* rebooted, then ran installer under sudo in text mode. It fails. I try first with dkms, then without. It asks if I want 32 bit compatibility and I say yes as advised. In both cases I get an message about libglvnd being incomplete. I try both options: "continue without installing libglvnd files" and "install and overwrite existing files". Doesn't make a difference.

In all cases the problem seems to be in finding the kernel headers to build the module:

With dkms I get:
ERROR: Failed to run '/usr/sbin/dkms -m nvidia -v 418.74 -k 3.10.0-957.el7.x86_64': Error! echo
Your kernel headers for kernel 3.10.0-957.el7.x86_64 cannot be found at
/lib/modules/3.10.0-957.el7.x86_64/build or /lib/modules/3.10.0-957.el7.x86_64/source.
without dkms I get:
ERROR: unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
I already installed kernel-devel, so this shouldn't happen. So I tried to install 'kernel-source' but it's not available in yum. So looking online, I found this guide to get the kernel source (https://wiki.centos.org/HowTos/I_need_the_Kernel_Source). I followed the painful process and got the RPM built.

So I then re-run with the kernel-source-path flag without dkms, and now I get this error:
ERROR: Neither the '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64/include/linux/version.h' nor the '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64/include/generated/uapi/linux/version.h' kernel header file exists. The most likely reason for this is that the kernel source files in '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64' have not been configured.


Sure enough version.h is missing from the .../include/linux directory.
So what do I do now? Do I have to rebuild the kernel RPM? is there some other packages I need to install? Help!

User avatar
TrevorH
Forum Moderator
Posts: 27181
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Nvidia drivers

Post by TrevorH » 2019/05/10 21:11:34

The recommended way to do this on CentOS/RHEL is to use the ELRepo third party yum repository. They take the nvidia .run binary blob and package it as an rpm for installation with yum and they do that in such a way that it survives most kernel updates. If you use the .run file then you will need to reinstall the driver after every kernel update.

Google ELRepo
Install their elrepo-release package for CentOS 7
yum install nvidia-detect
run nvidia-detect and
yum install the package it tells you to use
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

ahmadofski
Posts: 3
Joined: 2019/05/10 18:26:03

Re: Installing Nvidia drivers

Post by ahmadofski » 2019/05/10 21:33:49

Thanks Trevor,

I installed elrepo and nvidia-detect and ran the latter. It tells me "This device does not appear to be supported at present" !
The video card is an RTX2070.

User avatar
toracat
Forum Moderator
Posts: 7389
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Installing Nvidia drivers

Post by toracat » 2019/05/11 00:44:43

Grforce RTX 2070 seems to be supported by the current version. Let's wait for NedSlider (the nvidia driver maintainer for ELRepo) to be online. :)
CentOS Forum FAQ

NedSlider
Forum Moderator
Posts: 2890
Joined: 2005/10/28 13:11:50
Location: UK

Re: Installing Nvidia drivers

Post by NedSlider » 2019/05/11 08:56:38

Hi,

Yes, the RTX 2070 should be supported by the latest v418.74 driver.

Apologies, I was a bit slow updating nvidia-detect. I've just updated and built the latest version (418.74) which should now correctly recognise your device. Updated packages are syncing to the mirror sites and should be available shortly.

For reference, please could you post the device ID for your device:

Code: Select all

lspci -nn | grep -i 10de
Thanks

ahmadofski
Posts: 3
Joined: 2019/05/10 18:26:03

Re: Installing Nvidia drivers

Post by ahmadofski » 2019/05/11 13:09:03

NedSlider wrote:
2019/05/11 08:56:38
Hi,

Yes, the RTX 2070 should be supported by the latest v418.74 driver.

Apologies, I was a bit slow updating nvidia-detect. I've just updated and built the latest version (418.74) which should now correctly recognise your device. Updated packages are syncing to the mirror sites and should be available shortly.

For reference, please could you post the device ID for your device:

Code: Select all

lspci -nn | grep -i 10de
Thanks
Hi Ned,

The device ID are as follows:

Code: Select all

$ lspci -nn | grep -i 10de
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106 [GeForce RTX 2070 Rev. A] [10de:1f07] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:10f9] (rev a1)
01:00.2 USB controller [0c03]: NVIDIA Corporation Device [10de:1ada] (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device [10de:1adb] (rev a1)
The good news is I found that when I booted up the machine today, the Nvidia driver was installed! Looking into it further..

Code: Select all

$ dkms status
nvidia, 418.74, 3.10.0-957.12.1.el7.x86_64, x86_64: installed
It seems despite the installer failing and claiming it couldn't run dkms, it did manage to register it. Don't know how much I trust the installation though. It's worked so far under light load (simple MNIST job). But we'll see if it crashes when I run some real jobs.

centol
Posts: 1
Joined: 2019/05/25 08:53:21

Re: Installing Nvidia drivers

Post by centol » 2019/05/25 09:24:20

Hi ahmadofski

I've installed successfully driver 418.74 for my RTX 2060 under CentOS 18.10 via https://rpmfusion.org/

Look for Command Line Setup using rpm in https://rpmfusion.org/Configuration

How to in https://rpmfusion.org/Howto/NVIDIA?high ... ryHowto%29

Good luck

drbonev
Posts: 1
Joined: 2019/11/04 10:23:19

Re: Installing Nvidia drivers

Post by drbonev » 2019/11/04 10:29:28

Post from TrenorH is great help! CEntOS nuveau can cause serious instability in systems with NVIDIA cards and the ELRepo installation works a treat. And, this fixes the instability. Many thanks! :D

Post Reply

Return to “CentOS 7 - Hardware Support”