Skip to content

Commit 70c58fb

Browse files
authored
Documentation update/revamp (#458)
* Fixed some grammar and punctuation * Made more Grammar changes * Added Post installation section * Removed warning to not use `auto-cpufreq --install` as the issues mentioned are already resolved, and auto-cpufreq --install works as expected * Added documentation for starting and enabling the daemon using just systemd, and fixed some grammar. * Added documentation for disabling with systemd * Modified "How to run auto-cpufreq section" to include help options * Fixed some formatting issues. corrected location of power_helper.py script * Made recommended changes * Added index Fixed a link * Removed systemctl command, and added warning to use inbuilt commands * Added instruction to clone the repo
1 parent 122dd0f commit 70c58fb

File tree

1 file changed

+92
-22
lines changed

1 file changed

+92
-22
lines changed

README.md

+92-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# auto-cpufreq
22

3-
Automatic CPU speed & power optimizer for Linux based on active monitoring of laptop's battery state, CPU usage, CPU temperature and system load. Ultimately allowing you to improve battery life without making any compromises.
3+
Automatic CPU speed & power optimizer for, Linux based on active monitoring of a laptop's battery state, CPU usage, CPU temperature and system load. Ultimately allowing you to improve battery life without making any compromises.
44

55
For tl;dr folks there's a: [Youtube: auto-cpufreq - tool demo](https://www.youtube.com/watch?v=QkYRpVEEIlg)
66

@@ -10,19 +10,48 @@ For tl;dr folks there's a: [Youtube: auto-cpufreq - tool demo](https://www.youtu
1010

1111
auto-cpufreq is looking for [co-maintainers & open source developers to help shape future of the project!](https://github.com/AdnanHodzic/auto-cpufreq/discussions/312)
1212

13+
## Index
14+
15+
* [Why do I need auto-cpufreq?](https://github.com/AdnanHodzic/auto-cpufreq/#why-do-i-need-auto-cpufreq)
16+
* [Supported architectures and devices](https://github.com/AdnanHodzic/auto-cpufreq/#supported-architectures-and-devices)
17+
* [Features](https://github.com/AdnanHodzic/auto-cpufreq/#features)
18+
* [Installing auto-cpufreq](https://github.com/AdnanHodzic/auto-cpufreq/#installing-auto-cpufreq)
19+
* [Snap store](https://github.com/AdnanHodzic/auto-cpufreq/#snap-store)
20+
* [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-installer)
21+
* [AUR package (Arch/Manjaro Linux)](https://github.com/AdnanHodzic/auto-cpufreq/#aur-package-archmanjaro-linux)
22+
* [Post Installation]
23+
* [Configuring auto-cpufreq](https://github.com/AdnanHodzic/auto-cpufreq/#configuring-auto-cpufreq)
24+
* [1: power_helper.py script](https://github.com/AdnanHodzic/auto-cpufreq/#1-power_helperpy-script)
25+
* [2: auto-cpufreq config file](https://github.com/AdnanHodzic/auto-cpufreq/#2-auto-cpufreq-config-file)
26+
* [Example config file contents](https://github.com/AdnanHodzic/auto-cpufreq/#example-config-file-contents)
27+
* [How to run auto-cpufreq](https://github.com/AdnanHodzic/auto-cpufreq/#how-to-run-auto-cpufreq)
28+
* [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-modes-and-options)
29+
* [monitor](https://github.com/AdnanHodzic/auto-cpufreq/#monitor)
30+
* [live](https://github.com/AdnanHodzic/auto-cpufreq/#live)
31+
* [Install - auto-cpufreq daemon](https://github.com/AdnanHodzic/auto-cpufreq/#install---auto-cpufreq-daemon)
32+
* [Remove - auto-cpufreq daemon](https://github.com/AdnanHodzic/auto-cpufreq/#remove---auto-cpufreq-daemon)
33+
* [stats](https://github.com/AdnanHodzic/auto-cpufreq/#stats)
34+
* [Troubleshooting](https://github.com/AdnanHodzic/auto-cpufreq/#troubleshooting)
35+
* [Discussion](https://github.com/AdnanHodzic/auto-cpufreq/#discussion)
36+
* [Donate](https://github.com/AdnanHodzic/auto-cpufreq/#donate)
37+
* [Financial donation](https://github.com/AdnanHodzic/auto-cpufreq/#financial-donation)
38+
* [Paypal](https://github.com/AdnanHodzic/auto-cpufreq/#paypal)
39+
* [BitCoin](https://github.com/AdnanHodzic/auto-cpufreq/#bitcoin)
40+
* [Code contribution](https://github.com/AdnanHodzic/auto-cpufreq/#code-contribution)
41+
1342
## Why do I need auto-cpufreq?
1443

15-
One of the problems with Linux today on laptops is that CPU will run in unoptimized manner which will negatively reflect on battery life. For example, CPU will run using "performance" governor with turbo boost enabled regardless if it's plugged in to power or not.
44+
One of the problems with Linux today on laptops is that the CPU will run in an unoptimized manner which will negatively reflect on battery life. For example, the CPU will run using "performance" governor with turbo boost enabled regardless if it's plugged in to power or not.
1645

17-
Issue can be mitigated by using tools like [indicator-cpufreq](https://itsfoss.com/cpufreq-ubuntu/) or [cpufreq](https://github.com/konkor/cpufreq), but these still require manual action from your side which can be daunting and cumbersome.
46+
These issues can be mitigated by using tools like [indicator-cpufreq](https://itsfoss.com/cpufreq-ubuntu/) or [cpufreq](https://github.com/konkor/cpufreq), but these still require manual action from your side which can be daunting and cumbersome.
1847

1948
Using tools like [TLP](https://github.com/linrunner/TLP) can help in this situation with extending battery life (which is something I used to do for numerous years), but it also might come with its own set of problems, like losing turbo boost.
2049

2150
With that said, I needed a simple tool which would automatically make "cpufreq" related changes, save battery like TLP, but let Linux kernel do most of the heavy lifting. That's how auto-cpufreq was born.
2251

2352
Please note: auto-cpufreq aims to replace TLP in terms of functionality and after you install auto-cpufreq _it's recommended to remove TLP_. If both are used for same functionality, i.e: to set CPU frequencies it'll lead to unwanted results like overheating. Hence, only use [both tools in tandem](https://github.com/AdnanHodzic/auto-cpufreq/discussions/176) if you know what you're doing.
2453

25-
Tool/daemon that does not conflict with auto-cpufreq in any way and is even recommended to have running alongside is [thermald](https://wiki.debian.org/thermald).
54+
The Tool/daemon that does not conflict with auto-cpufreq in any way, and is even recommended to have running alongside, is [thermald](https://wiki.debian.org/thermald).
2655

2756
#### Supported architectures and devices
2857

@@ -48,7 +77,7 @@ Supported devices must have an Intel, AMD or ARM CPUs. This tool was developed t
4877

4978
### Snap store
5079

51-
auto-cpufreq is available on [snap store](https://snapcraft.io/auto-cpufreq), or can be installed using CLI:
80+
auto-cpufreq is available on the [snap store](https://snapcraft.io/auto-cpufreq), or can be installed using CLI:
5281

5382
```
5483
sudo snap install auto-cpufreq
@@ -57,7 +86,7 @@ sudo snap install auto-cpufreq
5786
**Please note:**
5887
* Make sure [snapd](https://snapcraft.io/docs/installing-snapd) is installed and `snap version` version is >= 2.44 for `auto-cpufreq` to fully work due to [recent snapd changes](https://github.com/snapcore/snapd/pull/8127).
5988

60-
* Fedora users will [encounter following error](https://twitter.com/killyourfm/status/1291697985236144130). Due to `cgroups v2` [being in development](https://github.com/snapcore/snapd/pull/7825). This problem can be resolved by either running `sudo snap run auto-cpufreq` after snap installation. Or using [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-installer) which doesn't have this issue.
89+
* Fedora users will [encounter following error](https://twitter.com/killyourfm/status/1291697985236144130) due to `cgroups v2` [being in development](https://github.com/snapcore/snapd/pull/7825). This problem can be resolved by either running `sudo snap run auto-cpufreq` after the snap installation or by using the [auto-cpufreq-installer](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-installer) which doesn't have this issue.
6190

6291
### auto-cpufreq-installer
6392

@@ -78,19 +107,18 @@ In case you encounter any problems with `auto-cpufreq-installer`, please [submit
78107
(For the latest commits/changes) \
79108
Please note that this git package is currently unmaintained & has issues. Until someone starts maintaining it, use the [manual script installer](https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-installer) if you intend to have the latest changes.
80109

81-
After installation `auto-cpufreq` will be available as a binary and you can refer to [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-modes-and-options).
82-
83-
**Please note:** If you want to install auto-cpufreq daemon, do not run `auto-cpufreq --install` otherwise you'll run into an issue: [#91](https://github.com/AdnanHodzic/auto-cpufreq/issues/91), [#96](https://github.com/AdnanHodzic/auto-cpufreq/issues/96).
84-
85-
Instead run `systemctl start auto-cpufreq` to start the service. Run `systemctl status auto-cpufreq` to see the status of service, and `systemctl enable auto-cpufreq` for service to persist running across reboots.
110+
## Post Installation
111+
After installation `auto-cpufreq` will be available as a binary and you can refer to [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-modes-and-options) for more information on how to run and configure `auto-cpufreq`.
86112

87113
## Configuring auto-cpufreq
88114

89-
While auto-cpufreq makes all decisions automatically based on various factors like cpu usage, temperature or system load. It's possible to perform addition configurations in 2 ways:
115+
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:
90116

91117
### 1: power_helper.py script
92118

93-
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. By default auto-cpufreq uses `balanced` mode which also 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 higher use of energy (battery consumption).
119+
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.
120+
121+
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).
94122

95123
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:
96124

@@ -100,15 +128,20 @@ Or if you installed auto-cpufreq using [Snap package](https://github.com/AdnanHo
100128

101129
`sudo python3 power_helper.py --gnome_power_disable performance`
102130

103-
Please note! In order to have access to `power_helper.py` script, first clone auto-cpufreq git repo (`git clone https://github.com/AdnanHodzic/auto-cpufreq.git`), navigate to directory where `power_helper.py` script resides by running: `cd auto-cpufreq/auto_cpufreq`
131+
**Please Note:**
132+
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
133+
the repository:
134+
135+
`git clone https://github.com/AdnanHodzic/auto-cpufreq`
136+
104137

105138
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.
106139

107140
### 2: auto-cpufreq config file
108141

109-
You can configure profiles for 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.
142+
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.
110143

111-
By default, auto-cpufreq does not use the config file! If you wish to use it, location where config needs to be placed for it to be read automatically is: `/etc/auto-cpufreq.conf`
144+
By default, auto-cpufreq does not use the config file! If you wish to use it, the location where config needs to be placed for it to be read automatically is: `/etc/auto-cpufreq.conf`
112145

113146
#### Example config file contents
114147
```
@@ -156,10 +189,39 @@ turbo = auto
156189
```
157190

158191
## How to run auto-cpufreq
192+
auto-cpufreq should be run with with one of the following options:
193+
194+
* [monitor](https://github.com/AdnanHodzic/auto-cpufreq/#monitor)
195+
- Monitor and see suggestions for CPU optimizations
196+
197+
* [live](https://github.com/AdnanHodzic/auto-cpufreq/#live)
198+
- Monitor and make (temp.) suggested CPU optimizations
199+
200+
* [install](https://github.com/AdnanHodzic/auto-cpufreq/#install---auto-cpufreq-daemon) / [remove](https://github.com/AdnanHodzic/auto-cpufreq/#remove---auto-cpufreq-daemon)
201+
- Install/remove daemon for (permanent) automatic CPU optimizations
202+
203+
* [install_performance](https://github.com/AdnanHodzic/auto-cpufreq/#1-power_helperpy-script)
204+
- Install daemon in "performance" mode.
159205

160-
auto-cpufreq can be run by simply running the `auto-cpufreq` and following on screen instructions, i.e:
206+
* [stats](https://github.com/AdnanHodzic/auto-cpufreq/#stats)
207+
- View live stats of CPU optimizations made by daemon
161208

162-
`sudo auto-cpufreq`
209+
* config TEXT
210+
- Use config file at defined path
211+
212+
* debug
213+
- Show debug info (include when submitting bugs)
214+
215+
* version
216+
- Show currently installed version
217+
218+
* [donate](https://github.com/AdnanHodzic/auto-cpufreq/#financial-donation)
219+
- To support the project
220+
221+
* help
222+
- Shows all of the above options
223+
224+
Running `auto-cpufreq --help` will print the same list of options as above. Read [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq/#auto-cpufreq-modes-and-options) for more details.
163225

164226
## auto-cpufreq modes and options
165227

@@ -177,17 +239,21 @@ Necessary changes are temporarily made to the system which are lost with system
177239

178240
### Install - auto-cpufreq daemon
179241

180-
Necessary changes are made to the system for auto-cpufreq CPU optimization to persist across reboots. Daemon is deployed and then started as a systemd service. Changes are made automatically and live stats are generated for monitoring purposes.
242+
Necessary changes are made to the system for auto-cpufreq CPU optimization to persist across reboots. The daemon is deployed and then started as a systemd service. Changes are made automatically and live stats are generated for monitoring purposes.
243+
244+
Install the daemon using this command (after installing auto-cpufreq):
181245

182246
`sudo auto-cpufreq --install`
183247

184-
After daemon is installed, `auto-cpufreq` is available as a binary and is running in the background. Its stats can be viewed by running: `auto-cpufreq --stats`
248+
This will enable the auto-cpufreq service (equivalent to `systemctl enable auto-cpufreq`) to start on boot, and start it (equivalent to `systemctl start auto-cpufreq`).
249+
250+
After the daemon is installed, `auto-cpufreq` is available as a binary and is running in the background. Its stats can be viewed by running: `auto-cpufreq --stats`
185251

186252
Since daemon is running as a systemd service, its status can be seen by running:
187253

188254
`systemctl status auto-cpufreq`
189255

190-
If install has been performed as part of snap package, daemon status can be verified by running:
256+
If the install has been performed as part of snap package, daemon status can be verified by running:
191257

192258
`systemctl status snap.auto-cpufreq.service.service`
193259

@@ -197,6 +263,10 @@ auto-cpufreq daemon and its systemd service, along with all its persistent chang
197263

198264
`sudo auto-cpufreq --remove`
199265

266+
This does the equivalent of `systemctl stop auto-cpufreq && systemctl disable auto-cpufreq`.
267+
268+
Note that the given command should be used instead of using just `systemctl`.
269+
200270
### Stats
201271

202272
If daemon has been installed, live stats of CPU/system load monitoring and optimization can be seen by running:
@@ -245,6 +315,6 @@ If auto-cpufreq helped you out and you find it useful, show your appreciation by
245315

246316
### Code contribution
247317

248-
Other ways of supporting the project consists of making a code or documentation contribution. If you have an idea for a new features or want to implement some of the existing feature requests or fix some of the [bugs & issues](https://github.com/AdnanHodzic/auto-cpufreq/issues). Please make your changes and submit a [pull request](https://github.com/AdnanHodzic/auto-cpufreq/pulls) which I'll be glad to review. If your changes are accepted you'll be credited as part of [releases page](https://github.com/AdnanHodzic/auto-cpufreq/releases).
318+
Other ways of supporting the project consists of making a code or documentation contribution. If you have an idea for a new features or want to implement some of the existing feature requests or fix some of the [bugs & issues](https://github.com/AdnanHodzic/auto-cpufreq/issues) please make your changes and submit a [pull request](https://github.com/AdnanHodzic/auto-cpufreq/pulls) which I'll be glad to review. If your changes are accepted you'll be credited as part of [releases page](https://github.com/AdnanHodzic/auto-cpufreq/releases).
249319

250320
**Please note: auto-cpufreq is looking for co-maintainers & open source developers to [help shape future of the project!](https://github.com/AdnanHodzic/auto-cpufreq/discussions/312)**

0 commit comments

Comments
 (0)