Can't install NVIDIA DKMS module

Hello Garuda gurus,

I've been getting this for the last week or so:

---> Building NVIDIA DKMS module for kernel 6.3.0-rc1
Module nvidia 525.89.02 is not installed for kernel 6.3.0-rc1 (x86_64). Skipping...
Module nvidia 525.89.02 is not built for kernel 6.3.0-rc1 (x86_64). Skipping...
Sign command: /usr/lib/modules/6.3.0-rc1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...
'make' -j16 IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=6.3.0-rc1 modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.3.0-rc1 (x86_64)
Consult /var/lib/dkms/nvidia/525.89.02/build/make.log for more information.
---> Failed to build NVIDIA DKMS module for kernel 6.3.0-rc1

make.log:

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.2.1 20230201
  You are using:           cc (GCC) 12.2.1 20230201

/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c: In function ‘nvidia_mmap_numa’:
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:455:19: error: assignment of read-only member ‘vm_flags’
  455 |     vma->vm_flags |= VM_MIXEDMAP;
      |                   ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c: In function ‘nvidia_mmap_helper’:
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:599:23: error: assignment of read-only member ‘vm_flags’
  599 |         vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND;
      |                       ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:666:23: error: assignment of read-only member ‘vm_flags’
  666 |         vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
      |                       ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:667:23: error: assignment of read-only member ‘vm_flags’
  667 |         vma->vm_flags |= (VM_DONTEXPAND | VM_DONTDUMP);
      |                       ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:673:23: error: assignment of read-only member ‘vm_flags’
  673 |         vma->vm_flags &= ~VM_WRITE;
      |                       ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:674:23: error: assignment of read-only member ‘vm_flags’
  674 |         vma->vm_flags &= ~VM_MAYWRITE;
      |                       ^~
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c: In function ‘nv_encode_caching’:
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:353:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  353 |             if (NV_ALLOW_CACHING(memory_type))
      |                ^
/var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.c:356:9: note: here
  356 |         default:
      |         ^~~~~~~
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/nvidia/525.89.02/build/nvidia/nv-mmap.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2028: /var/lib/dkms/nvidia/525.89.02/build] Error 2
make: *** [Makefile:82: modules] Error 2

inxi:

System:
  Kernel: 6.2.2-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=97036dd2-069e-4c8e-9342-dc76d80b5bb7
    rw rootflags=subvol=@ quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.27.2 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X570 I AORUS PRO WIFI v: -CF serial: <superuser required>
  Mobo: Gigabyte model: X570 I AORUS PRO WIFI serial: <superuser required> UEFI: American
    Megatrends LLC. v: F36 date: 12/26/2022
CPU:
  Info: model: AMD Ryzen 7 5800X3D bits: 64 type: MT MCP arch: Zen 3+ gen: 4 level: v3 note: check
    built: 2022 process: TSMC n6 (7nm) family: 0x19 (25) model-id: 0x21 (33) stepping: 2
    microcode: 0xA20120A
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 96 MiB desc: 1x96 MiB
  Speed (MHz): avg: 3542 high: 4447 min/max: 2200/4549 boost: enabled scaling:
    driver: acpi-cpufreq governor: performance cores: 1: 3553 2: 3556 3: 3400 4: 3400 5: 3544 6: 3400
    7: 3400 8: 3400 9: 3560 10: 3559 11: 3400 12: 4447 13: 3560 14: 3543 15: 3400 16: 3555
    bogomips: 108795
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA TU102 [GeForce RTX 2080 Ti] vendor: eVga.com. driver: nvidia v: 525.89.02
    alternate: nouveau,nvidia_drm non-free: 525.xx+ status: current (as of 2023-02) arch: Turing
    code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 0a:00.0 chip-ID: 10de:1e04 class-ID: 0300
  Device-2: Razer USA Gaming Webcam [Kiyo] type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 4-3.2.2:9 chip-ID: 1532:0e03 class-ID: 0102
  Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8 compositor: kwin_x11 driver: X:
    loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 6000x1440 s-dpi: 108 s-size: 1411x342mm (55.55x13.46")
    s-diag: 1452mm (57.16")
  Monitor-1: DP-2 pos: right res: 2560x1440 dpi: 109 size: 598x336mm (23.54x13.23")
    diag: 686mm (27.01") modes: N/A
  Monitor-2: DP-4 pos: primary,left res: 3440x1440 dpi: 109 size: 798x335mm (31.42x13.19")
    diag: 865mm (34.07") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 525.89.02 renderer: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
    direct-render: Yes
Audio:
  Device-1: NVIDIA TU102 High Definition Audio vendor: eVga.com. driver: snd_hda_intel
    bus-ID: 2-1:2 v: kernel chip-ID: 041e:3264 pcie: class-ID: 0102 gen: 3 serial: <filter>
    speed: 8 GT/s lanes: 16 bus-ID: 0a:00.1 chip-ID: 10de:10f7 class-ID: 0403
  Device-2: Creative Sound Blaster X3 type: USB driver: cdc_acm,hid-generic,snd-usb-audio,usbhid
  Device-3: JMTek LLC. USB PnP Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid
    bus-ID: 4-3.1.3:8 chip-ID: 0c76:161e class-ID: 0300
  Device-4: Razer USA Gaming Webcam [Kiyo] type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 4-3.2.2:9 chip-ID: 1532:0e03 class-ID: 0102
  Sound API: ALSA v: k6.2.2-zen1-1-zen running: yes
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.66 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 8086:1539 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1
    bus-ID: 06:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp6s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-2:3 chip-ID: 8087:0029
    class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 1.84 TiB used: 590.23 G
iB (31.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:2 vendor: Western Digital model: WD BLACK SN850 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 613200WD temp: 42.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 model: PCIe SSD size: 953.87 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: ECFM12.2 temp: 34.9 C
    scheme: GPT
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 187.02 GiB (20.1%) fs: btrfs
    dev: /dev/nvme0n1p2 maj-min: 259:4
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 608 KiB (0.2%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:3
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 187.02 GiB (20.1%) fs: btrfs
    dev: /dev/nvme0n1p2 maj-min: 259:4
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 187.02 GiB (20.1%)
    fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:4
  ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 187.02 GiB (20.1%)
    fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:4
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.27 GiB used: 768 KiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 51.5 C mobo: 42.0 C gpu: nvidia temp: 53 C
  Fan Speeds (RPM): fan-1: 453 gpu: nvidia fan: 15%
Info:
  Processes: 399 Uptime: 13h 12m wakeups: 2 Memory: 31.27 GiB used: 6.71 GiB (21.5%) Init: systemd
  v: 253 default: graphical tool: systemctl Compilers: gcc: 12.2.1 Packages: pm: pacman pkgs: 1927
  libs: 560 tools: octopi,pamac,paru Client: shell wrapper v: 5.1.16-release inxi: 3.3.25
Garuda (2.6.15-1):
  System install date:     2023-02-26
  Last full system update: 2023-03-10 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:            

Any ideas?

Sounds like this speaks for itself? The current nvidia driver DKMS version isn’t built for a release candidate version of 6.3 in mind. The next driver might be ready for it?

5 Likes

Either switch kernel or use Nvidia beta drivers.

4 Likes

I don't think there is actually an issue since you are not even using that kernel. You can either ignore the error message until the module is updated, try the beta driver, or just uninstall the mainline kernel altogether and stick to Zen.

4 Likes

Thanks for the ino. I guess I just assumed that it would build the module to match the kernel.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.