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

powertop: add module #24928

Merged
merged 1 commit into from Apr 15, 2017
Merged

powertop: add module #24928

merged 1 commit into from Apr 15, 2017

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Apr 15, 2017

Motivation for this change

cc @grahamc

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@grahamc
Copy link
Member

grahamc commented Apr 15, 2017

LGTM!, at a minimum there should be docs on the enable flag indicating it probably needs calibration via powertop --calibrate. We shouldn't do that automatically, I think, as it can make the computer appear broken for a while :)

@Mic92
Copy link
Member Author

Mic92 commented Apr 15, 2017

When looking at the man page there is no indication that calibration mode will improve effectiveness of this option:

       -c, --calibrate
              Runs powertop in calibration mode.   When  running  on  battery,
              powertop can track power consumption as well as system activity.
              When there are enough measurements, powertop can start to report
              power  estimates.   One can get more accurate estimates by using
              this option to enable a  calibration  cycle.   This  will  cycle
              through  various  display  levels  and USB device activities and
              workloads.

So my guess is, that this is only required to get more accurate measurement results from powertop.

I can take a look at the source code though.

@Mic92
Copy link
Member Author

Mic92 commented Apr 15, 2017

I checked out the source and autotune defaults are more or less static:

https://github.com/fenrus75/powertop/blob/master/src/tuning/tuning.cpp#L323

in {
###### interface

options.powerManagment.powertop.enable = mkEnableOption "Enable powertop auto tuning on startup";
Copy link
Contributor

@4z3 4z3 Apr 15, 2017

Choose a reason for hiding this comment

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

This will read "Whether to enable Enable powertop auto tuning on startup." in the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch.

@Mic92 Mic92 merged commit 43c436a into NixOS:master Apr 15, 2017
@Mic92 Mic92 deleted the powertop branch April 15, 2017 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants