Skip to content

Conversation

@ulucs
Copy link

@ulucs ulucs commented Oct 15, 2024

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_64

If/when #131 gets merged, the driver selection logic can be modified to select from existing drivers

@cfhammill
Copy link

@ulucs I ended up finding another source for drivers, not sure if that solves the instigating problem, see

"https://developer.nvidia.com/datacenter-driver-archive", headers=headers)

@Aietes
Copy link

Aietes commented Mar 10, 2025

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?

@Aietes
Copy link

Aietes commented Mar 10, 2025

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.

Copy link

@dyfrgi dyfrgi left a 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?

];
# 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)));
Copy link

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?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

404 error with latest Nvidia drivers

4 participants