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/auto-cpufreq: init module #109065
nixos/auto-cpufreq: init module #109065
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to add it to nixos/modules/module-list.nix
.
ab30bf2
to
5c38cd8
Compare
5c38cd8
to
c8f31e2
Compare
I just realized that the attribute name is wrong (autocpu-freq instead of auto-cpufreq). I'm just going to have to include that in this PR. |
439271a
to
b2da704
Compare
@Technical27 does the program itself takes care of log rotation, or does it depend on the distribution to do this? |
I just did some tests and the log file doesn't seem to clear on reboot or service stop. We could add some timer/service to do |
Strange... upstream doesn't handle this or provide a recommendation. It looks like Can you please create an issue upstream asking what distributions are supposed to do? |
Since AdnanHodzic/auto-cpufreq#146 got merged, I need to update the package to 1.5.3. The log file clears itself now and the size doesn't go above 1KB. |
Exceptional work @Technical27! You really went above and beyond there. Thanks for fixing this upstream so every distro benefits now. Full bonus points awarded! |
b2da704
to
30b4f71
Compare
Alright, I rebased to master and updated the module. |
I have a dumb question. Why not log to stdout and let journald take care of the rotation/deleting old entries? |
The problem was that auto-cpufreq prints a giant amount of info like current distro, kernel, cpu state and more. The file grows about 1-2KB every 5 seconds, and it got to 126MB on my laptop. letting journald take care of the log rotation would have clogged the logs with not very critical info. With my changes to upstream, the file clears itself after every refresh so the size remains at around 1-2KB max. |
Gotcha. Thanks |
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
Reminder: Please review! This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually. |
/status needs_reviewer |
I'll give this a try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine.
/status needs_merger |
Motivation for this change
auto-cpufreq was added in #106985, this module provides a systemd service for the daemon.
Things done
add a basic module, fix the attribute name for auto-cpufreq, and include systemd service in the package.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)