NVIDIA GPU not detected after driver update
Few days ago I did the weekly system update which included latest NVIDIA drivers. Everything went smoothly, no error messages, systems works as usual. Today I wanted to play some game and I noticed that the performance was horrible. This is what I found
lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] (rev 0c)
Subsystem: Dell Device 0aff
Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
Subsystem: Dell Device 0aff
Kernel driver in use: nvidia
xrandr --listproviders
Providers: number : 0
I've tried to reinstall drivers, and ran some fixes I found online but still no luck. Any ideas how to fix it?
update
Just remembered. After last drivers update I wasn't able to run any Steam game. I always got some directx error. Before I had no issues.
update 2
I'm on Fedora 40, currently I'm using drivers downloaded directly from NVIDIA website. Before that I was using whatever drivers from these repositories
dnf repolist
repo id repo name
fedora Fedora 40 - x86_64
fedora-cisco-openh264 Fedora 40 openh264 (From Cisco) - x86_64
nvidia-container-toolkit nvidia-container-toolkit
protonvpn-fedora-stable ProtonVPN Fedora Stable repository
rpmfusion-free RPM Fusion for Fedora 40 - Free
rpmfusion-free-updates RPM Fusion for Fedora 40 - Free - Updates
rpmfusion-nonfree RPM Fusion for Fedora 40 - Nonfree
rpmfusion-nonfree-updates RPM Fusion for Fedora 40 - Nonfree - Updates
updates
The only thing I remember related to messing with drivers was playing with podman containers accessing my gpu (nvidia-container-toolkit).
Currently I'm using driver version 550.107.02
Did I understand it right that you installed the driver manually? It's generally better to use the Fedora Nvidia driver package (sudo dnf install akmod-nvidia), than to download from Nvidia's website. I'm on Fedora 40 too, and currently using the 560.35.03 version of the driver on a 2080, which upgraded from 555 recently - I wonder if that's what broke compatibility with your version of the driver. It may be that you need to update. Only thing I'm not sure of is how this will interact with manually-installed drivers...
Installing drivers manually was the last resort. Before that I did the
sudo dnf install akmod-nvidia
.This is what you should be using on Fedora. Though take note, after each kernel update, you need to allow the module some time to rebuild, then reboot to ensure it got loaded properly.
Try running:
'dnf reinstall kernel-modules'
then reboot. This will trigger a cascading rebuild of the kernel modules that get rebuilt on every kernel update.
It didn't work. At this point I'm considering nuking the whole thing and start with the fresh system. If it won't work I will buy a Windows PC just for gaming.
Blacklist nouveau, install the akmod, you'll be fine
Already did that. Didn't help.
Well then follow every single guide online that is telling you exactly what people here are telling you. Remove every single Nvidia package, disable secure boot, then reinstall.
I did all those things before I asked a question.
Then you've done something wrong. Revisit the steps, learn how to read 'dmesg' and debug. Show more logs.
I would reinstall the rpm fusion ones and remove the ones from the official site, also check if maybe there is a flatpak update for steam if you have it. Also blacklist your nouveau driver in the grep config file, it could be that its using that.
If you want to check if its working use glx-gears with the info flag and set the opengl to the nvidia card. It could be that it doesnt work, its been a long time since my driver broke.
I am also experiencing this issue on Fedora 40 with the Negativo drivers, and I believe this is a flatpak issue. Here is a GitHub issue detailing the problem. Allegedly it has been fixed, but I have updated to the latest commit and am still having the same issue, so I am unsure what to do (I've spent a number of hours trying to troubleshoot this). You might have luck just running a
flatpak update
, as that is supposed to solve this issue (YMMV though, it didn't fix it for me).What is the output of "modinfo nvidia"?
From your output it looks like the driver is loaded, it might just be the game/OS selecting the wrong GPU by default.
::: spoiler modinfo nvidia
:::
Yeah that means the driver is loaded fine, but it looks like it is selecting the iGPU by default. You have several options to fix this.
You can disable integrated graphics in the bios if there is an option for it. This is the easiest, but if you're on a laptop, leaving it enabled might save some battery in which case goto 2.
You can tell either each program or the OS to prefer the Nvidia GPU. The way you do this also depends on how the gpu is set up (most laptops have it as secondary)
You can test this by running
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
in one terminal, andnividia-smi
in a second terminal to verify a program (in this case glxgears) is running on the nvidia gpu.I'll try to find a good guide, but depending on the setup, it could be a simple MUX switch you can flip to change between iGPU and Nvidia GPU, or with the use of some preference selector tool (I think it was called prime?).
It's confusing because lots of laptops essentially use the Nvidia GPU as offload which makes it a bit tricky to coaxe it into using the correct one.
This worked. I haven't checked the bios yet. If there's an option to disable integrated graphics I will use it. For now I will just use the vars.
Funny thing, yesterday there was an update for nvidia drivers. I was stupid enough to install it and now I have the same directx error as before. I'm done with gaming on Linux.
Could you show us the kernel command line parameters (in /etc/default/grub)? Is the modeset along with other params enabled? I'm not a fedora user, so I may not be of too much help.
Do you not need the
nvidia-drm.modeset=1
inGRUB_CMDLINE_LINUX
?https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/#262-edit-etcdefaultgrub
You might be right. I have a feeling that when I blacklisted nouveau rest of the stuff got deleted from this line. I'll give it a try.
Make sure to update your grub after you do. I've messed that one up before lol 😅
Yeah, I think I messed it up :) Now my system starts in cli mode. Well, I wanted to nuke everything anyway so no harm done.
edit
I was able to switch to gui but still no luck with the gpu.
Ah if you messed it up, you can press "e" on the grub entry and edit the command line parameters to remove the thing that messes it up. Good luck with your fresh install [and use Debian this time... jk :)]
timeshift. then skip that update.