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

nixos/nvidia: add Dynamic Boost support #211300

Closed
wants to merge 1 commit into from

Conversation

piousdeer
Copy link
Contributor

Description of changes

This adds a new option, hardware.nvidia.dynamicBoost.enable, according to Nvidia's docs. Also, a few descriptions are changed to fix a typo and improve consistency.

Dynamic Boost balances power between the CPU and the GPU for improved performance on supported laptops using the nvidia-powerd daemon. Tested on my RTX 3060 laptop, enabling this option results in the GPU being able to draw up to 95W instead of 80W.

Some questions:

  1. Is $bin/share the better place to put the dbus config into? Does it matter? services.dbus.packages checks both etc and share, and Nvidia's docs say etc, but I went with share because it already exists.
  2. Is it okay that enabling this enables dbus? It is required for this feature, but from a quick look, most modules that add something to services.dbus.packages don't also include services.dbus.enable = true.
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 18, 2023
@ofborg ofborg bot requested a review from jonringer January 18, 2023 00:31
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500 labels Jan 18, 2023
Comment on lines +194 to +195
mkdir -p $bin/share/dbus-1/system.d
cp nvidia-dbus.conf $bin/share/dbus-1/system.d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p $bin/share/dbus-1/system.d
cp nvidia-dbus.conf $bin/share/dbus-1/system.d
install -Dm644 nvidia-dbus.conf $bin/share/dbus-1/system.d/nvidia-dbus.conf

@cch000
Copy link
Contributor

cch000 commented Jun 24, 2023

Any updates?

@piousdeer
Copy link
Contributor Author

Frankly, I didn't have enough time and interest to seek a reviewer's attention for this PR. However, I'm still somewhat interested in using the feature, so I may rebase and try again over the next week.

@sjcobb2022
Copy link

sjcobb2022 commented Jul 16, 2023

@piousdeer dbus is enabled by systemd by default so dbus.enable is arbitrary.

Sources:
openrazer
cpupower-gui
globalprotect-vpn
the list goes on

@jian-lin
Copy link
Contributor

FYI, #244060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants