36 Commits

Author SHA1 Message Date
Á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
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
d0df29e33e
Renamed various init scripts (#317) 2021-12-20 19:13:39 +01:00
AdwaitAdk
00eca65c82
Support for openrc (#314)
* Added support for openrc.

* Added main script from upstream.

* Added thankyou note.
2021-12-18 20:00:02 +01:00
bobslept
b999f49dba
Remove package options (#304) 2021-12-08 21:07:50 +01:00
bobslept
342e5fab86
Verify the use of supported init systems. (#303) 2021-12-08 07:50:40 +01:00
Animesh Sahu
4fee7b680b
Turning Bluetooth off/on & Void Linux improvements (#269) 2021-11-04 08:32:50 +01:00
explosion-mental
80af500858
Code refactor (improved readability) of auto-cpufreq-installer (#238) 2021-09-19 16:50:32 +02:00
explosion-mental
5ca58e7885
Artix runnit support (#237)
* artix install

* ! -> !=
2021-08-28 07:46:02 +02:00
jpnt
5a4d8f7bf3 Added Void Linux support (runit) 2021-08-20 00:01:12 +00:00
Marco Vermeulen
e87a32f6c9
Fix service unit file on Arch Linux (#190)
* Fix service unit file on arch.

* Remove duplication in installer script.

* Improve formatting of installer script bash code.
2021-03-14 19:23:06 +01:00
Marco Vermeulen
3b83706748
Fix location of auto-cpufreq in service descriptor. (#187) 2021-03-11 19:13:22 +01:00
Marco Vermeulen
02d58f9f20
Improve domain language around logging and stats (#160)
* 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.
2021-02-02 21:40:55 +01:00
Technical27
f3f652d69e
Improve logging (#148)
Now auto-cpufreq will write directly to the log file or stdout.
The file will automatically be cleared when on each refresh and on
startup.
2021-01-24 13:14:11 +01:00
Adnan Hodzic
566fd4a7bf Revamp of writing daemon service logs for snap envs (Close: #53, #82) 2020-09-02 16:33:57 +02:00
Adnan Hodzic
b2b28aadbd Fixed systemd "executable path is not absolute error" (close: #42) 2020-03-27 12:26:19 +01:00
Mert Can Demir
9a6b9cf387 Add the feature that makes EPP changeable (#45)
* Add the feature that makes EPP changeable

* Remove .vscode folder

* Fix little statement thing

* implemented mechanism to backup/restore original cpufreqctl file

Co-authored-by: Adnan Hodzic <adnan@hodzic.org>
2020-03-21 16:11:18 +01:00
Mert Can Demir
0ebdf0e09c Fix file log freezing issue (#40) 2020-02-16 13:24:14 +01:00
Adnan Hodzic
cda094fb89 code improvements for snap to work in strict confinement 2020-02-10 18:18:02 +01:00
Adnan Hodzic
29b85b8095 code refactor 2020-02-08 21:18:47 +01:00
Adnan Hodzic
71a8b92e04 daemon disabled on snap install, working install/remove 2020-02-08 14:32:58 +01:00
Adnan Hodzic
ea687deb20 start snap systemd service if DAEMON env var set to ENABLED 2020-02-05 21:03:29 +01:00
Adnan Hodzic
e3b207795b improved daemon install/remove after setup.py install 2020-01-26 10:13:16 +01:00
Adnan Hodzic
683141616f fixed daemon install/removal with setup.py 2020-01-25 17:39:17 +01:00
Adnan Hodzic
efabcab056 working daemon as part of snap (dirty) 2020-01-24 15:53:25 +01:00
John Athanaselis
d727f5ab76 Update cpufreqctl.sh (#19) 2020-01-07 20:03:20 +01:00
Adnan Hodzic
d75d8dc2b1 deploy unified (across distirbutions) systemd unit file (issue: #12) 2020-01-07 18:47:52 +01:00
aroundthfur
c1fcabb18c fix systemd unit file removal path (#13) 2020-01-05 20:52:06 +01:00
Adnan Hodzic
a6adb010e7 remove removal of daemon install marker 2020-01-05 17:40:39 +01:00
Velimir Iveljic
6d7c7a7495 Create logfile before starting the deamon
- on SELinux enabled systems, the daemon fails to start unless
  the logfile is already present, because the systemd unit file
  redirects the STDOUT to a file.
2020-01-04 19:36:20 +01:00
Adnan Hodzic
4cbc608791 major code refactor and improvements 2020-01-03 16:27:41 +01:00
Adnan Hodzic
2490de007a systemd working with proper logging functionality 2020-01-03 14:09:07 +01:00
Adnan Hodzic
aab5f17d9c code refinement (working systemd) without logs 2020-01-02 23:30:55 +01:00
Adnan Hodzic
f02ba0cc6d added daemon removal + other improvements 2020-01-02 13:06:43 +01:00
Adnan Hodzic
84e0c6cfa1 added option to deploy and run auto-cpufreq as a service (daemon) 2020-01-02 01:49:01 +01:00
Adnan Hodzic
01d3c1ee84 added cpufreqctl_deploy + added cpufreqctl script 2019-12-31 12:15:16 +01:00