NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.23k stars 13.5k forks source link

Nvidia disable Open GPU doesn't seem to work on latest Nvidia package (555.58) #323886

Closed StayBlue closed 1 week ago

StayBlue commented 2 months ago

Describe the bug

When using the production driver instead of latest, setting open = false; in hardware.nvidia in my nixOS configuration. I use this command to check if GSP is being used or not.

[user@system:~]$ nvidia-smi -q | grep "GSP"

On latest, it prints out the driver version, and on production, it prints out N/A. This likely has to do with this change in the 555 series of drivers (source):

The GSP firmware is now used by default on all GPUs which support it. It can be disabled by setting the kernel module parameter `NVreg_EnableGpuFirmware=0`. 

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set package in hardware.nvidia to latest.
  2. Set open = false; in hardware.nvidia.
  3. Build your nixOS configuration.
  4. Check nvidia-smi -q | grep "GSP" and see that it says N/A.

Expected behavior

When setting open = false;, it should disable the GSP firmware.

Screenshots

N/A

Additional context

N/A

Notify maintainers

@abbradar @aidalgol @NickCao @Kiskae

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.7, NixOS, 24.11 (Vicuna), 24.11.20240701.8787882`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.4`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/icy87d2njy81v4bwm1r9a0xbksi56c5q-source`

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

aidalgol commented 2 months ago

Sorry, I am not a maintainer of the Nvidia drivers. I only made some very minor changes to the Nvidia NixOS module that have since been reverted.

Kiskae commented 2 months ago

When setting open = false;, it should disable the GSP firmware.

This definitely is wrong, if using the open driver the firmware is required, but in theory using the GSP with the proprietary driver will free up resources that the CPU/driver would normally handle.

What I can see happening is adding an option to enable/disable the gsp firmware, with additional defaults/validation for the open driver.

StayBlue commented 2 months ago

When setting open = false;, it should disable the GSP firmware.

This definitely is wrong, if using the open driver the firmware is required, but in theory using the GSP with the proprietary driver will free up resources that the CPU/driver would normally handle.

What I can see happening is adding an option to enable/disable the gsp firmware, with additional defaults/validation for the open driver.

I only considered this a bug because the open = false; option did what I expected it to do on the 550 series. Setting the kernel parameter as described in the changelog disables the GSP firmware. I can close this issue if this is expected behavior.