-
Notifications
You must be signed in to change notification settings - Fork 5.2k
no freq scaling on archlinuxarm's kernel 5.4 #3637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(Kinda plugging my own repo here) My repo: |
Arch build their own kernels with different config options so you really should report issues there. On raspbian for me:
I'm seeing the arm bump up and down in frequency. |
Can we get a bit of guidance, here? I'm building my kernel locally and want to be able to build one that scales, properly. I did some comparison between the Raspbian and Arch kernel configs and saw this as a difference:
I re-built it with 2 changes and no longer get the dmesg error, but want to know what these flags do. |
With my kernel builds sometimes it gets stuck at 666mhz and never goes up, and I have to reboot it. I even tried setting it to performance mode manually. |
Have a look at: #3604 |
It would help to know which platforms you are building for, as the RPi defconfigs differ in their cpufreq handling, |
In my case, raspberry pi 4. |
For me, I am building for armv6l, armv7l and aarch64. All on Arch Linux. I noted the dmesg notification at boot for the armv6l and hoped it would be resolved at some point by the Arch Kernel maintainers, but it has not yet, so I am trying to figure it out. @popcornmix Do you have any idea why we get the notification and any instruction on how we can resolve it? I get that this is not 'official RPi' stuff, but it has worked in the past on Arch Arm and I just want to get it back working. It looks like Arch_Arm enables CONFIG_ARM_RASPBERRYPI_CPUFREQ whereas the official RPI kernel does not. Does this conflict with CONFIG_ARM_BCM2835_CPUFREQ? |
Sorry, this really needs to be asked at arch linux. We provide a set of device config files and device trees that work on a range of Pi's using raspbian. You can easily break things by changing them. The WARN you have from cpufreq-dt.c looks like there is a missing device tree node, and as I linked to earlier if you add CONFIG_CPUFREQ_DT config option you need to add a corresponding DT node (but I don't even know how or if Arch are modifying DT). If you just want your own self-built kernels to work, then making the CPUFREQ config options map ours is probably the easiest solution. If you want Arch kernels to work in the future you should be talking to their devs, |
@popcornmix Thanks. I spent a bit of time and rebuilt the latest? kernel (5.4.58) with the official RPi config for armv6 and it works as expected. I also took the RPI config and only changed this bit and get the error. Can you point out which of these config options break the cpu scaling for armv6? Arch uses the same config for both armv6 and armv7 and there is not a problem with cpu freq scaling (nor is there an error message at boot) on armv7.
|
I'll repeat my earlier comment:
|
I had a look at this. The DT issue you see in log seems to be a missing cpus node. linux/arch/arm/boot/dts/bcm2708.dtsi Line 5 in 423495b
avoids this. @pelwell see: linux/drivers/cpufreq/cpufreq-dt.c Line 66 in 423495b
It still doesn't work as due to limits in clocks/plls on pi4 the kernel cpufreq driver only allows a limited set of frequencies (integer divisors of the initial pll - typically twice arm_clock) which means both arm_freq_min (700) and arm_freq (say, 1000) get forced to the same 1000MH value. Reverting f44019c does seem to make CONFIG_CPUFREQ_DT work on a Pi1. There is work in progress to remove the clock/pll limit on Pi4 which should mean that revert can be done soon to the main kernel tree. |
With no config changes, restoring the cpus node doesn't seem to have any effect. Reverting f44019c and changing the config to match the other platforms like this: diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
index 8e157f06a9f4..e6dd3d96cf39 100644
--- a/arch/arm/configs/bcmrpi_defconfig
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -46,6 +46,9 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
+# CONFIG_ARM_BCM2835_CPUFREQ is not set
CONFIG_VFP=y
# CONFIG_SUSPEND is not set
CONFIG_PM=y seemed to work as well. I'll merge the DT change now, then we can patch up the config when the other issues are fixed. |
See a5c01be. |
Latest rpi-update kernel uses CONFIG_CPUFREQ_DT on Pi1. |
@popcornmix Thanks for looking into this! |
Looke like it is 'fixed. Thanks! I used the latest commit: 0be0e08 and built using the current Arch config and it builds. At boot, the error is no longer present. If I set the governor to 'ondemand' then check:
Make the Pi do something then check again:
Woo Hoo! |
@zertyz are you happy with this now? Feel free to close if you are. |
Uh oh!
There was an error while loading. Please reload this page.
Hello.
I'm here to report that the new 5.4.? kernels (ArchLinux version) don't allow the CPU & friends to scale up either on rPi 1 and rPi 2.
On rPi2 the issue is silent, but on rPi1, I get the following on dmesg, early on boot:
[ 9.512249] WARNING: CPU: 0 PID: 1 at drivers/cpufreq/cpufreq-dt.c:69 find_supply_name+0x84/0xa0
[ 9.517444] Modules linked in:
(...)
-- currently I am on 5.4.42-1-ARCH, but this also happened on 5.4.40.
and the rPi1 stays at:
[root@PinkPi ~]# /opt/vc/bin/vcgencmd measure_clock core
frequency(1)=250000000
[root@PinkPi ~]# /opt/vc/bin/vcgencmd measure_clock arm
frequency(48)=700074000
no metter what is the load -- despite my config.txt is:
NOTE: this config works fine on kernels 4.19.x on rPi1 (and a similar one also works on rPi2).
I'll attach the relevant files for rPi1.
The text was updated successfully, but these errors were encountered: