Added cpufreq notes to the knowledge base

This commit is contained in:
Michele Cereda
2022-04-17 23:49:23 +02:00
parent 2fa2779dad
commit cf88da740a
2 changed files with 43 additions and 0 deletions

26
knowledge base/cpufreq.md Normal file
View File

@@ -0,0 +1,26 @@
# Cpufreq
Default governor is _ondemand_ for older CPUs and kernels and _schedutil_ for new CPUs and kernels.
## TL;DR
```shell
# list the available governors
cpupower frequency-info --governors
# get the current active governor
cpupower frequency-info --policy
# set a new governor
sudo cpupower frequency-set --governor performance
sudo cpupower frequency-set --governor powersave
sudo cpupower frequency-set --governor schedutil
```
## Sources
- [CPU frequency scaling]
- [CPU governer settings ignore nice load]
[cpu frequency scaling]: https://wiki.archlinux.org/title/CPU_frequency_scaling
[cpu governer settings ignore nice load]: https://forum.manjaro.org/t/cpu-governer-settings-ignore-nice-load/71476/3

View File

@@ -0,0 +1,17 @@
# Set the _ondemand_ CPU governor to not rise the frequencies for niced loads
## TL:DR
```shell
sudo cpupower frequency-set --governor ondemand
echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
# set this on boot
echo "w /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load - - - - 1" | sudo tee /etc/tmpfiles.d/ondemand-ignore-nice.conf
```
## Sources
- [Laptop overheating and battery duration reduction]
[laptop overheating and battery duration reduction]: https://wiki.archlinux.org/?title=BOINC#Laptop_overheating_and_battery_duration_reduction