Question On CentOS 7.4 On Nvidia

Home » CentOS » Question On CentOS 7.4 On Nvidia
CentOS 8 Comments

I installed the elrepo kmod-nvidia and also the nvidia-detect and modules
(see below).

I had X working with the 3.10 from CentOS – but video was freezing. SO I
thought I would try the elrepo kernel. I installed that and X does not come up?

How do I re-make the nvidia module for 4.14.5 kernel? I want to make sure the kmod kernel did it. I ‘m thinking it did not.

lspci | grep VGA says GT218

Or what do I look at now to see why X is not coming up?



uname -r

grep EE /var/log/Xorg.0.log
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 136.998] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[ 136.998] (EE) NVIDIA: system’s kernel log for additional error messages and
[ 136.998] (EE) NVIDIA: consult the NVIDIA README for details.
[ 136.998] (EE) No devices detected.
[ 136.998] (EE)
[ 136.998] (EE) no screens found(EE)
[ 136.998] (EE)
[ 136.998] (EE) Please also check the log file at “/var/log/Xorg.0.log”
for additional information.
[ 136.998] (EE)
[ 137.004] (EE) Server terminated with error (1). Closing log file.

uname -a

rpm -qa | grep kernel kernel-3.10.0-693.el7.x86_64
[root@mediaport14 ~]# rpm -qa | grep kernel-ml kernel-ml-devel-4.14.5-1.el7.elrepo.x86_64

# rpm -qa | grep nvidia kmod-nvidia-340xx-340.102-4.el7_4.elrepo.x86_64
yum-plugin-nvidia-1.0.2-1.el7.elrepo.noarch nvidia-x11-drv-340xx-340.102-1.el7.elrepo.x86_64

8 thoughts on - Question On CentOS 7.4 On Nvidia

  • Find the akmod-nvidia package. Last I bothered with this some years ago, the akmod package was required to ensure the nvidia module would be rebuilt every time a new kernel was booted into.


  • That’s what I get too –

    01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce
    405] (rev a2)

    It works fine for me with mate with this:


    I’ve had problems with gnome 3 and nvidia before, but haven’t tested in a very long time, been running mate for years.

  • So I removed the nvidia items and reinstalled.

    In /var/log/messages I saw dracut commands for every kernel EXCEPT the
    4.14.5 elrepo kernel. So I did it manually and I get an error.

    /usr/bin/dracut –add-drivers nvidia -f
    /boot/initramfs-4.14.5-1.el7.elrepo.x86_64.img 4.14.5-1.el7.elrepo.x86_64
    Failed to install module nvidia

    No sure what to do.


  • It seems as though 4.14.5 elrepo kernel does not generate any initramfs. It seems nvidia needs to be apart of that. Is that correct ?
    If so how do I tell it to actually generate the initramfs


  • The elrepo kmod packages ONLY support the distro RHEL/CentOS kernels. They are NOT compatible with any other non-KABI compatible kernels, including the mainline and LTS kernel packages from elrepo.

    Hope that helps.

  • If you need to use a non stock kernel, you can also try to download the latest driver directly from nvidia. The nvidia official driver is very easy to install and works with almost all kernel versions. It can also be easily uninstalled too.

  • Yan Li wrote:

    Make sure you have the correct one, though. I have a number of systems with older NVidia cards, and have to pick and choose the correct “legacy”


  • I think that nvidia-detect could be helpful even on non-stock kernels to find out if you need to use “legacy” or “non-legacy” driver :)