-
-
Notifications
You must be signed in to change notification settings - Fork 127
Add some driver version-selection logic #184
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
|
@ulucs I ended up finding another source for drivers, not sure if that solves the instigating problem, see nixGL/known_drivers/mk-nvidia-drivers.py Line 24 in 3ee94e1
|
|
I think many people are struggling with their NVIDIA driver minor version not being found on the download site, this seems to fix it for me. Could this be merged into main, as it seems to be a good fix? |
|
Well, even the links on NVIDIA's developer site seems to be broken now, just tested with the latest driver. So maybe this still no quite fixes it, unless NVIDIA is willing and able to provide working links for their drivers with some stability and consistency. |
dyfrgi
left a comment
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.
Looks good to me. Is this complex enough to deserve a test?
nvidiaVersions.nix
Outdated
| ]; | ||
| # We match for the leading [1-9] because our nixpkgs dependency doesn't yet have toIntBase10 | ||
| # so version numbers like 06 are interpreted as octals and raise errors | ||
| splitToNums = a: builtins.map lib.toInt (lib.flatten (builtins.filter builtins.isList (builtins.split "([1-9][0-9]+)" a))); |
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.
Do these version numbers work with builtins.compareVersions?
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.
yes, apparently they do; I switched to the builtin implementation
Fixes #170, which stemmed from Nvidia not hosting every single minor driver version.
This PR adds a somewhat smart driver version selection logic (first one released after the device's driver) to keep the nix and device drivers as close as possible while trying to download an existing one.
Currently the list is hard-coded, collected with the following script:
copy($$('a').map(e=>e.innerText).filter(e=>e.match(/[0-9]/)).map(e=>e.substring(0, e.length-1)).map(s=>`"${s}"`).join("\n"))from https://download.nvidia.com/XFree86/Linux-x86_64If/when #131 gets merged, the driver selection logic can be modified to select from existing drivers