I just updated my system and it pulled kernel 6.18.22 and latest nvidia drivers 595.58.xx and after reboot I logged in as normally from TTY1 (I don’t use a greeter like LDDM) and it couldn’t open Sway, error was no GPU found.
then downgrade to a 580.. series: sudo emerge —ask -1 x11-drivers/nvidia-drivers
it installed the older driver. Then rebuild the nvidia module to the kernel:
sudo emerge @module-rebuild
reboot and Sway works! My GPU is GTX1060 3GB. So if you use older Nvidia and propetiary drivers your gpu might loose support. I don’t know how to mask a new nvidia-driver on other OSes.
Maybe someone could add their fix for let’s say Ubuntu/Debian etc..
I think you may be able to blacklist drivers in /etc/modules in Debian based distros. That would let the modules install, but prevent them loading into the kernel.
The Gentoo solution is more elegant. Portage is a really powerful package manager.
This sort of thing is not really a good mark for Nvidia in the Linux world. I wonder if they have enough Linux expertese to really support Linux properly.?
On Debian and possibly all derived systems the apt-mark hold <packagename> marks packages NOT to be upgraded from currently installed version. This works for nvidia-drivers too.
That is for not loading an installed drier upon boot. This particular topic seems to more about not upgrading the already installed version.
Just one additional note: once the upgrade of a package happened via an apt upgrade, and the experience shows that the earlier version worked better:
Install the previous version apt intall <that_package>=<the_exact_version_that_works>
(For example, if I wanted to downgrade OnlyOffice, it would look like so: