amrbekhit
Posts: 26
Joined: Wed Apr 16, 2014 11:02 am

[Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Nov 10, 2019 11:03 am

Hello all,

I've got a Raspberry Pi 4 4GB model running Ubuntu Server eoan 19.10. I'm trying to overclock the Pi to run at 2GHz, so I've modified the /boot/firmware/usrconfig.txt file to include the following lines:

Code: Select all

# Place "config.txt" changes (dtparam, dtoverlay, disable_overscan, etc.) in
# this file. Please refer to the README file for a description of the various
# configuration files on the boot partition.
total_mem=3072 # Workaround to allow USB to work - see https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1848790

# Overclock
arm_freq=2000
over_voltage=5
After restarting the Pi, lscpu shows that the max frequency is indeed 2GHz, and vcgencmd measure_clock arm occasionally shows the clock speed jump up to 2GHz when the CPU is occasionally loaded. However, when I then try to run something that fully loads the CPU, the clock speed immediately stays at around 666.7MHz rather than 2GHz and the performance is significantly affected. Temperature should not be an issue - I'm using an active cooling fan and vcgencmd measure_temp measures a temperature of 50C, so throttling shouldn't be taking place here. In contrast, when running with the default settings, at full CPU load the frequency stays at the maximum of 1.5GHz.

Here's the output of vcgencmd get_config int after overclocking. The only difference between this and the same command before overclocking is that arm_freq=1500 and the line over_voltage=5 is not present.

Code: Select all

arm_64bit=1
arm_freq=2000
audio_pwm_mode=514
config_hdmi_boost=5
core_freq=500
core_freq_min=500
device_tree_address=0x3000000
disable_commandline_tags=2
disable_l2cache=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
enable_gic=1
enable_uart=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_depth=16
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=500
init_uart_clock=0x2dc6c00
lcd_frameraarm_64bit=1
arm_freq=2000
audio_pwm_mode=514
config_hdmi_boost=5
core_freq=500
core_freq_min=500
device_tree_address=0x3000000
disable_commandline_tags=2
disable_l2cache=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
enable_gic=1
enable_uart=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_depth=16
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=500
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=1024
mask_gpu_interrupt1=0x10000
max_framebuffers=2
over_voltage=5
pause_burst_frames=1
program_serial_random=1
total_mem=3072
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
te=60
mask_gpu_interrupt0=1024
mask_gpu_interrupt1=0x10000
max_framebuffers=2
over_voltage=5
pause_burst_frames=1
program_serial_random=1
total_mem=3072
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
The kernel version:

Code: Select all

Linux ubuntu 5.3.0-1008-raspi2 #9-Ubuntu SMP Fri Oct 18 13:26:35 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
Any thoughts?
Last edited by amrbekhit on Sun Nov 10, 2019 1:34 pm, edited 1 time in total.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29591
Joined: Sat Jul 30, 2011 7:41 pm

Re: Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Nov 10, 2019 12:13 pm

What are you doing to load the CPU's?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

amrbekhit
Posts: 26
Joined: Wed Apr 16, 2014 11:02 am

Re: Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Nov 10, 2019 12:16 pm

jamesh wrote:
Sun Nov 10, 2019 12:13 pm
What are you doing to load the CPU's?
Running a GNU Radio program I wrote in Python. So lots of DSP calculations and then sending the data over USB to the SDR.

amrbekhit
Posts: 26
Joined: Wed Apr 16, 2014 11:02 am

Re: Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Nov 10, 2019 1:33 pm

This turned out to be a power supply problem - although I'm using a 3.6A power supply, I was powering the SDR device (a LimeSDR-USB) from the USB ports. Once I powered the LimeSDR from a separate power supply, the overclocking now works and the CPU frequency maxes out at 2GHz as expected. I guess the 3.6A power supply was just enough to power the RPi and the LimeSDR-USB without overclocking and the extra power required for the overclock was enough to tip it over the limit and cause problems.

Matha
Posts: 19
Joined: Mon Dec 17, 2012 3:22 pm

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Nov 10, 2019 3:22 pm

@amrbekhit,

Did you apply "the patch" to use the full 4GB?

Kind regards.

amrbekhit
Posts: 26
Joined: Wed Apr 16, 2014 11:02 am

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Mon Nov 11, 2019 10:49 am

Matha wrote:
Sun Nov 10, 2019 3:22 pm
@amrbekhit,

Did you apply "the patch" to use the full 4GB?

Kind regards.
I wasn't aware that a patch was available. At the moment I've applied the usrconfig workaround that limits the RAM to 3GB (not a problem for my application).

phase
Posts: 54
Joined: Thu Jun 30, 2016 3:05 am

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Thu Nov 14, 2019 5:31 am

the only way i have found to get the cpu cores to stay stable @2000 is to add the

Code: Select all

freq-scaling monitor
applet to the panel.
however every time you reboot it.... you must set it to the 2Ghz selection...

i have tried many other edit`s and looked at many ways of doing this...but yet have not come up with an answer as yet

so there must be some way to edit something somewhere..but i have not found it as yet..

i used many different codes to find the actual cpu freq at it`s present state ..

some say it is infect @2Ghz but the command line code i used to find the freq tells another story..i believe it is stuck at ondemand in general..

this is the code used with the command line i believe to be the most accurate

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
i tried using

Code: Select all

cpufrequtils
and adding code to

Code: Select all

rc.local
but that did not work either...
new kernel did nothing for this..
i think it`s the kernel it`s self that needs to be reworked to do anything about the preset governor

spiff72
Posts: 45
Joined: Sun Mar 31, 2019 5:48 pm

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Dec 08, 2019 4:46 am

How did you get vcgencmd installed?

amrbekhit
Posts: 26
Joined: Wed Apr 16, 2014 11:02 am

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Sun Dec 08, 2019 7:04 pm

spiff72 wrote:
Sun Dec 08, 2019 4:46 am
How did you get vcgencmd installed?
You need to add the ppa:ubuntu-raspi2/ppa repo (see https://wiki.ubuntu.com/ARM/RaspberryPi#Optional_PPAs):

Code: Select all

sudo add-apt-repository ppa:ubuntu-raspi2/ppa
Ignore the 404 Not Found error that you may get - this is due to that fact that the repo doesn't officially support the latest Ubuntu server (eoan). To fix that, modify the repo source file:

Code: Select all

sudo nano /etc/apt/sources.list.d/ubuntu-raspi2-ubuntu-ppa-eoan.list
Change eoan to bionic, which is the latest officially supported version. After that run

Code: Select all

sudo apt update
sudo apt install libraspberrypi-bin
This will install vcgencmd.

spiff72
Posts: 45
Joined: Sun Mar 31, 2019 5:48 pm

Re: [Solved] Overclocked RPi4 on Ubuntu server staying at 600MHz on full load

Wed Dec 11, 2019 12:36 am

amrbekhit wrote:
Sun Dec 08, 2019 7:04 pm
spiff72 wrote:
Sun Dec 08, 2019 4:46 am
How did you get vcgencmd installed?
You need to add the ppa:ubuntu-raspi2/ppa repo (see https://wiki.ubuntu.com/ARM/RaspberryPi#Optional_PPAs):

Code: Select all

sudo add-apt-repository ppa:ubuntu-raspi2/ppa
Ignore the 404 Not Found error that you may get - this is due to that fact that the repo doesn't officially support the latest Ubuntu server (eoan). To fix that, modify the repo source file:

Code: Select all

sudo nano /etc/apt/sources.list.d/ubuntu-raspi2-ubuntu-ppa-eoan.list
Change eoan to bionic, which is the latest officially supported version. After that run

Code: Select all

sudo apt update
sudo apt install libraspberrypi-bin
This will install vcgencmd.
THANK YOU! That did the trick!

Return to “Ubuntu”