Unable to build nix due to nvidia drivers due or kernel 6.10(?)

I also saw your post on this earlier this morning, and it worked:

So, I guess “specific nvidia driver version” is the way to go until the update nvidia stable to 555.0+

How did you find this solution?

I would just maintain the driver version downstream at least until the LTS kernel catches up with your hardware, personally.

It was pretty obvious after the fourth time the latest kernel was incompatible with the current nvidia driver version on stable. I think I first started running a different nvidia version in 2022?

Using mkDriver to do this became possible towards the end of last year, I learned about it from one of the nvidia maintainers after I explained to someone here how to do this and they pointed out there’s a nicer way now.

I use xanmod not stable, zen or latest, over 6.10 its not work with error
also i see 550.78 won't compile on 6.10-rc1 due to GPL violations and removed follow_pfn() - #6 by SoftExpert - Linux - NVIDIA Developer Forums
maybe it can solve by using patch

Just update the driver to a version that supports 6.10, 550.78 is ancient by nvidia driver standards: Unable to build nix due to nvidia drivers due or kernel 6.10(?) - #18 by TLATER

Perhaps this would be my learning lesson about ‘mkDriver’: Since 560.35.03 released a few hours ago, how would one go about with inputting the following? Where can I find the following information, or find out if it’s available for NixOS?

version = 
  sha256_64bit = 
  sha256_aarch64 = 
  openSha256 =
  settingsSha256 =
  persistencedSha256 = 

reference: NVIDIA stable driver 560.35.03 released for Linux with Wayland fixes | GamingOnLinux

As @TLATER said before, you can either set these to an empty string, rebuild and it will give you the values, but you can also get this information directly from the PR: linuxPackages.nvidiaPackages.latest: 555.58.02 -> 560.35.03 by Kiskae · Pull Request #336334 · NixOS/nixpkgs · GitHub

Generally, you can get the hashes for all versions (stable, beta, …) from the nvidia-x11 package.

1 Like

Ah, you’re right… I actually didn’t understand what an “empty string” is, but I’ll try to look it up. I don’t want to bother folks any further, but I appreciate everyone’s input!

1 Like

Like this:

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
  version = "560.35.03";
  sha256_64bit = "";
  sha256_aarch64 = "";
  openSha256 = "";
  settingsSha256 = "";
  persistencedSha256 = "";
};

"" is a string of zero characters, i.e., an empty string.

You can also use lib.fakeHash, but that’s unnecessary here.

2 Likes

Any idea what values work for 560 ? I managed to use @TLATER 's config for version 555 above, but could not get 560 to work :thinking:

Nor have I: nvidia: Update to 560.35.03 by TLATER · Pull Request #360 · TLATER/dotfiles · GitHub

The build dependencies changed, AIUI, so the update is less trivial now. I still need to sit down and figure it out sometime.

Couldn’t help but notice that some hashes are different from the ones in nixpkgs (which work fine for me).

$ diff nixpkgs.txt tlater.txt
3c3
< sha256_aarch64 = "sha256-s8ZAVKvRNXpjxRYqM3E5oss5FdqW+tv1qQC2pDjfG+s=";
---
> sha256_aarch64 = "sha256-8pMskvrdQ8WyNBvkU/xPc/CtcYXCa7ekP73oGuKfH+M=";
6c6
< persistencedSha256 = "sha256-E2J2wYYyRu7Kc3MMZz/8ZIemcZg68rkzvqEwFAL3fFs=";
---
> persistencedSha256 = "sha256-VWTJg/pluRYVVBDiJ+t2uhyodRuIFfHpzCZMte1krDM=";

Could this be the problem?

Hmm, that should result in the download failing, not a build failure. I’ll have to check what’s up.

Do you disable nvidiaSettings? This commit is required to get that driver version to build on stable: nvidia-settings: add vulkan-headers dependency · NixOS/nixpkgs@0384602 · GitHub

1 Like

No, I’ve always had it enabled.

I’m using nixos-unstable, so that commit was already included in my nixpkgs by the time I updated.

1 Like