You are not logged in.
I am getting the following error after updating nvidia-utils with pacman -Syyu.
The error message:
kernel: NVRM: API mismatch: the client has the version 545.29.06, but
NVRM: this kernel module has the version 535.146.02. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.cat /proc/driver/nvidia/version:
NVRM version: NVIDIA UNIX x86_64 Kernel Module 535.146.02 Sun Dec 3 14:06:14 UTC 2023pacman -Q nvidia nvidia-utils:
nvidia 545.29.06-6
nvidia-utils 545.29.06-1My graphics card:
NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)On reboot the login screen for KDE plasma fails to start and i have to switch to a non graphical tty where i can login and run startplasma-wayland to get the users GUI running, is there a way to manually update the registered kernel module version to match the installed one?
Last edited by legogreek (2023-12-30 01:37:16)
Offline
"man pacman", check what the second "y" does, then stop using it except in the rare cases where you *really* mean it.
On topic:
Did you reboot after the update?
You either forgot to mount the boot partition and are booting and older kernel (compare "uname -a" w/ "pacman -Qs kernel") or have the nvidia modules in the initramfs and forgot to explicitly rebuild the latter, https://wiki.archlinux.org/title/NVIDIA#pacman_hook
Offline
"man pacman", check what the second "y" does, then stop using it except in the rare cases where you *really* mean it.
On topic:
Did you reboot after the update?
You either forgot to mount the boot partition and are booting and older kernel (compare "uname -a" w/ "pacman -Qs kernel") or have the nvidia modules in the initramfs and forgot to explicitly rebuild the latter, https://wiki.archlinux.org/title/NVIDIA#pacman_hook
Okay, it seems to be that i am not mounting the boot partition. Would this be a change to my fstab or another issue
here is the output of my lsblk:
lsblk -b
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1000204886016 0 disk
|-sda1 8:1 0 524288000 0 part /boot/efi
`-sda2 8:2 0 999679532544 0 part
`-volgroup0-lv_root 254:0 0 999674609664 0 lvm /and the contents of my fstab:
UUID=8d0cc111-45be-4a8f-889d-6ca5a4da7be5 / ext4 rw,relatime 0 1
/swapfile none swap sw 0 0
UUID=2B69-3EDF /boot/efi vfat defaults 0 1The wiki and tutorials i am finding aren't clear on what the reason is for my boot partition is not mounting at runtime, i tried running sudo grub-mkconfig as well to try regenerating my grub config.
uname -a:
Linux Laptop-Y50 6.1.69-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 20 Dec 2023 17:23:40 +0000 x86_64 GNU/Linuxpacman -Qs kernel:
local/linux 6.6.7.arch1-1
The Linux kernel and modulesOffline
That's not the entire pacman search result and you're comparing the LTS kernel w/ the regular one and the running LTS version is up to date.
Let's see whether you're booting from a boot partition:
cat /proc/cmdlineOffline
The full pacman output:
local/dkms 3.0.11-1
Dynamic Kernel Modules System
local/fuse3 3.16.2-1
Interface for userspace programs to export a filesystem to the Linux kernel
local/iptables 1:1.8.10-1
Linux kernel packet control tool (using legacy interface)
local/kmod 31-1
Linux kernel module management tools and library
local/lib32-libdrm 2.4.118-1
Userspace interface to kernel DRM services (32-bit)
local/libdrm 2.4.119-1
Userspace interface to kernel DRM services
local/libnetfilter_conntrack 1.0.9-1
Library providing an API to the in-kernel connection tracking state table
local/libnfnetlink 1.0.2-1
Low-level library for netfilter related kernel/userspace communication
local/libsysprof-capture 45.1-1
Kernel based performance profiler - capture library
local/libtraceevent 1:1.7.3-1
Linux kernel trace event library
local/libtracefs 1.7.0-1
Linux kernel trace file system library
local/linux 6.6.7.arch1-1
The Linux kernel and modules
local/linux-api-headers 6.4-1
Kernel headers sanitized for use in userspace
local/linux-headers 6.6.7.arch1-1
Headers and scripts for building modules for the Linux kernel
local/linux-lts 6.1.69-1
The LTS Linux kernel and modules
local/linux-lts-headers 6.1.69-1
Headers and scripts for building modules for the LTS Linux kernel
local/mtdev 1.1.6-2
A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol
local/ndctl 76.1-1
Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel
local/virtualbox-host-dkms 7.0.12-1
VirtualBox Host kernel modules sourcescat /proc/cmdline:
BOOT_IMAGE=/boot/vmlinuz-linux-lts root=/dev/mapper/volgroup0-lv_root rw loglevel=3 quietOffline
You're not booting from a boot partition and linux-lts 6.1.69-1 and linux-lts-headers 6.1.69-1 match the running kernel.
That's not the problem.
Did you reboot after the update?
or have the nvidia modules in the initramfs and forgot to explicitly rebuild the latter, https://wiki.archlinux.org/title/NVIDIA#pacman_hook
Offline
Here is my /etc/pacman.d/hooks/nvidia.hook
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux
# Change the linux part above if a different kernel is used
[Action]
Description=Update NVIDIA module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'Previously, the Target=nvidia was set to Target=nvidia-lts. I have rebooted and reinstalled a few times in troubleshooting as well as uninstalling the nvidia-lts module and replaced it with the nvidia module.
Offline
You want nvidia, nvidia-lts, linux and linux-lts as the targets
uninstalling the nvidia-lts module and replaced it with the nvidia module
wasn't a good idea at all, re-install nvidia-lts, check the driver version status and explicitly rebuild the initramfs.
Offline
Okay, so i reinstalled nvidia-lts and ran mkinitcpio -P and mkinitcpio -p linux-lts, rebooted still got the same issue and after running lspci -k | grep -A 2 -E "(VGA|3D)" i got:
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
Subsystem: Lenovo 4th Gen Core Processor Integrated Graphics Controller
Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
Subsystem: Lenovo GM107M [GeForce GTX 960M]
Kernel driver in use: nvidiaI am assuming Kernel driver in use: is expected to show nvidia-lts? Would it be a good idea to pacman -R nvidia?
Offline
No and no.
Do you actually still get the version mismatch?
pacman -Qs nvidiaOffline
I do.
pacman -Qs nvidia
local/egl-wayland 2:1.1.13-1
EGLStream-based Wayland external platform
local/libvdpau 1.5-2
Nvidia VDPAU library
local/libxnvctrl 545.29.06-1
NVIDIA NV-CONTROL X extension
local/nvidia 545.29.06-6
NVIDIA drivers for linux
local/nvidia-lts 1:545.29.06-7
NVIDIA drivers for linux-lts
local/nvidia-utils 545.29.06-1
NVIDIA drivers utilitiesdmesg | tail:
[ 43.659433] wlan0: authenticated
[ 43.660305] wlan0: associate with 70:3a:cb: (try 1/3)
[ 43.667274] wlan0: RX AssocResp from 70:3a:cb: (capab=0x1011 status=0 aid=5)
[ 43.669250] wlan0: associated
[ 43.681820] wlan0: Limiting TX power to 30 (30 - 0) dBm as advertised by 70:3a:cb:
[ 43.753955] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 73.028430] NVRM: API mismatch: the client has the version 545.29.06, but
NVRM: this kernel module has the version 535.146.02. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.Offline
Please post your complete system journal for the boot:
sudo journalctl -b | curl -F 'file=@-' 0x0.stBut there's almost no explanation but a residual nvidia kernel module in the initramfs.
pacman -Qikk nvidia nvidia-lts
stat /boot/initramfs-linux*.imgOffline
Well im glad its more advanced than me just sucking at google lol.
sudo journalctl -b | curl -F 'file=@-' 0x0.st:
http://0x0.st/HEB5.txt
pacman -Qikk nvidia nvidia-lts:
Name : nvidia
Version : 545.29.06-6
Description : NVIDIA drivers for linux
Architecture : x86_64
URL : https://www.nvidia.com/
Licenses : custom
Groups : None
Provides : NVIDIA-MODULE
Depends On : linux nvidia-utils=545.29.06 libglvnd
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 42.66 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Wed Dec 13 23:28:24 2023
Install Date : Tue Dec 26 17:56:33 2023
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
nvidia: 14 total files, 0 altered files
Name : nvidia-lts
Version : 1:545.29.06-7
Description : NVIDIA drivers for linux-lts
Architecture : x86_64
URL : https://www.nvidia.com/
Licenses : custom
Groups : None
Provides : NVIDIA-MODULE
Depends On : linux-lts nvidia-utils=545.29.06 libglvnd
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 42.21 MiB
Packager : Andreas Radke <andyrtr@archlinux.org>
Build Date : Wed Dec 20 14:11:58 2023
Install Date : Wed Dec 27 11:24:37 2023
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
nvidia-lts: 14 total files, 0 altered filesstat /boot/initramfs-linux*.img
File: /boot/initramfs-linux-fallback.img
Size: 45325737 Blocks: 88536 IO Block: 4096 regular file
Device: 254,0 Inode: 1311354 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-12-27 11:25:42.017555400 -0500
Modify: 2023-12-27 11:25:42.490900850 -0500
Change: 2023-12-27 11:25:42.584236573 -0500
Birth: 2023-12-27 11:25:42.017555400 -0500
File: /boot/initramfs-linux-lts-fallback.img
Size: 42207219 Blocks: 82448 IO Block: 4096 regular file
Device: 254,0 Inode: 1312506 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-12-27 11:27:52.634358361 -0500
Modify: 2023-12-27 11:27:53.041043680 -0500
Change: 2023-12-27 11:27:53.131047573 -0500
Birth: 2023-12-27 11:27:52.634358361 -0500
File: /boot/initramfs-linux-lts.img
Size: 15552216 Blocks: 30376 IO Block: 4096 regular file
Device: 254,0 Inode: 1312389 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-12-27 11:27:44.387193421 -0500
Modify: 2023-12-27 11:27:44.547205792 -0500
Change: 2023-12-27 11:27:44.583875294 -0500
Birth: 2023-12-27 11:27:44.387193421 -0500
File: /boot/initramfs-linux.img
Size: 16476093 Blocks: 32184 IO Block: 4096 regular file
Device: 254,0 Inode: 1312508 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-12-27 11:25:33.310667025 -0500
Modify: 2023-12-27 11:25:33.470671081 -0500
Change: 2023-12-27 11:25:33.514005513 -0500
Birth: 2023-12-27 11:25:33.310667025 -0500Offline
The module isn't in the initramfs by that journal - what makes even less sense…
modinfo nvidiaOffline
modinfo nvidia
filename: /lib/modules/6.1.69-1-lts/updates/dkms/nvidia.ko.zst
firmware: nvidia/535.146.02/gsp_tu10x.bin
firmware: nvidia/535.146.02/gsp_ga10x.bin
alias: char-major-195-*
version: 535.146.02
supported: external
license: NVIDIA
srcversion: DC4E5EAFE45D39355265FB9
alias: pci:v000010DEd*sv*sd*bc06sc80i00*
alias: pci:v000010DEd*sv*sd*bc03sc02i00*
alias: pci:v000010DEd*sv*sd*bc03sc00i00*
depends:
retpoline: Y
name: nvidia
vermagic: 6.1.69-1-lts SMP preempt mod_unload
sig_id: PKCS#7
signer: DKMS module signing key
sig_key: 7A:D5:2C:F7:FE:04:46:9D:A6:1F:D4:3C:0A:70:DB:B2:12:B2:05:55
sig_hashalgo: sha512
signature: 8F:8B:EF:BB:29:54:1B:68:10:9B:B1:7E:C0:F2:AC:D7:36:3E:13:68:
50:E2:31:1A:7F:34:E3:CE:B6:6F:CD:50:97:18:D0:2D:5B:FD:DC:3A:
B4:C0:E2:45:65:87:E6:17:5B:92:17:1D:89:B5:BD:50:A4:04:7C:A5:
E2:F2:30:7C:06:73:1D:8B:EF:1D:10:D0:EE:F6:1E:15:E7:28:4F:4B:
7D:4C:4D:FA:14:34:6F:3B:C4:49:68:7D:C9:D0:36:E6:47:20:96:16:
8F:64:18:2E:85:76:D9:AB:A7:6E:99:5D:30:73:CD:40:C1:FE:D7:24:
BF:A6:AB:C8:E0:68:D2:46:E0:87:30:75:33:BF:35:59:D0:C3:67:E8:
5C:31:6D:A1:24:B0:B5:64:78:97:5E:35:14:4D:D3:19:8C:FF:3A:D5:
D3:A8:37:AF:25:EE:BD:DF:3D:05:85:A4:F8:EB:8D:13:6A:DF:8F:B7:
BA:28:DF:1C:41:D7:58:54:18:C4:FB:7A:2C:59:6D:BF:C0:79:D8:8C:
CE:8A:A6:98:A9:68:7A:E6:DC:4D:23:DC:88:47:76:D5:E5:C9:1E:A6:
E7:5B:A7:C1:E6:51:2D:15:B6:23:C3:D8:6A:43:B5:41:A4:53:56:84:
B7:25:9F:FB:4B:83:71:11:5B:34:4E:A5:2F:EF:0A:29
parm: NvSwitchRegDwords:NvSwitch regkey (charp)
parm: NvSwitchBlacklist:NvSwitchBlacklist=uuid[,uuid...] (charp)
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_EnableStreamMemOPs:int
parm: NVreg_RestrictProfilingToAdminUsers:int
parm: NVreg_PreserveVideoMemoryAllocations:int
parm: NVreg_EnableS0ixPowerManagement:int
parm: NVreg_S0ixPowerManagementVideoMemoryThreshold:int
parm: NVreg_DynamicPowerManagement:int
parm: NVreg_DynamicPowerManagementVideoMemoryThreshold:int
parm: NVreg_EnableGpuFirmware:int
parm: NVreg_EnableGpuFirmwareLogs:int
parm: NVreg_OpenRmEnableUnsupportedGpus:int
parm: NVreg_EnableUserNUMAManagement:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_KMallocHeapMaxSize:int
parm: NVreg_VMallocHeapMaxSize:int
parm: NVreg_IgnoreMMIOCheck:int
parm: NVreg_NvLinkDisable:int
parm: NVreg_EnablePCIERelaxedOrderingMode:int
parm: NVreg_RegisterPCIDriver:int
parm: NVreg_EnableResizableBar:int
parm: NVreg_EnableDbgBreakpoint:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RegistryDwordsPerDevice:charp
parm: NVreg_RmMsg:charp
parm: NVreg_GpuBlacklist:charp
parm: NVreg_TemporaryFilePath:charp
parm: NVreg_ExcludedGpus:charp
parm: NVreg_DmaRemapPeerMmio:int
parm: NVreg_RmNvlinkBandwidth:charp
parm: rm_firmware_active:charpOffline
"HA-HAHH!"
You've a stale and dated dkms module.
Offline
So I tried the dkms install command which returned:
Sign command: /usr/lib/modules/6.1.69-1-lts/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Error! Could not find module source directory.
Directory: /usr/src/nvidia-lts-545.29.06 does not exist.and ls -la /usr/src/:
total 20
drwxr-xr-x 5 root root 4096 Dec 23 13:43 .
drwxr-xr-x 11 root root 4096 Dec 27 11:24 ..
drwxr-xr-x 3 root root 4096 Sep 26 16:52 hid-xpadneo-v0.9.5
lrwxrwxrwx 1 root root 34 Dec 13 22:45 linux -> ../lib/modules/6.6.7-arch1-1/build
lrwxrwxrwx 1 root root 33 Dec 20 12:23 linux-lts -> ../lib/modules/6.1.69-1-lts/build
drwxr-xr-x 5 root root 4096 Dec 19 09:10 vboxhost-7.0.12_OSE
drwxr-xr-x 6 root root 4096 Sep 27 19:39 xone-0.3Offline
Offline
So it looks like dkms looks in the /usr/src directory for the module you are trying to install but the nvidia module isnt in that directory hence the previous error.
dkms status
hid-xpadneo/v0.9.5, 6.1.69-1-lts, x86_64: installed
hid-xpadneo/v0.9.5, 6.6.7-arch1-1, x86_64: installed
vboxhost/7.0.12_OSE, 6.1.69-1-lts, x86_64: installed
vboxhost/7.0.12_OSE, 6.6.7-arch1-1, x86_64: installed
xone/0.3, 6.1.69-1-lts, x86_64: installedLast edited by legogreek (2023-12-28 22:24:59)
Offline
If the package dkms is removed the information regarding previous module build files is lost. If this is the case, go through /usr/lib/modules/kernel_release and /var/lib/dkms/package_name and delete all files and directories no longer in use.
Offline
does that mean i delete all these files? nothing related to nvidia is in /var/lib/dkms
find /usr/lib/modules/6.1.69-1-lts/ -name nvidia*:
/usr/lib/modules/6.1.69-1-lts/extramodules/nvidia-modeset.ko.xz
/usr/lib/modules/6.1.69-1-lts/extramodules/nvidia-drm.ko.xz
/usr/lib/modules/6.1.69-1-lts/extramodules/nvidia-peermem.ko.xz
/usr/lib/modules/6.1.69-1-lts/extramodules/nvidia-uvm.ko.xz
/usr/lib/modules/6.1.69-1-lts/extramodules/nvidia.ko.xz
/usr/lib/modules/6.1.69-1-lts/kernel/drivers/net/ethernet/nvidia
/usr/lib/modules/6.1.69-1-lts/kernel/drivers/platform/x86/nvidia-wmi-ec-backlight.ko.zst
/usr/lib/modules/6.1.69-1-lts/build/drivers/net/ethernet/nvidia
/usr/lib/modules/6.1.69-1-lts/build/drivers/media/platform/nvidia
/usr/lib/modules/6.1.69-1-lts/build/include/linux/platform_data/x86/nvidia-wmi-ec-backlight.hOffline
The immediately offending module is /lib/modules/6.1.69-1-lts/updates/dkms/nvidia.ko.zst and there may be more in /lib/modules/6.1.69-1-lts/updates/dkms/
Edit: the ones you posted are part of nvidia-lts and linux-lts, leave them where they are.
Last edited by seth (2023-12-28 22:52:39)
Offline
Well that seems to have worked, do i just ignore dkms from now on / should i be using it at all?
Edit: version mismach error is gone but now modinfo nvidia-lts returns modinfo: ERROR: Module nvidia-lts not found.
Last edited by legogreek (2023-12-28 23:10:57)
Offline
You don't need dkms for kernels where precompiled modules are available (for nvidia, linux and linux-lts) but eg. xone is exclusively available as dkms module (in the AUR) so you'll need dkms for that (at least)
You'll also need dkms for other kernel (ck, zen, …) but that's generally not a problem, the unclean removal was.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
That works for me, appreciate all the help.
Offline