Double screen stopped working and Failed to initialize NVML: Driver/library version mismatch

nvidia-bug-report.log (1.5 MB)

Hi,

suddenly this afternoon, my computer kinda crashed (it rebooted out of nowhere), and then my double screen stopped working, and then I tried to run nvidia-smi and it returned the following error message : Failed to initialize NVML: Driver/library version mismatch

Processing: nvidia-bug-report.log.gz…

Is there a procedure I can follow to fix my broken nvidia ?

I tried rebooting the computer already, and I do not recall installing anything that could possibly have killed nvidia

I have the 535.86.05 version of the kernel module, which was installed after double screen issues (double screen not detected)

Thank you for your time,

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Fri Aug 18 16:58:23 2023
installer version: 530.41.03

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
→ Detected 16 CPUs online; setting concurrency level to 16.
→ Installing NVIDIA driver version 530.41.03.
→ There appears to already be a driver installed on your system (version: 535.98). As part of installing this driver (version: 530.41.03), the existing driver will be uninstalled. Are you sure you want to continue? (Answer: Continue installation)
→ An alternate method of installing the NVIDIA driver was detected. (This is usually a package provided by your distributor.) A driver installed via that method may integrate better with your system than a driver installed by nvidia-installer.

Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:

The NVIDIA driver provided by Ubuntu can be installed by launching the “Software & Updates” application, and by selecting the NVIDIA driver from the “Additional Drivers” tab.

(Answer: Continue installation)

You installed the nvidia driver 530 via .run file, over the distro package 535.
You ignored the warnings, that messed up your system.

→ Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. (Answer: Yes)

Then you created an Xorg config, which is totally unusable for mixed graphics laptops (Optimus laptops).

1: delete: /etc/X11/xorg.conf
2: Use the .run file of the 530 version to uninstall that version of the driver.
3: run in a terminal:
sudo apt purge 'nvidia*' 'libnvidia*'
4: sudo apt install nvidia-driver-535
5: reboot