Commit Graph

74 Commits

Author SHA1 Message Date
Adnan Hodzic 69ef913c1b Change override.pickle location + add to snap 2023-02-02 17:18:58 +01:00
shadeyg56 2bfe71e8d8
[Feature] Force use of powersave or performance governors (#476)
* add the --force option and governor overrides

* update README to reflect --force option

* add --state option

* update README with --state option

* update README to expand on --force functionality

* change name of remove() func and remove pickle upon --remove

* check if daemon is not running when using --force and change --state

* add links to README

* change force section wording

* add quotes to --force help

* add override warning to stats file

* hide --get-state flag

* consolidate error messages and add daemon checks to --get-state and --stats

* add quotes
2023-02-01 16:39:14 +01:00
Gimbles 122dd0f96c
Use usr/local/bin instead of usr/bin for Silverblue and other immutable OSs (#460)
* usr/local/bin instead of usr/bin/

* fix shebang
2022-11-24 17:44:57 +01:00
Adnan Hodzic d77c1de6d6 Removed battery percentage 2022-11-18 06:29:15 +01:00
Adnan Hodzic d26ec98837 Add missing display system load average info 2022-11-13 19:17:35 +01:00
Ben d60642720a
Fixed bug where turbo boost will always be on in performance mode (#455)
* Fixed bug where Turbo Boost is always on in performance mode

* Removed debugging prints

* Added new line at EOF
2022-11-12 06:23:45 +01:00
Adnan Hodzic 2ae8ed4be2 Round battery cha/discharging percentage display 2022-11-12 06:20:52 +01:00
Adnan Hodzic 6e74a95f10 Add functionality to display system load average 2022-11-12 06:02:26 +01:00
Tobias ff72e1e0f3
fixed battery_percentage (#442) 2022-10-11 06:29:05 +02:00
BowDown097 43b33be51c
battery_percentage fix (#437) 2022-09-25 18:50:53 +02:00
Tobias 98569ad71a
SunkenHero Code optimization & addition of battery percentage (#432)
* Added fan speed display

* optimizations in temperatures

* Simplified charging function and added percentage display

* change print battery status

* Fixed charging not returning boolean

* battery_percentage returns now rounded value insead of 10 decimals

* changed charging function back

* changed charging back and some display changes

* little fix at display battery percentage

* battery percentage not showing %
2022-09-10 14:02:17 +02:00
hingen 620433d78d
Replaced obsolete "egrep" calls with "grep -E" (#435) 2022-09-10 08:37:19 +02:00
SunkenHero 1a35c3ca01
Added fan speed display (#431) 2022-09-08 07:46:34 +02:00
Martin Andersson 7573df7bb2
Omit the --all flag from calling nproc to get actual number of cores instead of threads. (#423) 2022-08-22 16:42:09 +02:00
Martin Andersson dad1c819fd
Don't overwrite /usr/bin/cpufreqctl.auto-cpufreq excessively. (#420)
Looks like the behavior of constantly overwriting it was not intended,
but introduced inadvertently in a91d4ba36e
2022-08-15 12:32:54 +02:00
Martin Andersson f67e909b59
Catch exception in call to psutil .cmdline() (#413)
There's a race condition where processes might disappear while filtering. The uncaught exception causes a crash.
2022-08-10 14:23:58 +02:00
Ishaan Bhimwal 29d5d87ded
fix multiple typos as reported by typos (#410) 2022-07-31 08:14:27 +02:00
tacheometry 812e97d8d9
Fix daemon typo (#409) 2022-07-28 09:35:52 +02:00
Adnan Hodzic d9295f4cf2 Revamped how log file is emptied 2022-06-05 20:10:33 +02:00
Adnan Hodzic c8f9095067 Real time auto-cpufreq refresh 2022-06-05 17:44:33 +02:00
Jeroenvb fbd4863213
Fixed where average all core temp is displayed with too many decimals. (#392)
* Fixed where average all core temp is displayed with too many decimals.

* Made both total system load, and avg temp 2 decimals in cleaner .format form.
2022-05-23 05:37:49 +02:00
Adnan Hodzic a15e594fba Add check for performance governor in available governors 2022-02-19 15:22:43 +01:00
Adnan Hodzic 8ff85e9371 Revamped performance mode install on non Snap env 2022-02-19 14:49:34 +01:00
Adnan Hodzic 8fb5469ace v1.9.1 release & Github issue template update 2022-01-09 14:03:35 +01:00
Ismael Arias 5e503f89c2
Fixed the --version command when installed from source (#347)
* Fixed the --version command when installed from source (#344)

The command only worked when running it inside the git repository.

Now, it works from everywhere, and the version is constructed using
the latest git tag and the SHA of the latest commit, which may help
with further debugging in future issues.

* Improving version output.

Renaming version_config to setuptools_git_versioning to be compliant with new plugin version.

Formatted the version when a git hash is present for a better readability.

The version is set in the setup.py file. This will be used for the tar.gz releases.
Snap version is also retrieved from setup.py too, so we avoid code repetition.
2022-01-09 13:49:41 +01:00
Adnan Hodzic 3a4beb34c5 Revert "Fixed the --version command when installed from source (#344)"
This reverts commit d2dba2fc31.
2022-01-08 18:58:12 +01:00
Adnan Hodzic 000ccf04fb Remove workaround to get distro package version 2022-01-08 15:55:56 +01:00
Adnan Hodzic 5b1f2a227f Snap v1.9.1 and minor snap output improvement 2022-01-08 15:43:43 +01:00
Ismael Arias d2dba2fc31 Fixed the --version command when installed from source (#344)
The command only worked when running it inside the git repository.

Now, it works from everywhere, and the version is constructed using
the latest git tag and the SHA of the latest commit, which may help
with further debugging in future issues.
2022-01-08 15:23:58 +01:00
Ákos Várady fc2d8e3645
Ability to reset scaling frequencies to default (#338)
* Ability to reset scaling frequencies to default

If one of the scaling frequencies option is missing, either because
it's commented out or auto-cpufreq.conf is not being used, the default
frequency limits will be set.
TODO: perform setting only once per battery state change

* Ability to reset scaling frequencies to default 2.

Additional changes to optimize auto-cpufreq speed, by conditionally
performing frequency scaling settings.
2021-12-30 13:29:14 +01:00
Ákos Várady 1aa1983ccf
Add min/max allowed frequencies option (#309) (#324)
* 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>
2021-12-26 11:01:32 +01:00
bobslept 64e33827b8
Improve charging detection (#332) 2021-12-24 20:21:40 +01:00
tyleraharrison 78ddf145e7
Started the solution to Snap and PopOS not working (#329)
* 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
2021-12-23 19:22:46 +01:00
Ákos Várady 3121e2f454
Reformatted codebase (#325)
All python scripts are now reformatted with 'black' using line length
of 100.

Co-authored-by: Akos Varady <akos.varady@ericsson.com>
2021-12-22 08:28:08 +01:00
bobslept 6e3f45182b
Implement python virtual environment (#326)
* 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>
2021-12-21 20:14:02 +01:00
bobslept dd5d871769
Fix #321, skip hid devices with battery (#322) 2021-12-21 18:25:46 +01:00
tyleraharrison 7236e674f4
Fix for PopOS os_release problem (#311)
* 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>
2021-12-19 09:20:09 +01:00
bobslept 3994d4a7af
Change the way of checking the charging state (#308) 2021-12-16 08:04:24 +01:00
bobslept c1b898906a
Add a warning when using TLP (#305)
* Add function to check if binary is present

* Rename gnome_power_stats to gnome_power_status

* Added warning when using TLP
2021-12-11 11:59:41 +01:00
Adnan Hodzic db68390ec3 Automatically disable GNOME power profiles on install 2021-12-04 21:12:20 +01:00
Adnan Hodzic fc5ac16fd6 Final auto-cpufreq & power_helper improvements 2021-12-04 18:32:50 +01:00
Adnan Hodzic 0aef161528 Rename gnome_power to power_helper & reference update 2021-12-04 15:40:03 +01:00
Adnan Hodzic 1d4f88d78d Revamp of gnome_detect & disable default enable functionality 2021-12-04 13:25:41 +01:00
Adnan Hodzic d6bfdfc680 Revamp of bluetooth & gnome power profile control on Snap 2021-12-02 21:34:52 +01:00
Adnan Hodzic 167b761888 Complete power-profiles operations helper for non Snap install 2021-11-28 14:49:14 +01:00
Adnan Hodzic 677646abbd Add mechanism for power-profiles-daemon detection 2021-11-28 14:09:33 +01:00
Adnan Hodzic 1aed0f7477 Add option to un/mask power-profiles-daemon 2021-11-28 07:46:11 +01:00
Adnan Hodzic ec4556c835 Automatically enable/disable GNOME power savings profiles 2021-11-28 07:46:11 +01:00
Jason Honea 01b7c0fe2e
Correcting charge status in multi-battery setup (#294) 2021-11-28 06:33:40 +01:00
AmitGolden 897664aa3d
Fix instances where charging is not recognized (#281) (#285)
* 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
2021-11-19 08:08:32 +01:00