Builder for nvidia-x11-550.78-6.10.drv failed with exit code 2

You can alternatively try using a more recent nvidia driver. In this case this is the latest stable version (555.58.02):

  hardware.nvidia = {
    package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
      version = "555.58.02";
      sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
      sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
      openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
      settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
      persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
    };
  };

This way we can maybe be sure that this error is caused by a combination of linux 6.10 and nvidia 550.78

2 Likes

Up until now I had Nvidia drivers installed via services.xserver.videoDrivers = ["nvidia"];, but I will try that.

On an off topic note, how to you do the language highlights? I’m new here :melting_face:

You do want this set and that would be enough to tell the system to install it, but I don’t know if that’s enough for it to work as you might also need to turn modesetting on according to the Nvidia - NixOS Wiki :

  hardware.nvidia = {
    # Modesetting is required.
    modesetting.enable = true;
  };

Without specifying hardware.nvidia.package, the system will just the stable version from your nixpkgs (config.boot.kernelPackages.nvidiaPackages.stable). What we did above is tell it to use another version, which is not in NixOS 24.05, yet.

What do you mean by this, exactly?

Kernel Version 6.10 is currently not very stable on my system. One of my hard drives is not responding and the shutdown process is taking way too long. Although the driver 555 works with it. Unfortunately I’m going to stick to 6.9 until 6.10 matures more.

services.xserver.videoDrivers = ["nvidia"];

worked fine before, had no issues with it. It came with proprietary driver and a way to control the driver.

I think I meant the block pre formatted text with highlighting using three ` signs

1 Like

Is there a way to automatically update to the latest driver instead of manually listing the latest version?

If it works then that’s alright. If you do have issues in the future, just keep this option in mind.

Oh, well everything is mostly markdown. You can also see this guide on formatting in discourse if you’d like to know more.

You only have to manually specify the version if it’s not available for your system or if you’d like to keep the drivers pinned to a specific version. From this list, we can see that the 555.58.02 drivers aren’t available for NixOS 24.05.

Generally, stable releases are always outdated compared to the unstable branch of NixOS, that’s why we have to do this ourselves, but once this change is rolled back into NixOS 24.05, it should automatically be applied after a system update.


Now that I’m writing this, though, I’m noticing an interesting thing. For NixOS 24.05, we can see here that the latest stable version is 550.54.14, which should be the default according to the hardware.nvidia.package option definition. However, your system is trying to build 550.78, which corresponds to the production version.

Could this be the cause of the initial error, perhaps? :thinking:

Edit: Probably unrelated. I think this comment explains the problem pretty well.

With Kernel 6.9.12 being End Of Life, I’m gonna have to look into getting 6.10 to work.

My issue with that approach is that NVIDIA X Server Settings are no longer available when installed and my GPU sensors aren’t there anymore, mainly the fan sensor. I don’t want to use X11 but having having the settings app is really nice.

I managed to get 6.10 kernel working by adding this to the configuration.nix file

  hardware.nvidia = {
    open = true;
    nvidiaSettings = true;

Wayland works (yay), but the GPU sensors and nvidiaSettings aren’t present.
image

Maybe it’s because you’re using hardware.nvidia.open. There was a recent post similar to this with a potential fix that you can try.

Also, does the 6.10 kernel only work with nvidia-open? are you still on the 550.78 drivers?

There is no difference between using

hardware.nvidia.open = true;

and

services.xserver.videoDrivers = ["nvidia-open"];

Last time we tried the 555.58.02 drivers here

The problem was the same. No nvidia-settings and no GPU sensors.

I have no clue how to check the driver version actually… All I know is that on my current generation I’m using nvidia-open drivers. Problem is still same when rebuilding with

services.xserver.videoDrivers = ["nvidia"];

I mean this problem

Just curious, does this persist with linuxPackages_xanmod_latest or linuxPackages_zen kernels?

You can use nvidia-smi, which should be installed with the drivers.

I have no programs that start with “nvidia” present on my system (still on nvidia-open)

No difference that I can tell. GPU sensors still don’t return values above 0 and no nvidia-settings.

No change.

services.xserver.videoDrivers = ["nvidia"];

still return the error from the start of this thread. I do want to stay on the nvidia-open drivers though due to Wayland being functional for once

I was able to reproduce this. It’s the fault of nvidia-open. If it’s enabled, all nvidia-* commands are removed.

I suggest using:

hardware.nvidia = {
    package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
      version = "555.58.02";
      sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
      sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
      openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
      settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
      persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
    };
  };

with

services.xserver.videoDrivers = ["nvidia"];

With either zen or xanmod_latest kernels.

2 Likes

Yeah, that worked but no more Wayland support… Though Wayland on nvidia-open did create problems with some games but it’s still unfortunate.

I’m pretty sure this does support Wayland as it’s working for me on Gnome. What issues are you having, exactly? and what DE are you using?

Also, I tested now using:

services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.open = true;

And it did not remove the nvidia-* commands.

1 Like

KDE Plasma 6.0.5

Windows that I have autostarting, start. DE is not present. Resolution isn’t right.

Doesn’t help in my case. Adding hardware.nvidia.open = true; still yields aforementioned problem when running KDE in Wayland. Only time that KDE ran in Wayland was with nvidia-open driver.

With the non-open drivers, try these suggestion from this post:

hardware.nvidia.powerManagement.enable = true;
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ];

Note: Config-wise, it’s enough to just add the above and rebuild, but you might also need to do this before you reboot:

sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service

Don’t know if this can fix your problems with KDE, but it’s worth trying.