Commit Graph

477 Commits

Author SHA1 Message Date
Abhishek Girish 34ebd04df0
Fix issue where epp cannot be set in `powersave` governor (#738)
* Fix issue where epp cannot be set in `powersave` governor

* Fix issue where epp cannot be set in `powersave` governor #2
2024-07-15 19:35:47 +02:00
dependabot[bot] 432883acee
Bump zipp from 3.17.0 to 3.19.1 (#735)
Bumps [zipp](https://github.com/jaraco/zipp) from 3.17.0 to 3.19.1.
- [Release notes](https://github.com/jaraco/zipp/releases)
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
- [Commits](https://github.com/jaraco/zipp/compare/v3.17.0...v3.19.1)

---
updated-dependencies:
- dependency-name: zipp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 12:15:23 +02:00
dependabot[bot] f300d31e0f
Bump certifi from 2023.7.22 to 2024.7.4 (#732)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.7.22 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.07.22...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-06 09:41:36 +02:00
Abhishek Girish d09063f116
Use `performance` EPP in AMD CPUs when using `performance` governor (#725) 2024-06-23 16:23:44 +02:00
Adnan Hodzic 2fdb703b96
Update README.md
Add Github sponsor message as part of Donate part.
2024-06-18 14:04:36 +02:00
dependabot[bot] f1c812cf56
Bump urllib3 from 2.0.7 to 2.2.2 (#723)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.7 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.7...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 08:54:05 +02:00
Angel a7df94d832
Fix #715, #713, #634 issues (#716)
* Remove | in type

* Repare battery read problem

* Compatible with many arguments
2024-06-07 18:47:01 +02:00
shadeyg56 1e44c8031c Nix: fix module 2024-06-04 08:11:33 -05:00
Isabel 7313ec9b8c
nix: add overlay; use best practices (#718)
* feat(nix): add overlay

* refactor(nix): use best practices

* chore: update flake inputs

* refactor(nix): remove unused replace
2024-06-03 16:56:10 -05:00
dementive 3f6d7a3e77
Refactor charging function (#702)
* Removed the `else` from the top level of the charging() function, the logic is the same but slightly easier to read now.

* Use os.path.exists() in the charging() function before opening the file instead of FileNotFoundError exceptions, makes the function a lot easier to read.

* Close the power_supply_type_path after reading the supply_type as it is not used later.

* Remove `else: continue` from the end of the charging() function for loop, this didn't actually do anything.

I tested the charging() function on my laptop plugged in and plugged out and it is still working as expected with these changes.
2024-05-25 17:09:54 +02:00
shadeyg56 487c344da3
Nix: fix duplicated package (#701) 2024-05-25 17:02:57 +02:00
shadeyg56 a5ffa5730b Nix: add 'getent' package
Fixes #704
2024-05-21 22:49:41 -05:00
Svenum e878dd51fe
fix build (#708) 2024-05-21 18:43:05 -05:00
shadeyg56 420648f5f1
Fix runit daemon deployment
Fixes #706
2024-05-21 11:01:25 -05:00
dependabot[bot] 2b09bf7543
Bump requests from 2.31.0 to 2.32.0 #705
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 17:13:07 +02:00
shadeyg56 1f911b534c batteries: use actual battery name instead of index 2024-05-14 17:46:51 -05:00
Angel cc6d98d8b1
Minor refactor: code clean-up & make it more readable (#695)
* Clean code

* Back

* Clean code

* Back

* Clean code

* Change arch based detection
2024-05-12 16:16:40 +02:00
yezarniko a79ec81709
critical name error in auto-cpufreq --stats (#696) 2024-05-10 13:19:57 -05:00
parmjotsinghrobot 14e1d2785d
Change username for contributor (#694)
I forgot to update it here.
2024-05-10 08:05:40 +02:00
Angel eb0ba8aa7e
Improve compatible for Arch based distributions (#691)
* Add dinit

* Add dinit

* Change arch based informations

* More compatible for Arch based distributions

* More compatible for Arch based distributions

* Clean code

* Clean code
2024-05-09 23:34:07 +02:00
Julia b8f864e87e
Use Repology badge for automatic AUR version updating (#692)
https://repology.org/project/auto-cpufreq/badges
2024-05-09 21:54:50 +02:00
Angel 281a7adc34
Add dinit init system (#690)
* Add dinit support
2024-05-09 18:26:50 +02:00
Adnan Hodzic 78c3f71438 v2.3.0 release 2024-05-09 10:07:52 +02:00
PurpleWazard 95ba1f42bd
Add warnings for charge thresholds (#679)
* add warning messages to thinkpad

* added warnings to laptop_acpi

* added warnings to ideapad_laptop

* formatted the battery output and added stats to --debug and --status

* formated --stats better with battery info

* removed blank lines in battery info

* fixed typo: --stats battery info
2024-05-09 09:10:15 +02:00
Anshu Gahire f1c1dc6b10
Fix spam error message when setting energy_performance_preference (#680)
* Fix spam error message when setting energy_performance_preference

The 'intel_pstate' driver does not allow the EPP to be set to anything
but 'performance' when the scaling governor is set to 'performance',
previously auto-cpufreq when the scaling-governor was set to
'performance' tried to set the EPP to 'balance-performance'
which caused a spam of write error messages in journalctl in system
with 'intel_pstate' drivers.
This is an intended behavior, since according to the [kernel documentation](https://docs.kernel.org/admin-guide/pm/intel_pstate.html#hwp-performance)
when HWP is enabled[(which is enabled by default during boot with supported processors)](https://docs.kernel.org/admin-guide/pm/intel_pstate.html#active-mode-with-hwp)
and scaling governor is set to performance the processor’s internal
P-state selection logic is expected to focus entirely on performance.
And this will override the EPP setting and reject any value different from 0 (“performance”).
This commit just changes the 'balance-performance' EPP preference in
set_performance() to 'performance'. Which fixes the spam issue.

* Only applies the spam error message fix for intel_pstate drivers

* Comparing the content of the file

intel_pstate/staus to make sure the condition only applies when "active"

* Override custom config EPP to "performance" for intel_pstate driver
2024-05-06 13:58:38 +02:00
shadeyg56 0815e7eb96
Rework config and reload config on file change/creation/deletion (#663)
* add config.py and config_event_handler.py
also introduces the utils folder

* update config imports and variables

* add 'pyinotify' dependency

* config: check for changes using threading

* config: handle errors and new eventsx

* config: set_path even if file doesn't exist and make new ConfigParser on every update

* fix get_config call

* config: check for changes on moved file

* call notifier.start() manually to prevent hanging

* config: update comments

* battery: fix config imports

* config: fix config deletion detection

* Add load from user config in XDG_CONFIG_HOME if available (#672)

* Add load from user config from in XDG_CONFIG_HOME if available

This update introduces the flexibility to load the configuration file from
multiple locations, prioritizing user preferences and system standards.
Previously, the configuration was strictly read from a hardcoded
system path (`/etc/auto-cpufreq.conf`). Now, the application first checks if the
user has specified a configuration file path via command line arguments. If not,
it looks for a configuration file in the user's config
directory (`$XDG_CONFIG_HOME/auto-cpufreq/auto-cpufreq.conf`). If neither is
found, it defaults to the original system-wide configuration file.

This allows users to add their auto-cpufreq configuration to their dotfiles.

* If --config is set but invalid, exit with error

* Remove redundant empty string check on config file path

* Remove duplicate isfile check for config path

See also: https://github.com/AdnanHodzic/auto-cpufreq/pull/672#discussion_r1548003119

* Update configuration options in README

See also: #672

* config: move find_config_file function and fix finding home directory

* auto_cpufreq: fix hanging on --daemon, --live, and --monitor

* swap pyinotify for patched version

---------

Co-authored-by: Steven Braun <steven.braun.mz@gmail.com>
2024-04-30 08:35:53 +02:00
dependabot[bot] 8bb7478e38
Bump idna from 3.4 to 3.7 (#678)
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 12:03:23 -05:00
shadeyg56 5e17ee31b1 update psutil to patched Git version
Fixes #654
2024-04-09 23:57:05 -05:00
Donghee Na 2df634b09c
gh-667: Modify message when using amd-pstate-epp (#674)
* gh-667: Modify message when using amd-pstate-epp

* Address code review

* Address code review

* nit

* Update

* fix typo

---------

Co-authored-by: shadeyg56 <shadeyg56@gmail.com>
2024-04-09 14:28:56 -05:00
shadeyg56 215026ad43 battery: add shell=True to lsmod call
systemd needs shell=True otherwise it returns "FileNotFoundError: [Errno 2] No such file or directory: 'lsmod'"
2024-03-18 18:37:47 -05:00
PurpleWazard 971f40f0ca
Add conservation mode to lenovo laptops (#652)
* adding support for lenovo ideapad_laptop devices

* testing lenovo_laptop

* renamed functions

* fix code bugs

* updated readme with lenovo laptop conservation mode.
2024-03-11 07:09:26 +01:00
Parmjot de12f9f708
README: update maintainer list for AUR package (#662)
Added myself and liljaylj, alongside MusicalArtist12, who was already there.

Also bumped the package version listed here.
2024-03-10 11:21:35 +01:00
shadeyg56 0354775b72
README: update badge links 2024-03-03 16:18:00 -06:00
shadeyg56 ab32952737
README: update badges to correct repo 2024-03-03 16:17:15 -06:00
shadeyg56 166cd065a2
Create workflows for Linux builds and Nix flake builds (#659)
* Create build-linux.yml

* Update build-linux.yml

* build-linux: run as sudo

* Create nix-build.yaml

* Rename nix-build.yaml to build-nix.yaml

* build-nix: rename workflow to 'Nix Flake'

* README: add workflow status badges
2024-03-03 12:25:43 +01:00
monarkjain 0354ff6cc4
Updated error handling to provide specific message for rate limit exceeded condition (#657) 2024-02-25 19:40:04 -06:00
meator b4c5276feb
Fix SyntaxWarning in objects.py (#651)
\( and \) are invalid escape sequences in Python. This can generate warnings.
2024-02-23 17:06:40 -06:00
dependabot[bot] 13e9009d5c
Bump cryptography from 42.0.2 to 42.0.4 (#653)
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.2 to 42.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.2...42.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 19:39:20 +01:00
Adnan Hodzic 6ff1b89e22
Update README.md with battery thresholds config 2024-02-17 16:07:33 +01:00
dependabot[bot] ba5b5fb032
Bump cryptography from 42.0.0 to 42.0.2 (#648)
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.0 to 42.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.0...42.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 13:00:21 +01:00
Adnan Hodzic 7afd192ff9 v2.2.0 release 2024-02-14 17:47:37 +01:00
shadeyg56 9b8e873145
Update README with new battery thresholds feature (#644)
* README: add battery threshold sections

* README: link to version
2024-02-14 17:43:52 +01:00
PurpleWazard 1d7f12e846
added battery functions to --live (#646) 2024-02-14 06:20:45 +01:00
PurpleWazard 539914a545
Rebuilt battery scripts (#645)
* rebuilt thinkpad and ideapad

* updated conf example
2024-02-13 19:34:11 +01:00
PurpleWazard 005b4aa178
enable_tresholds config file improvements (Closes: #641) 2024-02-10 18:02:25 +01:00
dependabot[bot] 3e8ee20117
Bump cryptography from 41.0.6 to 42.0.0 (#638)
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.6 to 42.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.6...42.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-07 06:31:49 +01:00
PurpleWazard 1abad4da7b
Add battery charge thresholds limit (#637)
* added battery files

* finished main battery script

* added battery_script in auto_cpufreq

* fix some errors with batterys

* setup some battery stat printing

* added battery config printing to monitor and live modes

* fix some bugs now works on daemon and monitor mode

* cleaned up battery.py

* started to fix writing issue

* still debuging fixes

* bug fixed thinkpad stop threshold cant do below 65

* updated auto-cpufreq.conf-example with battery thresholds
2024-02-07 06:27:56 +01:00
PhoenixCausesOof 68dec52bce
Fix dynamic boosting being incorrectly diagnosed (#631)
* Fix dynamic boosting being incorrectly diagnosed

* Fix indentation

* Fix bool literal
2024-01-24 05:33:24 +01:00
Adnan Hodzic e71edd8c30 Add ability to build snap for both amd64 & arm64 architecture 2024-01-21 15:24:57 +01:00
Lab Rat 27ca776029
Update README: add instruction for failing buildings in case of missing .git directory (#630) 2024-01-21 15:22:46 +01:00