Debian 12 (testing) Nvidia error
Alter_RK
Status: New User - Welcome
Joined: 14 Aug 2022
Posts: 2
Reply Quote
A few days ago, the discrete graphics card on my laptop stopped working. Nvidia modules not loading: nvidia_drm, nvidia_modeset, nvidia

Rolling back the kernel to an earlier version does not help. Driver version 470.141.03. Everything works on the native kernel.

Can you please tell me how to load these modules?

Lenovo Legion S7 15ACH6
AMD Ryzen™ 7 5800H with Radeon™ Graphics × 16
NVIDIA GeForce RTX™ 3060 Laptop GPU / RENOIR
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
You don't 'download' those modules, that's a non free nvidia legacy driver, it's possible it does not support the Liquorix kernel versions, I can't say, but you don't appear to be familiar with how to run non free drivers, so Liquorix may not be the best option for you. If you are by any chance an LMDE, not a real Debian testing, user, then you should say so. Most Debian users would know how this stuff works, which is why I note this possibility. Mint is totally impossible to support due to how they mix so many sources.

You have to build the module, not download it, and when you try to mix these things, it generally does not go well. I'm not going to get into the nitty gritty of all that, but I will tell you, that is the latest 470.xx driver, but I don't follow which kernels it supports, I used to, with sgfxi stuff, but I don't actively follow it anymore, I stopped using nvidia and have been happy ever since, no issues, no worrying about non free drivers breaking on kernel updates, I recommend it, it's nice.

With non free modules, you have to rebuild them, or reinstall them, or install the latest, ideally using the .run package, either hoping the automated systems work for that, or by doing it manually, which is a bunch of steps, which I'm not going to go through. I will tell you that there a lot of things you could have done wrong, so many it's not worth trying to figure out which it is.

If the kernel doesn't support that non free driver, then you can't use that non free driver, or you roll back and use the debian plus debian packaged version of that driver, which will then work, assuming the kernel is supported. Note that I do not believe Debian will not release a kernel just because a non free driver does not support it, and since Debian Testing is not currently frozen, there's no guarantee that legacy driver will keep working, at least until it's frozen, then if you stick with the debian kernel and nvidia non free driver package, they should work fine, until the freeze is released, and testing starts to flow again.

This has nothing to do with Liquorix, running non free drivers means you have to understand how to run non free drivers, and what the failures and fixes are, that's not a Liquorix kernel related issue.

Non free means non free, there's a cost to using it, that's why Debian doesn't ship it in their main or even secondary repos, only in the non-free repos, and you're the only person who will be carrying that cost, that is not related to anyone else.

Buying a laptop with a non free nvidia card with no free driver, except nouveau, which is often buggy and doesn't work very well, is not a good idea if you want to run linux long term, sell it and get one with either amd or intel is my advice, you're probably only going to see that driver supported for maybe 1 or 2 more years, depends on when nvidia drops support, it varies for legacy drivers, you really never know.

Stick with Debian kernel and non free driver package, then go with the freeze and go to Debian next stable, if you want to use the non free driver long term, otherwise any year support will vanish and you won't be able to run it, and will have to use nouveau, which will either work ok or have bugs you will never get resolved.

Just an aside, the 470.xx legacy cards will never see the new partially opening nvidia driver you may have heard of, that will be, and is, 100% dependent on a huge firmware blob built into the card, that's where they moved a chunk of the non free driver into hardware based firmware, then have a light wrapper of 'open source' driver to talk to the kernel, but that's only I believe Turing/Ampere and newer cards, not even Kepler series. Yours is either a kepler or a fermi, and will never get a free driver from nvidia, so selling that laptop would be a not terrible idea if you want to keep using GNU/Linux Debian long term.
Back to top
Alter_RK
Status: New User - Welcome
Joined: 14 Aug 2022
Posts: 2
Reply Quote
thanks for the clarifications
Back to top
rongrong
Status: New User - Welcome
Joined: 19 Sep 2022
Posts: 3
Reply Quote
At least for now, Liquorix is built with GCC 11 but the default GCC version in Debian testing is GCC 12. As a result, nvidia non-free driver rejects to build with an unmatched GCC version.

To build nvidia non-free driver, you need to switch back to GCC 11:

:: Code ::

sudo apt install gcc-11 g++-11

sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 20

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 20

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++


Then clean all packages related to nvidia non-free driver:
:: Code ::

sudo apt purge nvidia*


Now you can reinstall nvidia non-free driver.

Note:
To reset your default GCC version, simply remove alternatives and reinstall GCC:
:: Code ::

sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt reinstall gcc g++


Each time your GCC packages gets upgraded, you need to recover the overwritten symlinks:
:: Code ::

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
I cleared my docker image cache and spawned a rebuild for the existing release. That should fix the wrong GCC version being used.
Back to top
rongrong
Status: New User - Welcome
Joined: 19 Sep 2022
Posts: 3
Reply Quote
Ah huh, I previously thought that there must be some reason for Liquorix to use GCC 11 still, but it turned out to be a mistake! Anyway, thanks for your quick fix.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours