So with PowerTOP version v2.11-1-g7ef7f79 from official repo for Ubuntu 20.04 powertop will lower the max cpu freq to lowest possible setting. Sometimes it does this only for the 4 lower cores, sometimes only the 4 higher cores and sometimes all cores. Dmesg doesnt show any msgs and the only thing I can see thats changed is
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
and/or
/sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
everything can be "fixed" by simply;
sudo echo 2956800 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
sudo echo 1766400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
My assumption is its the "Frequency stats" section is the problem. Tho on occasion the problem hasnt started until I change "tunables" then make changes to wifi and bluetooth. Usually changing the bluetooth and or wifi states drops both sets of cpu core to minimum, but that could just be timing IE the cre speeds where gonna drop anyway and I just happened to be enabling/disabling wifi/bt stuff. The commands it runs for BT and wifi work fine on their own from cli with no change in cpu speed, /bin/hciconfig hci0 up &> /dev/null &
iw dev wlan0 set power_save off
iw dev wlan0 set power_save on
After powertop exits I do get the message;
modprobe cpufreq_stats failedLoaded 0 prior measurements
RAPL device for cpu 0
RAPL device for cpu 0
glob returned GLOB_ABORTED
Leaving PowerTOP
This could very well be just a powertop issue, I didnt know if anyone else had any information about this before I started to dig too deeply and reinvent the wheel.
UPDATE: Seems I waisted everyones time. Looks like the the scaling_max_frequency restore after a cpu "wiggle" in powertop was the culprit. I edited abstract_cpu.cpp and commented out the lines that "restore" scaling_max_frequency and so far so good. If anyone wants it
https://github.com/bm16ton/yoga-c630-linux-kernel/raw/master/C630/powertop_2.11-1build3_arm64.deb
Only mods made where abstract_cpu.cpp and for sum reason there was a fair amount of autoconf related issues building from the official repo source. Uninstalling autoconf-archive and replacing the pthread check at begining of configure.ac with CXXFLAGS="$CXXFLAGS -pthread" did the trick
So with PowerTOP version v2.11-1-g7ef7f79 from official repo for Ubuntu 20.04 powertop will lower the max cpu freq to lowest possible setting. Sometimes it does this only for the 4 lower cores, sometimes only the 4 higher cores and sometimes all cores. Dmesg doesnt show any msgs and the only thing I can see thats changed is /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq and/or /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq everything can be "fixed" by simply; sudo echo 2956800 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq sudo echo 1766400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
My assumption is its the "Frequency stats" section is the problem. Tho on occasion the problem hasnt started until I change "tunables" then make changes to wifi and bluetooth. Usually changing the bluetooth and or wifi states drops both sets of cpu core to minimum, but that could just be timing IE the cre speeds where gonna drop anyway and I just happened to be enabling/disabling wifi/bt stuff. The commands it runs for BT and wifi work fine on their own from cli with no change in cpu speed, /bin/hciconfig hci0 up &> /dev/null & iw dev wlan0 set power_save off iw dev wlan0 set power_save on
After powertop exits I do get the message; modprobe cpufreq_stats failedLoaded 0 prior measurements RAPL device for cpu 0 RAPL device for cpu 0 glob returned GLOB_ABORTED Leaving PowerTOP
This could very well be just a powertop issue, I didnt know if anyone else had any information about this before I started to dig too deeply and reinvent the wheel.
UPDATE: Seems I waisted everyones time. Looks like the the scaling_max_frequency restore after a cpu "wiggle" in powertop was the culprit. I edited abstract_cpu.cpp and commented out the lines that "restore" scaling_max_frequency and so far so good. If anyone wants it https://github.com/bm16ton/yoga-c630-linux-kernel/raw/master/C630/powertop_2.11-1build3_arm64.deb
Only mods made where abstract_cpu.cpp and for sum reason there was a fair amount of autoconf related issues building from the official repo source. Uninstalling autoconf-archive and replacing the pthread check at begining of configure.ac with CXXFLAGS="$CXXFLAGS -pthread" did the trick