Skip to content

Commit

Permalink
Update README with new config options
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnanHodzic committed Feb 3, 2023
1 parent 471611d commit dadfae0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ auto-cpufreq is looking for [co-maintainers & open source developers to help sha
* [Snap store](https://github.com/AdnanHodzic/auto-cpufreq/#snap-store)
* [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-installer)
* [AUR package (Arch/Manjaro Linux)](https://github.com/AdnanHodzic/auto-cpufreq/#aur-package-archmanjaro-linux)
* [Post Installation]
* [Post Installation](https://github.com/AdnanHodzic/auto-cpufreq/blob/install_performance_rm/README.md#post-installation)
* [Configuring auto-cpufreq](https://github.com/AdnanHodzic/auto-cpufreq/#configuring-auto-cpufreq)
* [1: power_helper.py script](https://github.com/AdnanHodzic/auto-cpufreq/#1-power_helperpy-script)
* [2: auto-cpufreq config file](https://github.com/AdnanHodzic/auto-cpufreq/#2-auto-cpufreq-config-file)
Expand Down Expand Up @@ -114,32 +114,37 @@ After installation `auto-cpufreq` will be available as a binary and you can refe

## Configuring auto-cpufreq

auto-cpufreq makes all decisions automatically based on various factors like cpu usage, temperature or system load. However, it's possible to perform additional configurations in 2 ways:
auto-cpufreq makes all decisions automatically based on various factors like cpu usage, temperature or system load. However, it's possible to perform additional configurations:

### 1: power_helper.py script
### 1: power_helper.py script (Snap package install **only**)

If detected as running, auto-cpufreq will disable [GNOME Power profiles service](https://twitter.com/fooctrl/status/1467469508373884933), which would otherwise cause conflicts and cause problems.
When installing auto-cpufreq using [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-installer) if it detects [GNOME Power profiles service](https://twitter.com/fooctrl/status/1467469508373884933) is running it will automatically disable it. Otherwise this daemon will cause conflicts and various other performance issues.

By default auto-cpufreq uses `balanced` mode which works the best on various systems. However, if you're not reaching maximum frequencies your CPU is capable of with auto-cpufreq ([#361](https://github.com/AdnanHodzic/auto-cpufreq/issues/361)), you can switch to `performance` mode. Which will result in higher frequencies by default, but also results in higher energy use (battery consumption).
However, when auto-cpufreq is installed as Snap package it's running as part of a container with limited permissions to your host machine, hence it's *highly recommended* you disable GNOME Power Profiles Daemon using `power_helper.py` script.

If you installed auto-cpufreq using [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/edit/master/README.md#auto-cpufreq-installer), you can switch to `performance` mode by running:
**Please Note:**
The [`power_helper.py`](https://github.com/AdnanHodzic/auto-cpufreq/blob/master/auto_cpufreq/power_helper.py) script is located at `auto_cpufreq/power_helper.py`. In order to have access to it, you need to first clone
the repository:

`sudo auto-cpufreq --install_performance`
`git clone https://github.com/AdnanHodzic/auto-cpufreq`

Or if you installed auto-cpufreq using [Snap package](https://github.com/AdnanHodzic/auto-cpufreq/edit/master/README.md#snap-store) you can switch to `performance` mode by running:
Navigate to repo location where `power_helper.py` resides, i.e:

`sudo python3 power_helper.py --gnome_power_disable performance`
`cd auto-cpufreq/auto_cpufreq`

**Please Note:**
The `power_helper.py` script is located at `auto_cpufreq/power_helper.py`. In order to have access to it, you need to first clone
the repository:
Then disable GNOME Power Profiles Daemon by runing:

`git clone https://github.com/AdnanHodzic/auto-cpufreq`
`sudo python3 power_helper.py --gnome_power_disable`

### 2: `--force` governor override

By default auto-cpufreq uses `balanced` mode which works the best on various systems and situations.

However, you can override this behaviour by switching to `performance` or `powersave` mode manually. Performance will result in higher frequencies by default, but also results in higher energy use (battery consumption) and should be used if max performance is necessary. Otherwise `powersave` will do the opposite and extend the battery life to its maximum.

After this step, all necessary changes will still be made automatically. However, if you wish to perform additional "manual" settings this can be done by following instructions explained in next step.
See [`--force` flag](https://github.com/AdnanHodzic/auto-cpufreq/#overriding-governor) for more info.

### 2: auto-cpufreq config file
### 3: auto-cpufreq config file

You can configure seperate profiles for the battery and power supply. These profiles will let you pick which governor to use, and how and when turbo boost is enabled. The possible values for turbo boost behavior are `always`, `auto` and `never`. The default behavior is `auto`, which only kicks in during high load.

Expand Down
6 changes: 3 additions & 3 deletions auto_cpufreq/power_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def gnome_power_svc_disable():
"sudo python3 power_helper.py --gnome_power_enable\n"
)
elif snap_pkg_check == 1:
print("auto-cpufreq snap package not installed, GNOME Power Profiles Daemon should be enabled:\n"
print("auto-cpufreq snap package not installed\nGNOME Power Profiles Daemon should be enabled. run:\n\n"
"sudo python3 power_helper.py --gnome_power_enable"
)

Expand All @@ -284,8 +284,8 @@ def gnome_power_svc_disable():
if gnome_power_status == 0 and powerprofilesctl_exists:

if snap_pkg_check == 1:
print("auto-cpufreq snap package not installed.\n\nGNOME Power Profiles Daemon should be enabled:\n"
"sudo python3 power_helper.py --gnome_power_enable\n"
print("auto-cpufreq snap package not installed.\nGNOME Power Profiles Daemon should be enabled, run:\n\n"
"sudo python3 power_helper.py --gnome_power_enable"
)
else:
print("auto-cpufreq snap package installed, GNOME Power Profiles Daemon should be disabled.\n")
Expand Down

0 comments on commit dadfae0

Please sign in to comment.