LMDE5 (linux mint) NVIDIA driver did not load

The nvidia-driver in the LMDE5 seems problematic to install as well:

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

The “bug report” is attached below:
nvidia-bug-report.log.gz (67.7 KB)

In the LMDE5 the nvidia-driver is not installed by the default/option
and I had to install it later by using commands:
sudo apt install nvidia-driver nvidia-xconfig nvidia-settings

Delete /etc/X11/xorg.conf, it disables the intel GPU (unless you want to only drive externals displays).

Blacklist nouveau it prevents the nvidia driver from loading.

Configure your prime profile: sudo prime-select {intel | nvidia | on-demand}.

The LMDE5 didn’t include the prime-select. I may try install it from different distribution.
The bug report after blacklisting the nouveau is below:
nvidia-bug-report.log.gz (144.1 KB)
After installing the prime-select it gives an error as:

$ sudo prime-select  nvidia
Error: no integrated GPU detected.

You are still running with nouveau.

So, I didn’t find how to disable it. I think I “blacklisted” it as in what they said.
Maybe in the LMDE5 the blacklisting does not work similarly as in UbuntuFossa…
The required file to edit probably is:
/etc/modprobe.d/blacklist-nouveau.conf
And I should check it again.

after creating the blacklist file containing

blacklist nouveau

you need to recreate the initrd
sudo update-initramfs -u

Yes. I did it exactly like that:

$ pwd
/etc/modprobe.d
$ cat blacklist-nouveau.conf 
blacklist nouveau
options nouveau modeset=0

I check now the file contents and it looks normal.
I also run the update-initramfs -u.

And it is not still loading the driver when I reboot.

Please make sure you’re booting the correct kernel the initrd is created for. Alternatively, you can set the kernel parameter
nouveau.modeset=0

The options is as shown above and that is the 5.10.xx kernel.
And now I tried to boot with both kernel there is and both case it fails.

$ nvidia-detect 
Detected NVIDIA GPUs:
02:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX250] [10de:1d13] (rev a1)

Checking card:  NVIDIA Corporation GP108M [GeForce MX250] (rev a1)
Your card is supported by the default drivers.
Your card is also supported by the Tesla 470 drivers series.
Your card is also supported by the Tesla 460 drivers series.
Your card is also supported by the Tesla 450 drivers series.
Your card is also supported by the Tesla 418 drivers series.
It is recommended to install the
    nvidia-driver
package.

It seems it can not detect the driver installed:

$ sudo apt install nvidia-driver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-driver is already the newest version (470.103.01-1~bpo11+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

The ‘apt’ says driver already installed and with newest version…
Maybe something is wrong with the used version?

Did you set the kernel parameter?
Please post the output of
sudo lspci -k -d 10de:*
and
cat /proc/cmdline

Below is the results:

$ sudo lspci -k -d 10de:*
02:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)
	Kernel driver in use: nouveau
	Kernel modules: nvidia
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.10.0-12-amd64 root=UUID=5df8a842-e06a-4eac-a24c-5a4507b48e62 ro quiet splash

It looks the black-listing is failing.

Please set the kernel parameter instead.

Not sure where/how to set the kernel parameters.
Maybe as:
gedit /etc/default/grub
So I edit that file as:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.modeset=0"
but it is still not working (even after update-grub)

https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter

I did it and it didn’t get working still.
Do I send you the nvidia-bug-report after each modification?
nvidia-bug-report.log.gz (153.8 KB)

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

You’ve booted to read-only single-user mode.

I try to check it more…
The result always is as:

$ sudo lspci -k -d 10de:*
02:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)
	Kernel driver in use: nouveau
	Kernel modules: nvidi

Not sure why the mode is “read-only single-user mode”.
But it is then the default one in this system.

Maybe you incorrectly modified /etc/default/grub so the default mode was removed.

It is working now…
The problem is the multi-boot that loades from the MX-linux.
So the grub need update both in linuxmint & MX-linux before
it gets working.

$ nvidia-smi
Fri Apr  8 18:36:59 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.103.01   Driver Version: 470.103.01   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:02:00.0 Off |                  N/A |
| N/A   61C    P8    N/A /  N/A |      4MiB /  4042MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       840      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

But then problem remains how to get the processes (also other than Xorg) to use the driver.
The process list looks very short…

The answer stays the same
https://forums.developer.nvidia.com/t/can-not-select-the-default-gpu-in-mxlinux/208891/4?u=generix