How to switch nvidia-open?

I set up Vaapi before I even thought about Nvidia-Open and worked without any problems… Anyway, I still want to switch nvidia-open.

What I did so far:

nvidia-vaapi-driver

sudo dnf install meson libva-devel gstreamer1-plugins-bad-freeworld nv-codec-headers gstreamer1-plugins-bad-free-devel nvidia-open nvidia-vaapi-driver vdpauinfo

I setup nvidia-vaapi-driver which I probably setup this for propriety driver and it is worked.

#/etc/environment
MOZ_DISABLE_RDD_SANDBOX=1
LIBVA_DRIVER_NAME=nvidia
#.zshrc
export NVD_LOG=1
export NVD_BACKEND=direct # default

I checked is nvidia-drm work via lsmod and it showed worked but I still added to boot option.

GRUB_CMDLINE_LINUX="resume=UUID=3403e1e3-f354-40a7-bc9e-b14546ad4d3e rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"

Setup cuda

sudo dnf config-manager addrepo --from-repofile=https://developer.download.nvidia.com/compute/cuda/repos/fedora41/$(uname -m)/cuda-fedora41.repo
sudo dnf clean all
sudo dnf config-manager setopt cuda-fedora41-$(uname -m).exclude=nvidia-driver,nvidia-modprobe,nvidia-persistenced,nvidia-settings,nvidia-libXNVCtrl,nvidia-xconfig
sudo dnf install cuda-toolkit

removed akmod-nvidia

sudo dnf remove akmod-nvidia

I figure it out, nvidia-open is not the correct package:

sudo dnf install akmod-nvidia-open

After akmod-nvidia-open installation, rpm build it automatically.

rpm -qa kmod-nvidia\*
kmod-nvidia-6.13.5-200.fc41.x86_64-570.86.16-3.fc41.x86_64
kmod-nvidia-6.13.6-200.fc41.x86_64-570.124.04-1.fc41.x86_64
kmod-nvidia-open-6.13.6-200.fc41.x86_64-570.124.04-1.fc41.x86_64

I reboot and looked is boot show nvidia-open but it’s show 6.13.6 without nvidia or something which this can be a normal behavior probably but I wanted to make sure.

After that I decided to remove kernel kmod-nvidia but it also removing kmod-nvidia-open too.

sudo dnf remove kmod-nvidia-6.13.6-200.fc41.x86_64-570.124.04-1.fc41.x86_64
Package                                                Arch        Version                                                Repository                                Size
Removing:
 kmod-nvidia-6.13.6-200.fc41.x86_64                    x86_64      3:570.124.04-1.fc41                                    @commandline                          70.2 MiB
Removing dependent packages:
 akmod-nvidia-open                                     x86_64      3:570.124.04-1.fc41                                    rpmfusion-nonfree-tainted             17.7 MiB
 kmod-nvidia-6.13.5-200.fc41.x86_64                    x86_64      3:570.86.16-3.fc41                                     @commandline                          70.2 MiB
 kmod-nvidia-open-6.13.6-200.fc41.x86_64               x86_64      3:570.124.04-1.fc41                                    @commandline                         162.1 MiB
 xorg-x11-drv-nvidia-cuda                              x86_64      3:570.124.04-1.fc41                                    rpmfusion-nonfree-updates              6.2 MiB

After I learned, I need to force build akmod to remove old kernels and I tried that too but It didn’t make any differences.

sudo akmods --rebuild --force

I tried this too but seems like this even not needed with rpmfusion which it is build default.

I found that I still have nonfree-nvidia-driver repo and disabled it:

# this one didn't worked because akmod-nvidia already removed.
sudo dnf upgrade akmod-nvidia --disablerepo rpmfusion-nonfree-nvidia-driver
# So, I disabled like this:
sudo dnf --disablerepo rpmfusion-nonfree-nvidia-driver

Upgraded the system:

sudo dnf upgrade

Now I am thinking about to recreate all the initramfs but I don’t want to broke the boot.

# not tried yet:
sudo dracut --regenerate-all --force

Current logs

lsmod nvidia
lsmod | grep nvidia
nvidia_drm            151552  10
nvidia_modeset       1826816  17 nvidia_drm
nvidia_uvm           4087808  0
nvidia              96968704  223 nvidia_uvm,nvidia_modeset
drm_ttm_helper         16384  1 nvidia_drm
video                  81920  1 nvidia_modeset
i2c_nvidia_gpu         12288  0
nvidia-version
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  570.124.04  Tue Feb 25 04:12:12 UTC 2025
GCC version:  gcc version 14.2.1 20250110 (Red Hat 14.2.1-7) (GCC) 
modinfo nvidia
modinfo nvidia
filename:       /lib/modules/6.13.6-200.fc41.x86_64/extra/nvidia/nvidia.ko.xz
alias:          char-major-195-*
version:        570.124.04
supported:      external
license:        NVIDIA
firmware:       nvidia/570.124.04/gsp_tu10x.bin
firmware:       nvidia/570.124.04/gsp_ga10x.bin
srcversion:     3D69C923874714B11E68DCA
alias:          pci:v000010DEd*sv*sd*bc06sc80i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        
name:           nvidia
retpoline:      Y
vermagic:       6.13.6-200.fc41.x86_64 SMP preempt mod_unload 
dmesg nvidia
[    5.972441] nvidia: loading out-of-tree module taints kernel.
[    5.972447] nvidia: module license 'NVIDIA' taints kernel.
[    5.972450] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    5.972451] nvidia: module license taints kernel.
[    6.286232] nvidia-gpu 0000:2b:00.3: i2c timeout error e0000000
[    6.382238] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[    6.383994] nvidia 0000:2b:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
[    6.427277] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  570.124.04  Tue Feb 25 04:12:12 UTC 2025
[    6.467967] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[    6.564854] nvidia-uvm: Loaded the UVM driver, major device number 510.
[    6.597538] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  570.124.04  Tue Feb 25 03:39:21 UTC 2025
[    6.601440] [drm] [nvidia-drm] [GPU ID 0x00002b00] Loading driver
[    7.834992] [drm] Initialized nvidia-drm 0.0.0 for 0000:2b:00.0 on minor 1
[    7.863553] nvidia 0000:2b:00.0: vgaarb: deactivate vga console
[    7.924537] fbcon: nvidia-drmdrmfb (fb0) is primary device
[    7.924541] nvidia 0000:2b:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
inxi gx
inxi -Gx
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] vendor: Micro-Star MSI
    driver: nvidia v: 570.124.04 arch: Turing bus-ID: 2b:00.0
  Display: x11 server: X.Org v: 21.1.16 with: Xwayland v: 24.1.6 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: N/A
  API: OpenGL v: 4.6.0 vendor: nvidia v: 570.124.04 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: nvidia-settings,nvidia-smi x11: xdriinfo,
    xdpyinfo, xprop, xrandr

Use the macro method with akmod -nvidia

As you can see, I already tried it but I forget to force it. I will try to force it.

macros.nvidia-kmod:

%_with_kmod_nvidia_open 1
sudo akmods --kernels $(uname -r) --rebuild --force
Checking kmods exist for 6.13.6-200.fc41.x86_64            [  OK  ]
Building and installing nvidia-open-kmod                   [  OK  ]

But according to your comment am I still need this?

nvidia installed packages
sudo dnf list installed '*nvidia*'
Updating and loading repositories:
Repositories loaded.
Installed packages
akmod-nvidia-open.x86_64                            3:570.124.04-1.fc41              r
kmod-nvidia-6.13.5-200.fc41.x86_64.x86_64           3:570.86.16-3.fc41               @
kmod-nvidia-6.13.6-200.fc41.x86_64.x86_64           3:570.124.04-1.fc41              @
kmod-nvidia-open-6.13.6-200.fc41.x86_64.x86_64      3:570.124.04-1.fc41              @
libva-nvidia-driver.x86_64                          0.0.13^20241108git259b7b7-2.fc41 u
nvidia-gpu-firmware.noarch                          20250311-1.fc41                  u
nvidia-modprobe.x86_64                              3:570.124.04-1.fc41              r
nvidia-persistenced.x86_64                          3:570.124.04-1.fc41              r
nvidia-settings.x86_64                              3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia.x86_64                          3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia-cuda.x86_64                     3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia-cuda-libs.x86_64                3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia-libs.x86_64                     3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia-power.x86_64                    3:570.124.04-1.fc41              r
xorg-x11-drv-nvidia-xorg-libs.x86_64                3:570.124.04-1.fc41              r

It hasn’t been possible to fix the deps, akmod-nvidia-open isn’t usable.

I still can’t use it with macro method.

modinfo nvidia | grep license
license:        NVIDIA

So, do I need to build manually without akmod-nvidia-open? What should I do?

After first reboot it wasn’t built open but after second reboot it just starts to use open and I checked license and it shows DUAL MIT/GPL. I think this probably happened after I forcibly built it because I was already using a macro manual method in case the akmod-nvidia-open rpm didn’t work. I’m not sure if I understand how this works.

Currently, builds work automatically when there is new kernel update. I’m not sure but seems like kmod-nvidia and kmod-nvidia-open need to be rebuilt together, possibly due to proprietary components still being used by nvidia-open.

rpm -qa kmod-nvidia\*
kmod-nvidia-6.13.5-200.fc41.x86_64-570.86.16-3.fc41.x86_64
kmod-nvidia-open-6.13.6-200.fc41.x86_64-570.124.04-1.fc41.x86_64
kmod-nvidia-6.13.6-200.fc41.x86_64-570.124.04-1.fc41.x86_64
kmod-nvidia-6.13.7-200.fc41.x86_64-570.124.04-1.fc41.x86_64
kmod-nvidia-open-6.13.7-200.fc41.x86_64-570.124.04-1.fc41.x86_64