CPUFreq shenanigans on Kobo (#4114)

* Switch to ondemand CPUFreq governor on Kobo

My H2O boots with the userspace (!!) governor...
Note that the hardware appears to blissfully ignore any of this, because
the stats still show the CPU changing state on its own...
pull/4119/head
NiLuJe 6 years ago committed by GitHub
parent c1965ea8a9
commit b509e54a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit 7ab1e3b7c8aa6187432b2b54d738a78b034781b1
Subproject commit 675ec212d059c19ac5187dbcc59c6ec6cec98a02

@ -7,6 +7,10 @@ KOREADER_DIR="${0%/*}"
# we're always starting from our working directory
cd "${KOREADER_DIR}" || exit
# Switch to a sensible CPUFreq governor, even if the HW appears not to give an actual fuck about this...
ORIG_CPUFREQ_GOV="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"
echo "ondemand" >"/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
# update to new version from OTA directory
ko_update_check() {
NEWUPDATE="${KOREADER_DIR}/ota/koreader.updated.tar"
@ -132,6 +136,9 @@ while [ $RETURN_VALUE -eq 85 ]; do
RETURN_VALUE=$?
done
# Restore original CPUFreq governor...
echo "${ORIG_CPUFREQ_GOV}" >"/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
if [ "${FROM_NICKEL}" = "true" ]; then
if [ "${FROM_KFMON}" != "true" ]; then
# start kobo software because it was running before koreader

Loading…
Cancel
Save