After suspend scaling_max_freq set to lowest. and some perfomance tweak
-
I set CPU scaling_governor to schedutil for powersave.
echo schedutil > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy3/scaling_governor
I found after laptop wake up from suspend.
/sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq
will be set to lowest 408000. That makes laptop quite laggy.
Maybe its a bug in Kernel?
I made a workaroud.
sudo mkdir /usr/lib/systemd/system-sleep/ sudo vim /usr/lib/systemd/system-sleep/cpu_freq
File: /usr/lib/systemd/system-sleep/cpu_freq
#!/bin/sh case $1/$2 in pre/*) echo "Going to $2..." # Place your pre suspend commands here, or `exit 0` if no pre suspend action required echo schedutil > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy3/scaling_governor echo 1800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq echo 2352000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq echo 2256000 > /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy3/scaling_min_freq echo simple_ondemand > /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/governor ;; post/*) echo "Waking up from $2..." # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required sleep 2 echo schedutil > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor echo schedutil > /sys/devices/system/cpu/cpufreq/policy3/scaling_governor echo 1800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq echo 2352000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq echo 2256000 > /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpufreq/policy3/scaling_min_freq echo simple_ondemand > /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/governor ;; esac
make it work
sudo chmod 755 /usr/lib/systemd/system-sleep/cpu_freq
-
Thank you for sharing.
-
I just found something useful about improve cool pi laptop perfomance and efficiency.
I tried and it works quite well.
Just compile kernel with CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y and use a conf file.
-
Here is more about schedutil
https://github.com/ThomasKaiser/Knowledge/blob/master/articles/schedutil-and-EAS.md
Seems ondemand is better choice.
-
@plumlis
This method has been tried before, and as you said, the actual effect can be seen in the Ubuntu system. However, if it is a system with kylin and uos, it must always run in performance mode to run smoothly. We will re evaluate whether to update to the existing kernel configuration. Thank you for your suggestion.