NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.1k forks source link

Build failure: nvidia-x11-550.78 #341844

Open YaroKasear opened 1 month ago

YaroKasear commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Update to latest nixos-24.05 input.
  2. Try to build open nvidia driver
  3. See it fail.

Build log

Here is a gist.

Additional context

Relevant configuration from my Flake:

hardware = {
  nvidia = {
    modesetting = enabled;
    powerManagement = {
      enable = false;
      finegrained = false;
    };
    open = true;
    nvidiaSettings = true;
    package = config.boot.kernelPackages.nvidiaPackages.latest;
  };
};

Notify maintainers

@nickcao

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

┌─( ❄️ yaro@loki at 09:11:57 )─[ 10.10.255.130 ]──────────────( flakes 
├─{ zsh took 42ms on  main [!] 
└─< 🧙 😸 > nix-shell -p nix-info --run "nix-info -m"
fetching path input 'path:/nix/store/20yis5w6g397plssim663hqxdiiah2wr-source'
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.50, NixOS, 24.05 (Uakari), 24.05.20240910.44a71ff`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/yaro/.config/nix/nix.conf:/nix/store/b5bfr46briq8wd85xzxyh17679zsx566-plasma-workspace-6.0.5.1/etc/xdg/nix/nix.conf:/nix/store/b9zfvjfn1jxb34nr5zrdj8c3sixcr1vs-kglobalacceld-6.0.5/etc/xdg/nix/nix.conf:/nix/store/8dv0b0dnik2ki850asr79j2366j4jaqy-baloo-6.2.0/etc/xdg/nix/nix.conf:/home/yaro/.config/kdedefaults/nix/nix.conf:/nix/store/b5bfr46briq8wd85xzxyh17679zsx566-plasma-workspace-6.0.5.1/etc/xdg/nix/nix.conf:/nix/store/b9zfvjfn1jxb34nr5zrdj8c3sixcr1vs-kglobalacceld-6.0.5/etc/xdg/nix/nix.conf:/nix/store/8dv0b0dnik2ki850asr79j2366j4jaqy-baloo-6.2.0/etc/xdg/nix/nix.conf:/nix/store/b5bfr46briq8wd85xzxyh17679zsx566-plasma-workspace-6.0.5.1/etc/xdg/nix/nix.conf:/nix/store/b9zfvjfn1jxb34nr5zrdj8c3sixcr1vs-kglobalacceld-6.0.5/etc/xdg/nix/nix.conf:/nix/store/8dv0b0dnik2ki850asr79j2366j4jaqy-baloo-6.2.0/etc/xdg/nix/nix.conf:/home/yaro/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/yaro/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/yaro/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/yaro/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/7g7gwwa9jq2sz0h2i2xg7hf86wzah44j-lix-2.91.0/share`
 - nixpkgs: `/nix/store/20yis5w6g397plssim663hqxdiiah2wr-source`

Add a :+1: reaction to issues you find important.

Kiskae commented 1 month ago

Same issue as https://github.com/NixOS/nixpkgs/issues/332350#issuecomment-2271777269

Essentially since the stable branches tends to have older drivers they become incompatible with the newest kernels. You can copy newer driver details from the unstable branch or downgrade the linux kernel version to fix it.

PaulGrandperrin commented 1 month ago

Maybe it means we need something like zfs.latestCompatibleLinuxPackages for nvidia. Or even some new construct that could allow specifying multiple latest compatible version and automatically use the most appropriate version.

I'm personally using both nvidia and zfs at the same time, so I would like my kernel to be the latest compatible with both.

Kiskae commented 1 month ago

Maybe it means we need something like zfs.latestCompatibleLinuxPackages for nvidia. Or even some new construct that could allow specifying multiple latest compatible version and automatically use the most appropriate version.

I'm personally using both nvidia and zfs at the same time, so I would like my kernel to be the latest compatible with both.

Honestly part of the problem is bitrot, kernel updates get backported but the drivers that support those kernels don't. And generally I don't notice that the drivers become broken on stable until someone opens an issue about it.

Nvidia is generally quite good about keeping their supported drivers compatible with the latest kernels. What we really need is a way to handle driver backports without breaking the nvidia userspace when that update reaches stable users.

UlyssesZh commented 1 week ago

For me, it builds with boot.kernelPackages = pkgs.linuxPackages_6_6;, but not with _6_11.