darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

RPi3 on aarch64-CPU freq scaling and temp sensors broken

Sun Mar 12, 2017 2:34 pm

I'm using a RPi3 booted into Arch ARM's armv8/aarch64 kernel, but am unable to query the CPU frequency or adjust it (nor can I read the CPU temp). My RPi2 running the armv7/raspberrypi kernel by contrast contains the following but the RPi3 does not:

Code: Select all

/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Using cpupower doesn't provide the functionality on the RPi3 either:

Code: Select all

# cpupower frequency-info
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  CPUs which run at the same hardware frequency: Not Available
  CPUs which need to have their frequency coordinated by software: Not Available
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: Not Available
  available cpufreq governors: Not Available
  Unable to determine current policy
  current CPU frequency: Unable to call hardware
  current CPU frequency:  Unable to call to kernel
I'm guessing it is due to a lack of support in the 4.10.1 kernel but wanted to check. Thanks.
Last edited by darksky on Sun Mar 19, 2017 11:52 am, edited 1 time in total.

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Status of CPU freq scaling on RPi3 running aarch64?

Tue Mar 14, 2017 2:25 am

I believe this is a kernel issue: oddly enough 4.4 aarch64 kernel in opensuse LEAP 42 has decent support (on demand & performance as well as temp) whereas 4.9 aarch64 kernel in tumbleweed has nothing as per your Arch 4.10 experience. Also (for opensuse aarch64) 4.4 LEAP has WiFi support whereas 4.9 tumbleweed does not (yet).
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: Status of CPU freq scaling on RPi3 running aarch64?

Tue Mar 14, 2017 5:53 am

Thanks for the reply. Glad to hear that it isn't a general problem.

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: Status of CPU freq scaling on RPi3 running aarch64?

Sat Mar 18, 2017 1:31 pm

...so is this in fact an upstream kernel bug?

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Status of CPU freq scaling on RPi3 running aarch64?

Sun Mar 19, 2017 8:21 pm

darksky wrote:...so is this in fact an upstream kernel bug?
The subtleties of what is kernel/upstream/downstream etc or Foundation/Raspbian hacked are beyond me. But it does seem odd to me as well that >=4.8 kernels, which are supposed to have better Pi3 CPU support, seem to lack some basics.
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: Status of CPU freq scaling on RPi3 running aarch64?

Mon Mar 20, 2017 5:14 pm

dukla2000 wrote:The subtleties of what is kernel/upstream/downstream etc or Foundation/Raspbian hacked are beyond me. But it does seem odd to me as well that >=4.8 kernels, which are supposed to have better Pi3 CPU support, seem to lack some basics.
Yes, but it does matter when targeting someone for a bug report...

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Mon Mar 20, 2017 5:18 pm

Using tardis for Arch ARM, I can go back to an older kernel package... which of the 4.8 kernels do you know worked? I see 4.8.0 through 4.8.14 available there for testing on my machine.

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Fri Mar 24, 2017 7:41 pm

Booting into 4.8.14 gives no sensors/scaling governor support. Same is true for 4.8.2... so the original question remains unanswered: how can one get temp and cpu scaling under aarch64?

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Sat Mar 25, 2017 6:01 pm

darksky wrote:... so the original question remains unanswered: how can one get temp and cpu scaling under aarch64?
The 4.4.49 aarch64 kernel in OpenSUSE LEAP 42.2 does things fine, available here. My top tip if installing as per their instructions here: after the xzcat | dd remove the card from your machine, reinsert and fsck both partitions. Re-burn if you get any errors (apart from dirty bit on p1).
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Sat Mar 25, 2017 6:33 pm

dukla2000 wrote:
darksky wrote:... so the original question remains unanswered: how can one get temp and cpu scaling under aarch64?
The 4.4.49 aarch64 kernel in OpenSUSE LEAP 42.2 does things fine, available here. My top tip if installing as per their instructions here: after the xzcat | dd remove the card from your machine, reinsert and fsck both partitions. Re-burn if you get any errors (apart from dirty bit on p1).
Interesting.... I grabbed openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64.raw.xz which ships with 4.9.6-1 and neither the temp sensor nor the governor are available there either:

Code: Select all

#  uname -r
4.9.6-1-default

# lscpu
Architecture:          aarch64

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
cat: /sys/devices/virtual/thermal/thermal_zone0/temp: No such file or directory
I will try the image you recommended, openSUSE-Leap42.2-ARM-JeOS-raspberrypi3.aarch64.raw.xz and report back shortly.

darksky
Posts: 37
Joined: Sun Feb 12, 2017 11:34 am

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Sat Mar 25, 2017 6:52 pm

It worked! So the question now is why doesn't it work with a current kernel?

Code: Select all

# uname -r
4.4.49-16-default

# lscpu
Architecture:          aarch64

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
42932

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1200000

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: RPi3 on aarch64-CPU freq scaling and temp sensors broken

Sat Mar 25, 2017 9:35 pm

darksky wrote:So the question now is why doesn't it work with a current kernel?
Yup, $1m! I am struggling to find the OpenSuSE bods who know - despite using SuSE on my desktop for 15+ years the Pi3/aarch64 skills are well hidden, probably embedded deep in the SLE offices somewhere. They clearly had the ability to get things working in the 4.4 kernel in LEAP 42.2 (and presumably SLE) and their aarch64/SLE announcement talks about upstream/downstream but for whatever reason their Tumbleweed releases (whether upstream or non-upstream) that I have tried with 4.9 kernel are a giant leap backwards. Not only this (scaling, temp sensors) but also can't (yet) get onboard wifi to work (but it does on LEAP 42.2 aarch64).
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B


Return to “Advanced users”