Skip to content
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

error with hardware.nvidia.open (dell xps 15 7590) #1092

Open
eg-ayoub opened this issue Aug 29, 2024 · 3 comments
Open

error with hardware.nvidia.open (dell xps 15 7590) #1092

eg-ayoub opened this issue Aug 29, 2024 · 3 comments

Comments

@eg-ayoub
Copy link
Contributor

on my xps laptop using this flake:

      # 2 - mouse : (laptop) Tiling WM + dev tools
      mouse = nixpkgs.lib.nixosSystem {
        specialArgs = { inherit inputs system; };

        modules = [
          ./hosts/mouse/configuration.nix
          nixos-hardware.nixosModules.dell-xps-15-7590-nvidia
        ];
      };

in configuration.nix I have:
hardware.nvidia.prime.offload.enable = true;

nixos rebuild fails with

$ sudo nixos-rebuild switch --flake .#mouse --option eval-cache false
warning: Git tree '/home/ayoub/repos/nix-files' is dirty
building the system configuration...
warning: Git tree '/home/ayoub/repos/nix-files' is dirty
error:
       … while calling the 'head' builtin

         at /nix/store/887hpp8a2i99n9jjwcvz6qkhhhqsvzkg-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         elsewhile evaluating the attribute 'value'

         at /nix/store/887hpp8a2i99n9jjwcvz6qkhhhqsvzkg-source/lib/modules.nix:821:9:

          820|     in warnDeprecation opt //
          821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          822|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `hardware.nvidia.open' is used but not defined.

I assumed this option is set automatically by https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix
am I wrong ?
thanks for your help in advance :)

@BCNelson
Copy link
Contributor

BCNelson commented Aug 29, 2024

It was an intentional breaking change NixOS/nixpkgs#337289 (comment) there will need to be some changes to fix it and figure out if it should be turned on for your gpu

@eg-ayoub
Copy link
Contributor Author

@BCNelson thanks!
I'll make a PR by tomorrow.
If 560 works on my machine would it be acceptable to set hardware.nvidia.open = true; for xps15-7590 ?

@BCNelson
Copy link
Contributor

I'm not sure about the specifics. But I do know that it defaulted to false before

getchoo added a commit to getchoo-contrib/nixpkgs that referenced this issue Sep 16, 2024
This requirement was introduced in
NixOS#337289 as a way to make sure users
"explicitly pick which version of the driver they want since nvidia
recommends the open one, but that is incompatible with older drivers".
This is reasonable, however the user isn't informed in any real way
aside from the upcoming release notes

This has caused a
[good](NixOS#337289 (comment))
[amount](NixOS#337289 (comment))
[of](NixOS#338196)
[confusion](NixOS/nixos-hardware#1092) amongst
users. By introducing this assertion and using a new `useOpenModules`
local variable, we can have the same behavior but display a proper error
message to hopefully clear things up until we can safely make this a
default
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

No branches or pull requests

2 participants