-
-
Notifications
You must be signed in to change notification settings - Fork 128
Add ability to get driver from NVIDIA's official RHEL repository, to avoid version issues #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
copy additional rpm to temp in unpack phase
|
Since it seems that the driver version is consistent across Debian, Fedora and RHEL, at least at this point, pulling the driver from the RHEL repository very likely also works on other distros, pending somebody testing this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me as an approach to implementing the idea, but it's strange to me that it's necessary. Are the RHEL repositories more reliable? Have you inquired on the NVidia developer forums about this strange behavior of deleting old versions from the download site? Does the license permit redistribution? If so, we could also consider making our own repository of them.
| } | ||
| export LD_LIBRARY_PATH=${lib.makeLibraryPath mesa-drivers}:${lib.makeSearchPathOutput "lib" "lib/vdpau" libvdpau}:${glxindirect}/lib:${lib.makeLibraryPath [libglvnd]}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||
| export LIBVA_DRIVERS_PATH=${ | ||
| lib.makeSearchPathOutput "out" "lib/dri" (mesa-drivers ++ vadrivers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move the formatting changes here, and elsewhere in the PR, into their own commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for those, autoformatting...
|
Oh I missed this in my first review, but now that the tests are working could you add a test for this? |
|
I'm short on time right now, but will look into tests when I find time. Do you have a specific testing methodology? |
This is needed because the specific driver version used in RHEL rarely (never) matches a version available in the NVIDIA repos. People have inquired about this many times, but the issue remains. This approach guarantees nixGL can find the exact version required by an RHEL based distro (Rocky, Fedora, RHEL, Debian), which are widely used. |
|
I don't have a testing method, no. The testing in this project needs some work in general. There's all.nix and Test.hs today, neither of which quite fits. I think it's fine to merge this with only manual testing, especially since I don't really have any suggestions on where to hang new tests for this.
Ohhh, I think I misunderstood what you meant by "consistent version across distribution channels" in the README.md change. I thought you meant that it was the same number but the files were meaningfully different. If they're always different versions, I wonder if they could be merged into one auto detection lists in the future? With the formatting changes stripped out, I think this would be good to merge. I'd like to see either an automated test or another report from a user about this working for them, including the update script. |
On certain distros, where the NVIDIA driver is typically installed via the NVIDIA driver repositories, trying to install the driver from the download site will commonly fail with a 404 error, like described in #170 and #124 and #67.
There have been approaches to solve this, e.g. in #184, but this will not work reliably. The key problem is that NVIDIA is not providing consistent versions of their drivers on different distribution channels. For Rocky Linux, and all other RHEL distros, the latest version on the download site differs. e.g. at the time of writing, the latest on downloads
.runis 570.124.04, while the.rpmversion in the RHEL repository is 570.124.06:Driver download: https://download.nvidia.com/XFree86/Linux-x86_64/570.124.04/
RHEL repository: https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/nvidia-driver-libs-570.124.06-1.el9.x86_64.rpm
Using a different version, even if it's a small difference in the minor version, does not work in my experience. One could always manually install a driver, but in the case of RHEL it's way better to get the NVIDIA driver installed and updated via the default package manager and update cycle.
To solve this issue, I've created a fork with an additional derivation in nixGL, that gets the driver from the RHEL repository from the
.rpm. This works well for me, and should solve the issue for RHEL users. It it would be nice if it could be merged.To get the driver from the RHEL
.rpminstead of the driver download site, simply setdriverSourcetorhel. Also ensure thatenable32bitsis changed from its default tofalse, as at this point I did not include the 32bit version of the driver. Here's an example from my.nixusinghome-manager:If you face the driver problem and you are on any RHEL distro like Rocky, Fedora, etc., you can use the nixGL overlay from my fork until this is merged:
Something similar can probably be done for Debian and other distros, using the official NVIDIA driver for a specific distro as the source for nixGL.
Fixes #170 #124 #67