You are not logged in.

#1 2024-09-11 19:57:22

rek
Member
Registered: 2023-03-02
Posts: 31

NVIDIA driver broke after changing kernels

xfce, plain arch. went from the latest kernel down to the LTS.

after reboot, getting errors such as:

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

probably broke the bejesus out of a lot of other things too. I didn't rebuild any headers or anything, is that something that needs to be done?

I'm coming from KDE to xfce so I was spoiled by the nifty kernel changing tool. so this time I broke some stuff, and I'm not sure what. At least the video driver is broken.

Offline

#2 2024-09-11 20:31:06

seth
Member
Registered: 2012-09-03
Posts: 60,405

Re: NVIDIA driver broke after changing kernels

You need the Nvidia kernel modules for the specific kernel, in doubt nvidia-dkms and the Kernels Header package.

Online

#3 2024-09-11 20:42:34

rek
Member
Registered: 2023-03-02
Posts: 31

Re: NVIDIA driver broke after changing kernels

seth wrote:

You need the Nvidia kernel modules for the specific kernel, in doubt nvidia-dkms and the Kernels Header package.

I doubt that the only problems i am going to find are Nvidia ones, if my headers are for the wrong kernel. but I'm guessing in the dark.

I just found that the proper way to downgrade a kernel is to use 'sudo pacman -U' according to the wiki:
https://wiki.archlinux.org/title/Downgr … the_kernel

In case of issue with a new kernel, the Linux packages can be downgraded to the last working ones #Using the pacman cache. Go into the directory /var/cache/pacman/pkg and downgrade at least linux, linux-headers and any kernel modules. For example:

# pacman -U file://linux-4.15.8-1-x86_64.pkg.tar.xz file://linux-headers-4.15.8-1-x86_64.pkg.tar.xz file://virtualbox-host-modules-arch-5.2.8-4-x86_64.pkg.tar.xz

I tried uninstalling the nvidia driver and re-installing, and rebooting and that did nothing so right now i think its because i have a headers mismatch on the kernel.

Last edited by rek (2024-09-11 20:49:57)

Offline

#4 2024-09-11 20:49:00

seth
Member
Registered: 2012-09-03
Posts: 60,405

Re: NVIDIA driver broke after changing kernels

You can skip the File protocol but have to enter the full path.
Why ist this now about "downgrading"?
You Said you switched the kernel - If youd downgrade the kernel you have to downgrade the Nvidia packahes accordingly.

pacman -Qs 'kernel|nvidia'
uname -a

Online

#5 2024-09-12 07:28:13

rek
Member
Registered: 2023-03-02
Posts: 31

Re: NVIDIA driver broke after changing kernels

to fix nvidia I performed a 'pacman -Syu nvidia nvidia-utils' but it also re-upgraded the linux kernel and linux-headers automatically. so now the modules and headers are matching as they were before I tried to downgrade to LTS

i would use kde plasma and have the luxury of easy kernel switching but the reason I switched to xfce is much better stability in one of my more important programs.
maybe there's a lazy kernel changer frontend that works in xfce, or maybe a kde kernel manager would even work. not sure about that.

I'm not sure it's what you intended but I'll share the output of the two commands you just mentioned. everything works now except I want to downgrade my kernel to the latest LTS for testing.

(base) [username@thing ~]$ pacman -Qs 'kernel|nvidia'

local/cuda 12.6.1-1
    NVIDIA's GPU programming toolkit
local/dkms 3.0.12-1
    Dynamic Kernel Modules System
local/egl-wayland 4:1.1.16-1
    EGLStream-based Wayland external platform
local/embree 4.3.3-1
    Collection of high-performance ray tracing kernels
local/fuse2 2.9.9-5
    Interface for userspace programs to export a filesystem to the Linux kernel
local/fuse3 3.16.2-1
    Interface for userspace programs to export a filesystem to the Linux kernel
local/intel-oneapi-mkl 2024.1.0-1
    Intel oneAPI Math Kernel Library
local/iptables 1:1.8.10-2
    Linux kernel packet control tool (using legacy interface)
local/kmod 33-3
    Linux kernel module management tools and library
local/lib32-libdrm 2.4.122-1
    Userspace interface to kernel DRM services (32-bit)
local/lib32-libvdpau 1.5-3
    Nvidia VDPAU library
local/lib32-nvidia-utils 560.35.03-1
    NVIDIA drivers utilities (32-bit)
local/libdrm 2.4.123-1
    Userspace interface to kernel DRM services
local/libnetfilter_conntrack 1.0.9-2
    Library providing an API to the in-kernel connection tracking state table
local/libnfnetlink 1.0.2-2
    Low-level library for netfilter related kernel/userspace communication
local/libsysprof-capture 46.0-4
    Kernel based performance profiler - capture library
local/libvdpau 1.5-3
    Nvidia VDPAU library
local/libxnvctrl 560.35.03-1
    NVIDIA NV-CONTROL X extension
local/linux 6.10.9.arch1-2
    The Linux kernel and modules
local/linux-api-headers 6.10-1
    Kernel headers sanitized for use in userspace
local/linux-headers 6.10.9.arch1-2
    Headers and scripts for building modules for the Linux kernel
local/linux-lts 6.6.50-2
    The LTS Linux kernel and modules
local/mtdev 1.1.7-1
    A stand-alone library which transforms all variants of kernel MT events to
    the slotted type B protocol
local/nvidia 560.35.03-5
    NVIDIA drivers for linux
local/nvidia-prime 1.0-5
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 560.35.03-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 560.35.03-2
    NVIDIA drivers utilities
local/opencl-nvidia 560.35.03-2
    OpenCL implemention for NVIDIA

(base) [username@thing ~]$ uname -a

Linux thing 6.10.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 10 Sep 2024 14:37:32 +0000 x86_64 GNU/Linux

Last edited by rek (2024-09-12 07:33:05)

Offline

#6 2024-09-12 07:31:41

seth
Member
Registered: 2012-09-03
Posts: 60,405

Re: NVIDIA driver broke after changing kernels

If you want to use the let's kernel, install nvidia-lts
This has nothing to do with KDE or XFCE

Online

#7 2024-09-12 07:47:05

rek
Member
Registered: 2023-03-02
Posts: 31

Re: NVIDIA driver broke after changing kernels

let's say i downgrade linux and linux headers from 6.10.x  to 6.6.x just for example. (not necessarily LTS)

How does one go about getting the right NVIDIA driver, headers, modules and all other stuff to play along?

I'm still not sure Nvidia is the only thing I might break by changing the kernel, but i digress.

maybe nvidia-dkms might be a better way to handle it if i want to arbitrarily change kernel to something not current, or if I need LTS, use nvidia-lts

Last edited by rek (2024-09-12 08:08:41)

Offline

#8 2024-09-12 10:35:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,606

Re: NVIDIA driver broke after changing kernels

nvidia-dkms will be by far the easiest way to handle that yes. Otherwise you need to find the exact matching "nvidia" package that was relevant for the exact, including the minor version 6.6 kernel you want to use, which in this case would likely mean downgrading the driver as a whole -- if you're unlucky run into incompatible toolchains with gcc and then have to compile the entire kernel yourself - etc.

A kernel module (doesn't matter which, this isn't exclusive to nvidia) always needs to match the exact kernel it's built for (you don't "actively" notice this for modules the kernel ships with since that's a given then, but is true in that case regardless). DKMS is a mechanism that helps you rebuilding modules that aren't part of the linux kernel tree by rebuilding them against the current headers you have installed.

Last edited by V1del (2024-09-12 10:38:01)

Online

Board footer

Powered by FluxBB