NVRM: Xid ... CTX SWITCH TIMEOUT in some games after update. How to downgrade Nvidia drivers?

I have Nvidia RTX 5080, after an update several days ago some games (Last of us 2, Kingdom come deliverance 2) freeze and crash after several minutes or seconds with this error in dmesg and journalctl: NVRM: Xid (PCI:0000:01:00): 109, pid=11353, name=tlou-ii.exe, channel 0x0000000c, errorString CTX SWITCH TIMEOUT

$ pacman -Q | grep nvidia
lib32-nvidia-utils 580.105.08-1
libnvidia-container 1.18.0-1
linux-firmware-nvidia 20251111-1
nvidia-container-toolkit 1.18.0-1
nvidia-open 580.105.08-2
nvidia-settings 580.105.08-1
nvidia-utils 580.105.08-2

I guess downgrading the drivers may help? But how to do that correctly? Do I just downgrade nvidia-open, or do I need something else?

Downgrade all the “updated” packages, Everything with 580.105.08. See your own post above.

Maybe package nvidia-open-dkms is more compatible that nvidia-open?
Worth a try anyway. Note that it needs kernel header package(s) too.

hm, what does it mean? :sweat_smile:
What should I do to try that safely?

Kernel headers are packages whose names have suffix -headers.
For example, the headers package for linux is linux-headers and for linux-lts it is linux-lts-headers.

To try the dkms version of the driver run:

sudo pacman -Syu --needed nvidia-inst
nvidia-inst --test

The latter command doesn’t change anything but suggests the commands you’d need to switch the driver.
You can show the output here if you are not sure about them.
Note that nvidia-inst has many options, and some are what you might want to use.

To revert the driver back to previous, you may run

nvidia-inst --no-dkms --test

to see the suggestions.

It worked, just nvidia-inst and reboot.
But still the same crashes :frowning:

Since this seems to be related gaming I think gamers here can provide more insight as I’m not in gaming. Anyway, the Nvidia driver should be OK.

Downgrading also worked via sudo downgrade lib32-nvidia-utils libxnvctrl nvidia-open-dkms nvidia-settings nvidia-utils

At first I thought it helped but then it crashed again a bit later. But looks like at least for one of the games it’s a game-specific issue, I limited the fps and refresh rate to 60 as suggested in the ProtonDB comments for Last of us 2 and it stopped crashing.