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

Disable hardware.nvidia.powerManagement.enable #850

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

LostAttractor
Copy link
Member

@LostAttractor LostAttractor commented Jan 29, 2024

Description of changes

I have encountered a strange problem a long time ago.
If I put my laptop to sleep and wake it up again, it will go back to sleep a few seconds after waking up. If I wake it up again immediately, everything will be normal.
I always thought it was some bios bug or hardware issues, so I had no idea what to do.

Recently, I wanted to try the open source nvidia driver, so I read the nixos module for nvidia.
And I found this.
Its specific documentation is here.

NVIDIA said this interface is still considered experimental and not used by default.
And after turning it off, the problem disappeared.

I can't confirm whether it's a problem with NixOS's implementation (it seems unlikely) or a problem with NVIDIA's implementation.
Or is there something wrong with the implementation of bios/vbios?

So I thought maybe it would be a good idea to turn it off, because of RTD3, sleeping while dGPU is on is not really common.

Also, I enabled dynamicBoost, It just works.

Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input

@Mic92
Copy link
Member

Mic92 commented Feb 1, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Feb 1, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 83ce590

@mergify mergify bot merged commit 83ce590 into NixOS:master Feb 1, 2024
3 checks passed
ajitid added a commit to ajitid/dotfiles that referenced this pull request Feb 4, 2024
ajitid added a commit to ajitid/dotfiles that referenced this pull request Feb 4, 2024
https://github<dot>com/NixOS/nixos-hardware/pull/850
has disabled powerManagement and enabled dynamicBoost and I'll let them
choose the defaults for me (as they'd ensure the defaults are updated
to right values in the future).
@xinyangli
Copy link

I have a 2020 Asus GA401, which is equipped with an NVIDIA 2060 Max-Q GPU. According to the documentation available at NVIDIA's website, Dynamic Boost only works on Ampere or newer GPUs. Disabling Dynamic Boost resolved my issue.

nvidia-powerd failed to start on Turing GPU × nvidia-powerd.service - nvidia-powerd service Loaded: loaded (/etc/systemd/system/nvidia-powerd.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sat 2024-03-02 18:29:13 CST; 250ms ago Process: 20823 ExecStart=/nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd (code=exited, status=1/FAILURE) Main PID: 20823 (code=exited, status=1/FAILURE) IP: 0B in, 0B out CPU: 10ms

Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: nvidia-powerd version:1.0(build 1)
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: SBIOS support not found for NVPCF GET_SUPPORTED function
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: No matching GPU found
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: Failed to initialize Dynamic Boost
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: Failed to detach GPU id 256
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: Failed to initialize Dynamic Boost
Mar 02 18:29:13 calcite /nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd[20823]: Failed to detach GPU id 256
Mar 02 18:29:13 calcite systemd[1]: nvidia-powerd.service: Main process exited, code=exited, status=1/FAILURE
Mar 02 18:29:13 calcite systemd[1]: nvidia-powerd.service: Failed with result 'exit-code'.
Mar 02 18:29:13 calcite systemd[1]: Failed to start nvidia-powerd service.
warning: error(s) occurred while switching to the new configuration

@LostAttractor
Copy link
Member Author

LostAttractor commented Apr 3, 2024

I have a 2020 Asus GA401, which is equipped with an NVIDIA 2060 Max-Q GPU. According to the documentation available at NVIDIA's website, Dynamic Boost only works on Ampere or newer GPUs. Disabling Dynamic Boost resolved my issue.
nvidia-powerd failed to start on Turing GPU
× nvidia-powerd.service - nvidia-powerd service Loaded: loaded (/etc/systemd/system/nvidia-powerd.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sat 2024-03-02 18:29:13 CST; 250ms ago Process: 20823 ExecStart=/nix/store/jvd8kqg786b06vp8rsmv8fhaa24d6y0a-nvidia-x11-550.54.14-6.6.18-bin/bin/nvidia-powerd (code=exited, status=1/FAILURE) Main PID: 20823 (code=exited, status=1/FAILURE) IP: 0B in, 0B out CPU: 10ms

So maybe we need to separate these two different "ga401"?

@xinyangli
Copy link

So maybe we need to separate these two different "ga401"?

The only difference between these two models is in the generations of their GPU and CPU, so I'm not sure if we should separate these into different configuration.

There is a pull request (#901 by @deirn) trying to solve this. Perhaps make dynamicBoost default to false is a better choice, since it's currently only enabled in GA401. Maybe we can come up with a more general approach to enable it for every nvidia GPU newer than Ampere?

@deirn
Copy link
Contributor

deirn commented Apr 3, 2024

I think only the 2020 edition has Turing GPUs, 2021 and up are all Ampere. Enabling it by default makes sense IMO.

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

Successfully merging this pull request may close these issues.

4 participants