Commit Graph

156 Commits

Author SHA1 Message Date
shadeyg56 6be1547243 Fix CPU temp sensors 2025-03-01 01:19:15 -06:00
LAITH343 081dbda79c
Enhance CLI System Monitoring with a TUI (#810)
* create a cli for better visual monitor, live and stats

- created a system info module
- created system monitor module
- fixed avg_all_core_temp not defined

* fixed snap package error and added missing implementations
2025-03-01 06:43:55 +01:00
Uyonoh 19e57bde02
Add exec permission for --install, --remove, and cpufreqctl (#762) 2024-12-01 10:08:56 +01:00
Giovanni Geraci 18a3a93f62
refactor: remove unnecessary code lines for clarity and maintainability (#789) 2024-11-04 17:27:11 +01:00
Giovanni Geraci d45a31853c
Improve tuned detection (#788) 2024-11-04 06:53:59 +01:00
Giovanni Geraci 6a13948458
Add support for Fedora 41 (TuneD) | #786 2024-11-02 17:30:51 +01:00
Vincent Johansson 3e52842022
Fixed wrong sensor being monitored (AMD) (#772)
Instead of only looking for 'CPU' temp.label, I added that it should
look for 'Tctl', as that is the sensor for average temp on my 7800X3D
cpu.
2024-09-09 17:50:01 +02:00
Anton 08d95b6bec
Add EPB (Energy Performance Bias) settings support (#771)
* Added `energy_perf_bias` support for intel_pstate driver

* Refactored epb part, added doc for energy_perf_bias settings
2024-09-09 17:46:38 +02:00
Adnan Hodzic 163a1f9399 Add reference to post install configuration 2024-09-05 07:33:06 +02:00
Adnan Hodzic 1c11ca3139 Fix auto-cpufreq --daemon not persisting across reboot 2024-08-31 21:45:56 +02:00
Adnan Hodzic 429bf7672f Fix Snap package daemon check 2024-08-24 13:56:30 +02:00
Adnan Hodzic 64af2b4ec6 Make certain dialogs clearer & fix superfluous snap message 2024-08-24 12:15:18 +02:00
Geffo029 7925c21023
Fix check_conservation_mode() function in ideapad_laptop.py (#766) 2024-08-23 14:52:29 +02:00
Adnan Hodzic e2d605085c More elaborate warning message about GNOME profiles daemon 2024-08-18 15:44:09 +02:00
PurpleWazard 484742a683
Ignoring power supplies FIX #753 (#760)
* added the abilty to ignore certain power supplies

* changed config file for ignoring power supplies

* updated exapmle config file for ignoring power supplies

* updated docs with ignoring power supplies

* Update README.md

Update image URL's

* Add support for setting "Platform Profile" (#752)

* Add support for setting "Platform Profile"

* Add reference for Platform Profile

* Fix unsafe access to PATH (#756)

* Fix unsafe access to PATH

* Fix leading separator if PATH is empty

* Unpin psutil and requests (#759)

* Remove network-online.target as a systemd-service dependency (improve boot time). Closes: #739

* minor grammer correction.

* removed wonky file

---------

Co-authored-by: Adnan Hodzic <adnan@hodzic.org>
Co-authored-by: Harsh Panchal <BOOTMGR@users.noreply.github.com>
Co-authored-by: BowDown097 <42720004+BowDown097@users.noreply.github.com>
Co-authored-by: shadeyg56 <31134255+shadeyg56@users.noreply.github.com>
2024-08-05 09:18:10 -05:00
BowDown097 a1ac308be7
Fix unsafe access to PATH (#756)
* Fix unsafe access to PATH

* Fix leading separator if PATH is empty
2024-08-04 10:20:49 +02:00
Harsh Panchal 7ac55199f2
Add support for setting "Platform Profile" (#752)
* Add support for setting "Platform Profile"

* Add reference for Platform Profile
2024-08-04 10:15:46 +02:00
shadeyg56 a14d06ce94
add shell=True to lsmod commnad
Fixes #740

Using shell=True is fine here because the shell command doesn't take in any user input
2024-07-29 15:01:00 -05:00
Angel 4ef561eccf
Show error message if threshold file doesn't exist (#742)
* Show error message if threshold file doesn't exist

* Repare stop threshold message

* Repare check_output error
2024-07-18 20:02:59 +02:00
Arvin Verain 910aef9072
Fix AVAILABLE_GOVERNORS (#744) 2024-07-18 19:56:42 +02:00
Angel 6f7e469e66
Code refactoring, more readable and easier to modify (#736)
* Add global variables

* Add global variables

* Code refactoring

* Refactoring
2024-07-16 16:37:04 +02:00
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
Abhishek Girish d09063f116
Use `performance` EPP in AMD CPUs when using `performance` governor (#725) 2024-06-23 16:23:44 +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
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 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
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
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
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
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
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
hingen d2cb5a3761
Change check_for_update to not exit process on server connection error (#629)
Co-authored-by: hingen <1627313-hingen@users.noreply.gitlab.com>
2024-01-21 13:08:31 +01:00
Murray Gervais fe29620646
Add support for configuring/overriding "Energy Performance Preference (EPP)" (#619)
* Added support for configuring/overriding energy performance preference (EPP)

* Corrected path to print available energy performance preferences in docs

* Added "EPP" wording to config examples

* Added message when EPP is not supported
2023-12-29 08:11:27 +01:00
natewu 242cb0cb58
fix typo in dialog box (#618) 2023-12-17 06:33:09 +01:00
Fredin 2e47f47b21
Add zenpower for AMD CPU temps (#590) 2023-11-03 07:40:37 +01:00
shadeyg56 34f3d23aa0
Feature: Allow GUI to detect available update and install it (#587)
* rename verify_update and give return value

* change verify_update call

* GUI: add update feature
2023-10-27 11:38:42 +02:00
shadeyg56 d3760eaf37
skip temp sensor that report as 0 2023-10-23 21:19:45 -05:00
Lab Rat 5bf295d86a
Add support for shell completion (#580)
* feat: added supported for shell completions

* docs: completions flag instructions
2023-10-14 17:46:00 +02:00
Lab Rat 37e12a4266
Support for pyproject.toml (#576)
* feat: support for pyproject.toml

* Nix: Fix package to work with pyproject.toml

---------

Co-authored-by: shadeyg56 <shadeyg56@gmail.com>
2023-10-13 08:04:49 +02:00
shadeyg56 0f14a6a252 wrapper: switch sh to bash (Void fix) 2023-10-11 17:16:51 -05:00