Fedora 42 & P106-100

Well, CUDA on the restored GTS450 is too old and I migrated to P106-100.
That card (Pascal architecture) requires the non-free driver.
I have difficulties with nonfree driver selection.
Is it a simple way to switch between free and nonfree driver?
Old driver installations’ problems, may be?

(base) [Flycatcher@fedora ~]$ 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.
(base) [Flycatcher@fedora ~]$ modinfo -F version nvidia
575.64
(base) [Flycatcher@fedora ~]$ modinfo -l nvidia
Dual MIT/GPL
(base) [Flycatcher@fedora ~]$ lspci
01:00.0 3D controller: NVIDIA Corporation GP106 [P106-100] (rev a1)
(base) [Flycatcher@fedora ~]$ cd /etc/yum.repos.d/
(base) [Flycatcher@fedora yum.repos.d]$ dir
adoptium-temurin-java-repository.repo
brave-browser.repo
_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo
_copr_phracek-PyCharm.repo.rpmsave
fedora-cisco-openh264.repo
fedora.repo
fedora-updates.repo
fedora-updates-testing.repo
rpmfusion-free.repo
rpmfusion-free-updates.repo
rpmfusion-free-updates-testing.repo
rpmfusion-nonfree.repo
rpmfusion-nonfree-updates.repo
rpmfusion-nonfree-updates-testing.repo

(base) [Flycatcher@fedora yum.repos.d]$ sudo journalctl -b 0
Jun 23 18:14:10 fedora kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 234
Jun 23 18:14:10 fedora kernel: NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:1c07)
NVRM: installed in this system is not supported by open
NVRM: nvidia.ko because it does not include the required GPU
NVRM: System Processor (GSP).

Try

sudo rm /etc/rpm/macros.nvidia-kmod
sudo akmods --kernels $(uname -r) --rebuild

reboot

So, the tricky part was not just rebuild the kernel, but rebuild for an exact user?))
I tried with disabled “free” repositories and look like it did work.

(base) [Flycatcher@fedora ~]$ modinfo -l nvidia
NVIDIA
(base) [Flycatcher@fedora ~]$ nvidia-smi
Tue Jun 24 10:55:04 2025
±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64 Driver Version: 575.64 CUDA Version: 12.9 |
|-----------------------------------------±-----------------------±---------------------+
| 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 P106-100 Off | 00000000:01:00.0 Off | N/A |
| 0% 30C P0 26W / 120W | 97MiB / 6144MiB | 6% Default |
| | | N/A |
±----------------------------------------±-----------------------±---------------------+

±----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2062 G /usr/libexec/Xorg 81MiB |
| 0 N/A N/A 2218 G /usr/bin/gnome-shell 13MiB |
±----------------------------------------------------------------------------------------+