In general, I make one program, and so… I am the owner of an nvidia video card, I discovered that I need to reinstall the packages:
to install any version of nvidia.
If you have an amd or intel card, please let me know which packages need to be reinstalled to change the package version.
That is a hard one. Those packages won’t always be the correct list for nvidia. Sometimes there will be more or less. Also, it might not be
nvidia-dkms that is installed. It could be
nvidia-lts or several other variants from AUR.
The intel and amd drivers are part of the kernel. They get upgraded with the kernel.
There are things like mesa, vulkan, vaapi, etc but those will vary per install.
At the moment, in my program, anyone other than nvidia-dkms is replaced by it.
But I think can simply find out what the user has installed and change instead of nvidia-dkms to nvidia or nvidia-lts (if the other packages are suitable).
I haven’t come up with anything other than going through the list… But if you have other ideas, I’ll be glad to hear
What are you trying to achieve? Giving people the ability to downgrade their drivers? If so, where are you getting the packages?
Ahh…isn’t that a bad idea?
If you pull an older package out of the archive it might be linked against older libraries and break the target system.
This is true if, for example, I install only 1 nvidia-dkms package. And if I install a stack of packages, as it is arranged in my program. For example, if I select nvidia-dkms version 123.12, then I can install all other packages only of this version (I can only select a patch).
It isn’t only nvidia packages. For example, I suspect they are linked to
libglvnd. If that changes, there may be a problem. But you can’t just bring that in as it is linked to a bunch of other packages.
This is the whole partial update scenario that is warned about so often.
If you want to offer older drivers, they need to be built against current libraries, I don’t think you can safely pull them from the archives.
Have you looked at nvidia-all?
I have never tried it but it may be a better solution for what you are trying to achieve.
Yes indeed old packages lead to a black screen, I think I should try it
limit the sheet (for example, show the last 5 versions). Thanks, I’ll look towards nvidia-all.