* Add min/max allowed frequencies option (#309)
Setting the minimum/maximum allowed CPU frequencies is now possible
via 'scaling_min_freq' and 'scaling_max_freq' options in config
for both modes (charger and battery).
Values should be given in kHZ.
Example:
scaling_min_freq = 1800000
scaling_max_freq = 2000000
I also did autoformatting via 'black', using --line-length 100.
Code is now a bit tidier than before.
* Fixes for min/max allowed frequencies option
* Further modify min/max frequency option
* Fix temporary modification in min/max allowed frequency option
Co-authored-by: Akos Varady <akos.varady@ericsson.com>
* Started the solution to Snap and PopOS not working
Needs Snap detection on line 102/103
This code does NOT function properly unless that detection added
Added ability for the program to resume if the PopOS fix works
* Implemented changes as suggested by bobslept
* Implement python virtual environment
* added venv instead of using system env pip
* adjusted the unit file to startup the app from the venv
* created a wrapper script to call the app from the venv
* extended cleanup for venv and additional scripts
* refactored the is_running() function to find the process now that it
is called from a venv
* remove update_service_file since we changed the binary path to the venv location
* fix bug in argument handling; upgrade pip before installing python packages
* fix bug in syntax
* Renamed auto-cpufreq wrapper
* Change permissions to use --stats as user
* Changed init scripts to use wrapper
Co-authored-by: aroundthfur <velimir@foolcontrol.org>
* Fix for PopOS os_release problem
Fixes issue #276
* Added Pop!_OS detection
* Removed redundant abort code in Pop!_OS detection
* Added exit case for pressing 'N' or not pressing anything
Also fixed weird whitespace issue with backslash
* Changed to "Operation aborted by user" for 'N'
* Update auto_cpufreq/core.py
Co-authored-by: bobslept <38557801+bobslept@users.noreply.github.com>
Co-authored-by: bobslept <38557801+bobslept@users.noreply.github.com>
* check if charging in laptop with battery
* using both battery and ac adapter to check if charging
also battery status unknown is now recognized as charging
* daemon running msg was wrong (it was printing the install message). Fixed to a daemon running specific message.
* move footer after the daemon check func
* Add config file for setting preferred governor and turbo boost settings.
* Add an example config file.
* Display notice when using settings from config file when starting
* Add section about configuring to README.md
* Add --config parameter to set path for configuration file to use
```
❯ pacman -Qs auto-cpufreq
local/auto-cpufreq-git 1.6.0.r0.g0ce8311-1
Automatic CPU speed & power optimizer
```
With wildcard:
```
auto-cpufreq version:
error: package 'auto-cpufreq*' was not found
```
```
❯ pacman -Qi auto-cpufreq* | grep Version
zsh: no matches found: auto-cpufreq*
```
Without wildcard:
```
auto-cpufreq version:
Version : 1.6.0.r0.g0ce8311-1
```
```
❯ pacman -Qi auto-cpufreq | grep Version
Version : 1.6.0.r0.g0ce8311-1
```
It turns out it only works with the wildcard in my `pkgbuilds` directory where `auto-cpufreq-git` lives. Weird.
* Ignore Pycharm descriptors from VCS.
* Rename all occurances of `log` to `stats`.
* Rename log file to stats and move to /var/run
* Bring back --log switch with deprecation message.
If it detects the device is a laptop, it should default to the regular method of determining ac_state
If the device returns any other output, it should default to ac_state=true
continued work originally started in #158