Failed to initialize NVML: Driver/library version mismatch

Hi, I was upgrading my nvidia driver to 525.
first time it worked but I upgraded to 535 and reverted to 525.
then it shows nvml errors.
here’s bug report.
nvidia-bug-report.log (5.4 MB)

cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 525.147.05 Wed Oct 25 20:27:35 UTC 2023
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)

Operating System: Ubuntu 20.04.6 LTS
Kernel: Linux 5.4.0-122-generic
Architecture: x86-64

~$ modinfo nvidia | grep version
version: 525.147.05
srcversion: AF75D71EC95BA728B7F304C
vermagic: 5.4.0-122-generic SMP mod_unload modversions

~$ dpkg -l | grep -i nvidia
ii libnvidia-cfg1-525:amd64 525.147.05-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-525 525.147.05-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-525:amd64 525.147.05-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-compute-525:i386 525.147.05-0ubuntu1 i386 NVIDIA libcompute package
ii libnvidia-decode-525:amd64 525.147.05-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-525:i386 525.147.05-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-525:amd64 525.147.05-0ubuntu1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-525:i386 525.147.05-0ubuntu1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-525:amd64 525.147.05-0ubuntu1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-525:amd64 525.147.05-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-525:i386 525.147.05-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-525:amd64 525.147.05-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-525:i386 525.147.05-0ubuntu1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii nvidia-compute-utils-525 525.147.05-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-525 525.147.05-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-525 525.147.05-0ubuntu1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-525 525.147.05-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-525 525.147.05-0ubuntu1 amd64 NVIDIA kernel source package
ii nvidia-modprobe 550.54.14-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-prime 0.8.16~0.20.04.2 all Tools to enable NVIDI’s Prime
ii nvidia-settings 550.54.14-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-525 525.147.05-0ubuntu1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-525 525.147.05-0ubuntu1 amd64 NVIDIA binary Xorg driver