0

After viewing /var/log/syslog and /var/log/kern.log I found the following kernel issue:

NVRM: API mistmatch: the client has version 375.26, but
NVRM: this kernel module has the version 375.39. Please 
NVRM: make sure that kernel module and all NVIDIA driver
NVRM: components have the same version.

I found Nvidia driver updated - mixed versions of 304.88 and 319.32 describing the same problem. To resolve my issue, I ran commands:

dpkg -l | grep nvidia
sudo apt-get autoremove nvidia375
sudo apt-get --purge remove nvidia*
dpkg -l | grep nvidia

The output from the last command confirmed no nvidia packages are installed. Thereafter, I ran:

sudo update-grub
sudo update-initramfs -u
sudo reboot

However, I am still experiencing the same kernel issue. Upon bootup, I am stuck in low graphics mode setup and kernel and /var/log/syslog and /var/log/kern.log still complaining client has Nvidia driver 375.26 and kernel module has Nvidia driver 375.39.

My current kernel is 4.4.0-64-generic.

Update1: To see the nvidia modules read in by the kernel, I ran this command.

$ lsmod | grep nvidia
module            size    used by
nvidia_drm        53248   0
nvidia_modeset   790528   1 nvidia_drm
nvidia         12144640   1 nvidia_modeset
drm_helper       155648   2 i915_bpo,nvidia_drm
drm              364544   4 i915_bpo,drm_helper,nvidia_drm

Also found out using modinfo module_name that these modules are located in folder /lib/modules/4.4.0-64-generic/updates/dkms/ and their filenames are nvidia-drm.ko, nvidia-modeset.ko and nvidia.ko, and their version is 375.39.

2nd Question: Why do these modules still exist even after I have purged all nvidia packages? Should I remove them? If so, how?

2

i was able to resolve my issue by performing the following steps:

  1. First reinstall the nvidia-375 repository graphic driver.
    sudo apt-get install nvidia-375

During the installation, I noticed that nvidia-375.26 driver was being installed.

  1. I moved the entire /lib/modules/4.4.0-64-generic/updates/dkms folder to my home directory backup folder. This was to make sure all old .ko files were removed.
    cp -R /lib/modules/4.4.0-64-generic/updates/dkms ~/backup

  2. I regenerated the .ko files for the installed driver using
    sudo dpkg-reconfigure nvidia-375

    It created a new dkms folder with the relevant nvidia kernel modules. I also checked their version using command:

    sudo modinfo nvidia_375.ko
    sudo modinfo nvidia_375_drm.ko
    sudo modinfo nvidia_375_modeset.ko
    sudo modinfo nvidia_375_uvm.ko

Their output showed that they were for version 375.26. Great, this confirmed that the kernel client and kernel modules were referring to the same nvidia driver version.

  1. I rebooted the system with
    sudo reboot

Adapted from https://devtalk.nvidia.com/default/topic/525877/linux/api-mismatch-means-ubuntu-can-39-t-boot-i-can-39-t-fix-i-please-help-/1

  • This fixed my 17.10 upgrade with nvidia-384 – TheLQ Nov 17 '17 at 9:02

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.