NVIDIA Graphic Driver install

General support questions
dirkme
Posts: 51
Joined: 2017/02/06 04:05:43

NVIDIA Graphic Driver install

Post by dirkme » 2019/09/11 21:38:54

Dear all,
would be great having a perma topic about those drivers.

I have a fairly new PC with a GTX1050Ti and tried some google search centos7 installs and they just throw more erros than help in.

I do have elrepro but still looking for the right way to install NVIDIA drivers.

Help please ;-))

Thanks to all willing and trying to help

Dirk

P.S. I searched the Forum but can't find anything really usefull :-(

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NVIDIA Graphic Driver install

Post by jlehtone » 2019/09/11 21:50:08

1. You have elrepo repository defined.
2. sudo yum --enablerepo=elrepo install nvidia-detect yum-plugin-nvidia yum-plugin-elrepo
3. sudo yum --enablerepo=elrepo install $(nvidia-detect)
4. reboot

dirkme
Posts: 51
Joined: 2017/02/06 04:05:43

Re: NVIDIA Graphic Driver install

Post by dirkme » 2019/09/11 22:54:32

jlehtone,

thank you so much you are a Super star !!!

I only had to add in /boot/grub/grub.cfg

Code: Select all

rdblacklist=nouveau
and it worked like a charm.

now if i run yum update or search or just whatever i get the:
yum search playonlinux
Loaded plugins: elrepo, fastestmirror, langpacks, nvidia
Loading mirror speeds from cached hostfile
* base: centos.les.net
* elrepo: repos.ord.lax-noc.com
* extras: centos.mirror.rafal.ca
* updates: centos.les.net
[elrepo]: excluding package: kmod-3c59x-0.0-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-8188eu-4.1.4_6773.20130222-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-8188eu-5.2.2.4-1.20190907git.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-a2818-1.20-1.el7.elrepo.x86_64
[elrepo]: excluding package: kmod-a3818-1.6.0-1.el7.elrepo.x86_64
[elrepo]: excluding package: kmod-aic7xxx-7.0-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-ar5523-0.0-9.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-ath5k-0.0-12.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-cassini-1.6-2.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-cciss-3.6.26-5.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-cciss-3.6.26-7.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-drbd84-8.4.11-1.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-drbd90-9.0.14-1.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-e100-3.5.24-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-forcedeth-0.64-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-hfs-0.0-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-hfsplus-0.0-5.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-i2c-i801-0.0-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-ixgb-1.0.135-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-ixgbe-5.6.3-1.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-joydev-0.0-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-mt7601u-4.14.108-2.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-nct6775-0.0-4.20180327git.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-ne2k-pci-1.03-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-niu-1.1-2.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-nvidia-430.40-2.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-nvidia-340xx-340.107-3.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-nvidia-390xx-390.116-2.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-r8168-8.046.00-1.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-r8169-6.020.00-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-rr62x-1.2-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-rr64xl-1.4.0-1.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-sis190-1.4-1.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-sis900-1.08.10-2.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-sym53c8xx-0.0-4.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-tpe-2.0.3-6.20170731git.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-tpe-2.0.4-1.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-typhoon-1.0-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-usbip-1.0.1-2.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-usbip-1.0.1-4.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-via-rhine-1.5.1-3.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-via-velocity-1.15-2.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-xpad-0.0.6-7.el7_5.elrepo.x86_64
[elrepo]: excluding package: kmod-xpad-0.0.6-9.el7_7.elrepo.x86_64
[elrepo]: excluding package: kmod-zd1211rw-1.0-6.el7_5.elrepo.x86_64
Warning: No matches found for: playonlinux
No matches found
[root@cent dirk]#
how do I avoid those messages and how come I can't find anything?

Thanks for your help ;-))

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NVIDIA Graphic Driver install

Post by jlehtone » 2019/09/12 09:21:44

dirkme wrote:
2019/09/11 22:54:32
I only had to add in /boot/grub/grub.cfg

Code: Select all

rdblacklist=nouveau
and it worked like a charm.
There should not be a need for that. The 'kmod-nvidia' pulls in 'nvidia-x11-drv' as dependency and the latter has postinstall script that adds

Code: Select all

nouveau.modeset=0 rd.driver.blacklist=nouveau plymouth.ignore-udev
to grub.cfg menuentry of every installed kernel (and to /etc/default/grub).

You say /boot/grub/grub.cfg. A legacy-BIOS install has grub.cfg in /boot/grub2/ and UEFI install in /boot/efi/EFI/centos/.
I've seen a messy install, where there was stuff in /boot/grub/ and grubby was confused.


The messages that you see are generated by the yum-plugin-elrepo.
They are all about 7_5 and 7_7 kernel modules that are in ELRepo.
Those are excluded, because you have only 7_6 kernels; attempt to install mismatching kmods would be an error.

My approach is to keep the elrepo disabled by default

Code: Select all

sudo yum-config-manager --disable elrepo
and explicitly enable it when I do want to use elrepo

Code: Select all

sudo yum --enablerepo=elrepo ...

You don't see any updates, because CentOS 7.6 will not get any now that RHEL-7.7 is out.
CentOS 7.7 will be released soon. You can already install CentOS 7.7 content with

Code: Select all

sudo yum --enablerepo=cr update

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

Re: NVIDIA Graphic Driver install

Post by NedSlider » 2019/09/12 12:20:20

jlehtone wrote:
2019/09/12 09:21:44
The messages that you see are generated by the yum-plugin-elrepo.
They are all about 7_5 and 7_7 kernel modules that are in ELRepo.
Those are excluded, because you have only 7_6 kernels; attempt to install mismatching kmods would be an error.

My approach is to keep the elrepo disabled by default

Code: Select all

sudo yum-config-manager --disable elrepo
and explicitly enable it when I do want to use elrepo

Code: Select all

sudo yum --enablerepo=elrepo ...
Correct. The other option to avoid those messages is to enable the centos vault repo so the required kernels are available to yum, then yum-plugin-elrepo won't exclude the packages.

This stems from differences between RHEL and CentOS. RHEL make all packages available for ever, so yum can always see all kernels for RHEL7 since the years dot. OTOH, CentOS archive off previous point releases into the CentOS Vault repo which is not available by default. As a consequence, only packages in the current point release are available to yum. The yum-plugin-elrepo was designed for RHEL7, and this difference in behaviour causes the package exclusions you are seeing. So, as stated above, if you don't wish to see this information, either disable the plugin between point releases when it's generally not needed, or enable the CentOS Vault repo to make CentOS behave more like RHEL.

dirkme
Posts: 51
Joined: 2017/02/06 04:05:43

Re: NVIDIA Graphic Driver install

Post by dirkme » 2019/09/12 18:26:06

jlehtone :

thank you so much for your help, very useful and very good information ;-)

NedSlider:
The other option to avoid those messages is to enable the centos vault repo so the required kernels are available to yum, then yum-plugin-elrepo won't exclude the packages.
sooo, how do you do that?

Thanks

Dirk

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NVIDIA Graphic Driver install

Post by TrevorH » 2019/09/12 19:04:34

Enabling vault is not recommended unless it's actually required. The hosts that are used for vault are bandwidth constrained and the content is not mirrored. Please only use it if you have to.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dirkme
Posts: 51
Joined: 2017/02/06 04:05:43

Re: NVIDIA Graphic Driver install

Post by dirkme » 2019/09/12 19:06:51

Thank you TrevorH

ron7000
Posts: 162
Joined: 2019/01/15 20:00:28

Re: NVIDIA Graphic Driver install

Post by ron7000 » 2019/09/12 19:49:48

http://us.download.nvidia.com/XFree86/L ... river.html

I need cuda in a work environment and prefer getting it directly from nvidia as a .run file. The cuda install includes the graphics driver, and the correct one for the given version of cuda. I also prefer the confidence of getting it directly from nvidia based on my specific graphics card (quadro vs geforce vs tesla and so on) and know that i am getting the latest version from the source.

The problem with manually installing like this even if it was just the graphics driver is that (1) you have to drop to runlevel 3 {multi-user.target} to do the install then go to runlevel 5 {graphical.target}. Not really hard but extra work nonetheless... good software makes the computer do the work for you. And (2) whenever you have a kernel update the nvidia graphics driver (because it's a kernel module) is lost and will result in a failed boot going to runlevel 5 {graphical.target}.

The solution I have found is to install DKMS and make sure that is installed prior to installing the nvidia .run file at runlevel 3, and you will see a mention of "dkms" during the nvidia graphics driver install. Then later on when a kernel update happens, the graphics driver is preserved and everything's happy thanks to dkms.

The hard manual way without dkms is to systemctl set-default multi-user.target and always boot to a non graphical runlevel 3. This will guarantee a successful boot and a system that is accessible, this way when a kernel update happens without dkms and the nvidia kernel module is lost the system will boot to a usable state... because after the kernel update you will forget to manually reinstall the nvidia driver and only realize it when the graphical login screen is thrashed- then you have to reboot and prevent going to runlevel 5 to reinstall nvidia.

Couple other requirements are you have the kernel source rpm installed (which is almost always there anyway) otherwise the nvidia.run file will fail to build the nvidia kernel module. And you have to deal with grub2 and disable nouveau but at least this is a one time thing.

With DKMS basically you install nvidia one time and can forget about it for all subsequent linux kernel updates via yum, which is what most people will care about. And then if you choose to update nvidia you just do what you did previously- runlevel 3 and execute the .run file and make sure dkms catches it.

Code: Select all

# edit /etc/default/grub
# i think any of the 3 is sufficient to disable nouveau

   GRUB_CMDLINE_LINUX = rhgb    verbose    modprobe.blacklist=nouveau    rd.driver.blacklist=nouveau     nouveau.modeset=0"
   
   
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg       {or wherever grub.cfg resides}

# need to do this prior to rebooting to runlevel 3 {multi-user.target} to manually install nvidia .run graphics driver
# i prefer verbose rather than quiet.
that's what i know and have experienced with nvidia and centos/rhel 7.6 on home pc and work servers.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NVIDIA Graphic Driver install

Post by jlehtone » 2019/09/12 21:27:37

NVidia does have a yum repository too, for CUDA.
https://docs.nvidia.com/cuda/cuda-insta ... stallation

While their instruction says "rpm --install", yum is enough:

Code: Select all

sudo yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-10.1.243-1.x86_64.rpm
Then one can choose a CUDA version. For example:

Code: Select all

sudo yum --enablerepo=epel install cuda-10-1
That does pull a 'nvidia-driver' package from the cuda repo. "From the source."
The nvidia-driver.rpm modifies bootloader just like ELRepo's nvidia-x11-drv.

Post Reply