From cf88da740a1c0075a91b4943cf1f55163b010933 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 17 Apr 2022 23:49:23 +0200 Subject: [PATCH] Added cpufreq notes to the knowledge base --- knowledge base/cpufreq.md | 26 +++++++++++++++++++ ...not rise the frequencies for niced load.md | 17 ++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 knowledge base/cpufreq.md create mode 100644 knowledge base/set the ondemand cpu governor to not rise the frequencies for niced load.md diff --git a/knowledge base/cpufreq.md b/knowledge base/cpufreq.md new file mode 100644 index 0000000..f1ec5fa --- /dev/null +++ b/knowledge base/cpufreq.md @@ -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 diff --git a/knowledge base/set the ondemand cpu governor to not rise the frequencies for niced load.md b/knowledge base/set the ondemand cpu governor to not rise the frequencies for niced load.md new file mode 100644 index 0000000..56ed59e --- /dev/null +++ b/knowledge base/set the ondemand cpu governor to not rise the frequencies for niced load.md @@ -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