NVIDIA NVRM: API mismatch: the client has the version 525.105.17, but NVRM: this kernel module has the version 525.89.02

I get this message spam in my system log on Ubuntu Linux desktop for NVIDIA driver

[173180.411876] NVRM: API mismatch: the client has the version 525.105.17, but
                NVRM: this kernel module has the version 525.89.02.  Please
                NVRM: make sure that this kernel module and all NVIDIA driver
                NVRM: components have the same version.

What does it mean? How to fix it?

Check your NVIDIA version.

How to fix “NVRM: API mismatch” between client version and kernel module version in Ubuntu Linux

  1. Check the installed NVIDIA driver revision and the version of the GNU C compiler used to build the Linux kernel module using the cat command:
cat /proc/driver/nvidia/version
  1. Check loaded NVIDA module version:
cat /sys/module/nvidia/version
  1. Also see the current status of NVIDIA modules, versions and kernels within the tree as well as whether they have been added, built or installed:
dkms status | more
dkms status nvidia


4. As you can see I have NVIDIA version 525.105.17 installed and loaded. My best guess is you forgot to reboot the system. Just reboot to match correct version:

sudo reboot
  1. Check your version again using the following commands:
cat /proc/driver/nvidia/version
cat /sys/module/nvidia/version
dkms status nvidia
  1. Still got a problem? Reinstall NVIDIA driver. See my page https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/

See also

https://www.cyberciti.biz/faq/check-print-find-nvidia-driver-version-on-linux-command/

I reinstalled the nvidia driver on my machine and it is working without any message.