zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Raspberry pi 4 CPU idle frequency at max (1500 MHz) on Ubuntu Server 20.04 LTS with scaling_governor set to "ondemand"

Sun May 17, 2020 11:20 am

Hey!

I couldn't find a post relating to my problem / observation, so I decided to finally register to the forum and post it myself. Hope it's in right place!

I recently installed 64-bit version of Ubuntu Server 20.04 LTS on my one week old Raspberry Pi 4B (4Gb) using the Raspberry Pi Imager-software. The installation and setup went smoothly, and everything seems to be working really well in general (including running ts3server with qemu-user-static). Before installation I upgraded the firmware with rpi-eeprom to the latest active version (a5e1b95f320810c69441557c5f5f0a7f2460dfb8 (release)).

However, today I started investigating the cpu frequency in both load and idle with command

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
and noticed the current frequency to be same as the set maximum frequency, which is 1500 MHz, even when cpu load was < 2 % with all cores. To be sure, I also compiled the userland for arm64, and got the same results using

Code: Select all

vcgencmd measure_clock arm
which showed the same result.

After excessive googling, I found a post relating to RP3 overclocking issues (mine is not overclocked), where they ran different tests with changed values for scaling_governor. I also tested different settings as follows:

Code: Select all

echo "powersave" |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
And the frequency goes:

Code: Select all

vcgencmd measure_clock arm
frequency(48)=600169920
as it should be with.

If I set scaling_governor back to "ondemand", the cpu frequency jumps back up to 1500 MHz...

I found a workaround for this, by setting

Code: Select all

echo "conservative" |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
which drops the idle frequency to 600 MHz, and seems to respond to cpu load changes quite well.

My question here really is, has anyone else experienced this while using 64bit Ubuntu Server 20.04 LTS on their RP4? And do you know, if there are any drawbacks when using. Of note, no matter if the idle frequency was 1500 or 600 MHz, the SoC temperature seemed to stay ~the same (which sounds quite logical as there is no real load).


Cheers and thanks in advance!

pi'rate
Posts: 1
Joined: Tue Aug 06, 2019 12:17 pm

Re: Raspberry pi 4 CPU idle frequency at max (1500 MHz) on Ubuntu Server 20.04 LTS with scaling_governor set to "ondeman

Sun May 24, 2020 2:49 pm

Hi, first of all thank you for your find, I had the same cpu problem always at 1500Mhz (rpi4 rev1.1 Ubuntu server 20.04 ) and I was looking for a way to change it, with the desk mate I had an applet to change the scalling governor, but surprisingly I didn't need it because the cpu normally behaved 600 to 1500 without any problem.
It's only with gnome that I had this problem.

Now that this problem is solved I have the problem of the definition of the screen connected in hdmi which does not want to go beyond 1824 x 984.
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1824 x 984, current 1824 x 984, maximum 1824 x 984
default connected primary 1824x984+0+0 0mm x 0mm
1824x984 0.00*

And since the config.txt doesn't have the same utility as on raspian and it's user.cfg that is used I don't know how to do for the equivalent of hdmi force hotplug or other configuration that could have helped me with this problem!
if you have an idea it's welcome, and I have a good conky.config if you're interested.

Translated with www.DeepL.com/Translator (free version)

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: Raspberry pi 4 CPU idle frequency at max (1500 MHz) on Ubuntu Server 20.04 LTS with scaling_governor set to "ondeman

Mon May 25, 2020 12:25 pm

Hey,

Glad I could be of help!

I actually switched back to Rasbian, after the official USB-boot was announced to test it out with my SSD - working like a charm by the way! Might come back to ubuntu server later, if I can't get my teamspeak working on rasbian.

Yeah, you're right - the equivalent for config.txt is the usercfg.txt in /boot folder. I had the impression that all the same variables work there, as did in original config.txt. Atleast when I added "hdmi_ignore_cec_init=1" there to prevent reboot waking up my connected TV, it worked. Try checking the documentation of original config.txt and add the corresponding line to the usercfg :) Let me know if that worked!

Cheers!

Return to “Ubuntu”