DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

orange pi 5 max - unable to see CPU freq / set cpu governor

Open mrtnjcl opened this issue 11 months ago • 5 comments

Creating a bug report/issue

  • [x] I have searched the existing open and closed issues

Required Information

  • DietPi version G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=11 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng'

  • Distro version | bookworm

  • Kernel version | Linux DietPi 6.1.84-vendor-rk35xx #1 SMP Sun Jan 5 09:09:31 UTC 2025 aarch64 GNU/Linux

  • SBC model | Orange Pi 5 Max (aarch64)

  • Power supply used | 5V 20W

  • SD card used | SanDisk ultra

Steps to reproduce

(clean install) dietpi-config -> Performance -> CPU Governor shows [N/A]

Expected behaviour

I should be able to set governor / see cpu freq

Actual behaviour

dietpi-config -> Performance -> CPU Governor shows [N/A]

dmesg output: Mar 12 14:37:56 DietPi systemd[1]: Starting dietpi-preboot.service - DietPi-PreBoot... Mar 12 14:37:56 DietPi DietPi-PreBoot[609]: DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting... Mar 12 14:37:56 DietPi systemd[1]: Finished dietpi-preboot.service - DietPi-PreBoot.

dietpi-preboot is running, no extra software installed

mrtnjcl avatar Mar 12 '25 14:03 mrtnjcl

Thanks for reporting. I'll try to replicate.

MichaIng avatar Mar 12 '25 14:03 MichaIng

Hmm it works well here, that is strange:

root@DietPi:~# cpu

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     aarch64
 Temperature  |     32 °C / 89 °F : Cool runnings
 Governor     |     schedutil

                 Current Freq    Min Freq   Max Freq
 CPU0         |      1200 MHz      1008 MHz    1800 MHz
 CPU1         |      1200 MHz      1008 MHz    1800 MHz
 CPU2         |      1200 MHz      1008 MHz    1800 MHz
 CPU3         |      1200 MHz      1008 MHz    1800 MHz
 CPU4         |      1200 MHz      408 MHz    2256 MHz
 CPU5         |      1200 MHz      408 MHz    2256 MHz
 CPU6         |      408 MHz      408 MHz    2304 MHz
 CPU7         |      408 MHz      408 MHz    2304 MHz

[ INFO ] DietPi-CPU_info | The current CPU frequency may be affected by processing this script itself.

root@DietPi:~# systemctl status dietpi-preboot.service
● dietpi-preboot.service - DietPi-PreBoot
     Loaded: loaded (/etc/systemd/system/dietpi-preboot.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2025-02-10 08:12:54 CET; 1 month 1 day ago
   Main PID: 511 (code=exited, status=0/SUCCESS)
        CPU: 190ms

Feb 10 08:12:54 DietPi systemd[1]: Starting dietpi-preboot.service - DietPi-PreBoot...
Feb 10 08:12:54 DietPi DietPi-PreBoot[517]:  DietPi-CPU_set
Feb 10 08:12:54 DietPi DietPi-PreBoot[517]: ─────────────────────────────────────────────────────
Feb 10 08:12:54 DietPi DietPi-PreBoot[517]:  Mode: Applying CPU governor settings: schedutil
Feb 10 08:12:54 DietPi DietPi-PreBoot[517]: [ INFO ] DietPi-CPU_set | Setting CPU frequency limits : Max = Disabled MHz | Min = Disabled MHz
Feb 10 08:12:54 DietPi DietPi-PreBoot[517]: [  OK  ] DietPi-CPU_set | Applied CPU governor settings: schedutil
Feb 10 08:12:54 DietPi systemd[1]: Finished dietpi-preboot.service - DietPi-PreBoot.
root@DietPi:~# uname -a
Linux DietPi 6.1.84-vendor-rk35xx #1 SMP Sun Jan  5 09:09:31 UTC 2025 aarch64 GNU/Linux

Does this directory exist in your case?

ls -l /sys/devices/system/cpu/

And can you show loaded modules with lsmod, to compare with the ones I have laoded?

root@DietPi:~# lsmod
Module                  Size  Used by
btsdio                 16384  0
pwm_fan                20480  0
bcmdhd               1318912  0
goodix_ts              28672  0
rk805_pwrkey           16384  0
nvmem_rockchip_otp     20480  0
panfrost               61440  0
drm_shmem_helper       20480  1 panfrost
gpu_sched              32768  1 panfrost
rockchip_cpuinfo       16384  1 nvmem_rockchip_otp
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
fuse                  110592  1
dm_mod                106496  0
ip_tables              28672  0
ipv6                  454656  26
r8169                  77824  0
adc_keys               16384  0
pwm_bl                 16384  0

rockchip_cpuinfo might be the scheduling driver, but not sure, actually I'd expect it to be builtin.

MichaIng avatar Mar 13 '25 20:03 MichaIng

root@DietPi:~# cpu

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     aarch64
 Temperature  |     52 °C / 125 °F : Running warm, but safe
 Governor     |     N/A

systemctl status dietpi-preboot.service

dietpi-preboot.service - DietPi-PreBoot
     Loaded: loaded (/etc/systemd/system/dietpi-preboot.service; enabled; preset: enabled)
     Active: active (exited) since Sun 2025-03-16 20:05:27 CET; 14h ago
    Process: 3488 ExecStart=/boot/dietpi/preboot (code=exited, status=0/SUCCESS)
   Main PID: 3488 (code=exited, status=0/SUCCESS)
        CPU: 46ms

Mar 16 20:05:27 DietPi systemd[1]: Starting dietpi-preboot.service - DietPi-PreBoot...
Mar 16 20:05:27 DietPi DietPi-PreBoot[3494]: DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting...
Mar 16 20:05:27 DietPi systemd[1]: Finished dietpi-preboot.service - DietPi-PreBoot.

uname -a Linux DietPi 6.1.84-vendor-rk35xx #1 SMP Sun Jan 5 09:09:31 UTC 2025 aarch64 GNU/Linux

root@DietPi:~# ls -l /sys/devices/system/cpu/

total 0
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu0
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu1
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu2
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu3
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu4
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu5
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu6
drwxr-xr-x 8 root root    0 Mar 12 14:37 cpu7
drwxr-xr-x 2 root root    0 Mar 12 14:42 cpufreq
drwxr-xr-x 2 root root    0 Mar 16 10:24 cpuidle
drwxr-xr-x 2 root root    0 Mar 16 10:24 hotplug
-r--r--r-- 1 root root 4096 Mar 16 10:24 isolated
-r--r--r-- 1 root root 4096 Mar 12 14:42 kernel_max
-r--r--r-- 1 root root 4096 Mar 16 10:24 modalias
-r--r--r-- 1 root root 4096 Mar 16 10:24 offline
-r--r--r-- 1 root root 4096 Mar 12 14:42 online
-r--r--r-- 1 root root 4096 Mar 12 14:37 possible
drwxr-xr-x 2 root root    0 Mar 16 10:24 power
-r--r--r-- 1 root root 4096 Mar 12 14:42 present
drwxr-xr-x 2 root root    0 Mar 16 10:24 smt
-rw-r--r-- 1 root root 4096 Mar 12 14:37 uevent
drwxr-xr-x 2 root root    0 Mar 12 14:42 vulnerabilities

lsmod

root@DietPi:~# lsmod
Module                  Size  Used by
btsdio                 16384  0
pwm_fan                20480  0
bcmdhd               1318912  0
goodix_ts              28672  0
rk805_pwrkey           16384  0
nvmem_rockchip_otp     20480  0
panfrost               61440  0
drm_shmem_helper       20480  1 panfrost
gpu_sched              32768  1 panfrost
rockchip_cpuinfo       16384  1 nvmem_rockchip_otp
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
dm_mod                106496  0
fuse                  110592  1
ip_tables              28672  0
ipv6                  454656  26
r8169                  77824  0
adc_keys               16384  0
pwm_bl                 16384  0

rockchip_cpuinfo seems to be loaded...

mrtnjcl avatar Mar 16 '25 10:03 mrtnjcl

Weird, exactly the same kernel. Should not make a difference, but can you try to flash the bootloader image:

sudo /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc

MichaIng avatar Apr 19 '25 12:04 MichaIng

Is the issue still present with latest kernel and bootloader (flashed with above command)?

MichaIng avatar Jun 02 '25 21:06 MichaIng

Bootloader update didn't help. I ended up returning the board, it seemed to be hardware issue. With new board it worked flawlessly straight out of the box.

I found one user who reported same problem on their Radxa Rock 5B board, which shares the same chipset - i guess it's manufacturing defect.

mrtnjcl avatar Jun 06 '25 06:06 mrtnjcl

Seems so. Though strange hardware defect when the system boots and works, but only CPUFreq does not.

MichaIng avatar Jun 06 '25 16:06 MichaIng

this is the link to radxa forum, https://forum.radxa.com/t/rock5b-dmesg-pvtm/13859

my understanding is that the pvtm part of the cpu was not working properly, and as a result the CPU ran normally, but underclocked (?) B/c my board had the exact same issue with low geekbench score

mrtnjcl avatar Jun 06 '25 16:06 mrtnjcl

Here another article about this, interesting: https://www.cnx-software.com/2022/07/17/what-is-pvtm-or-why-your-rockchip-rk3588-cpu-may-not-reach-2-4-ghz/

MichaIng avatar Jun 06 '25 19:06 MichaIng