CPU or GPU overclocking possible?

My question is if it is possible to overclock the CPU or GPU on my S905X Box in CoreElec.
If it is, a option in the CoreElec settings addon would be great.

I read somewhere CPU overclocking is possible with the Odroid C2 which has S905 SoC but not possible with all other Amlogic Boxes. I wonder why, maybe someone could explain it in a short and easy way.

Concerning GPU, in kszaq’s LE 8.2 builds it was possible to overclock the gpu by typing echo 5 > /sys/class/mpgpu/cur_freq.
Default freq is at 400 (MHz I guess?..) and after that command it says 755.
After a reboot freq was back at 400. I tried to put the command in some autostart script but didn’t succeed. This is why I also ask for a setting to make it persisit reboots.

Now after an update to CoreElec typing that command, the value of 400 doesn’t change. Why is that?

Now don’t get me wrong, my box is quite responsive, even with just 1GB Ram. You all are doing a great job, also LE team, the box seemes to still get faster after couple updates over the past year or so (which I don’t understand :grin:).

But right now I have 2 reasons why I ask for overclocking:

  • With Kodi Leia and its DRM handling now I can use the Amazon VOD Addon to watch amazon instant prime videos, which is awesome. Unfortunately I learned decoding of such content can only be done in software, so I am limited to 720p (experience from others with same Soc)…which would be totally fine. Problem is for me the audio gets asynchron, everything else seems fine. With lower resolution it works. I guess this would get better with a higher clocked CPU.

  • In Kodi Krypton I used a modded Estuary skin called Estuary.Refresh wich unfortunately isn’t compatible with Leia now. I know there is Guilouz’s Estuary MOD skin…which is awesome but it’s rather overloaded for my box. Switching menus etc. is pretty slow :frowning: I yet have to try Estuary MOD V2 for Leia but I guess it will be the same.
    I thought maybe a higher GPU clock could help here.
    In LE with 755 MHz I think I noticed a difference,…maybe I just imagined sth. there… idk.

Puting command in autostart.sh shoould work if formated properly. It does on my S905W and S912 boxes:

#!/bin/sh

echo 5 > /sys/class/mpgpu/cur_freq;

With such an autostart.sh I get 666(400) MHz on S905W and 792(500) on S912

Ok, it works, guess I messed up somewhere.
Only strange thing is if I type echo 5 > /sys/class/mpgpu/cur_freq manually, I see 744.
If I put it in autostart I just get 500…

Alright I decided to start with a fresh CoreElec image.
No matter what I write to cur_freq it doesn’t change from 400.
@anon88919003 and other devs: I think kszaq may have enabled this somehow in his builds. Could you do that as well? Up to 744 should be save, would be awesome.

Just tried it on a new X96 (S905W) box with fresh instal of CoreElec 8.90.2, and it works as expected -> without autostart.sh it returns 500MHz, and with the command in autostart.sh it returns 666MHz.
So, I don’t think that anything should be enabled to GPU overclock to work…

That’s strange…seems for me sometimes it works sometimes it doesn’t? Makes no sense. But it definetly does not work after reboot. I made sure I used correct command.

1 Like

Sorry for dumb questions, do you have any other commands in autostart that work? Did you place autostart.sh in the right place?

It’s in /storage/.config/autostart.sh and looks like this:

#!/bin/sh

echo 5 > /sys/class/mpgpu/cur_freq;
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
1 Like

Strange, all like mine, except I don’t use CPU overclock line…

Try

#!/bin/sh

echo 5 > /sys/class/mpgpu/cur_freq
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

and check that you use Unix EOL Conversion

I know this is an old and dead thread, but just in case someone stumbles across it there is an essential step which is missed and the autostart.sh will not run without it. You need to change the permissions on the autostart.sh by running this:

chmod +x /storage/.config/autostart.sh

It took me a while to work this one out, but when I did the autostart.sh worked perfectly.

Hmm…, my autostart.sh runs OK without the need for this permission change…

Just noticed that I already started such topic a while ago.
I still cannot get autostart.sh to execute (at least it seems not to) after a reboot.
File looks like this:

#!/bin/sh
echo 5 > /sys/class/mpgpu/cur_freq
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

execute permissions are set:

drwxrwxr-x 2 root root 1024 Jan 3 02:45 aacs
-rwxr-xr-x 1 root root 119 Dec 26 09:06 autostart.sh
-rw-r–r-- 1 root root 3 Jan 23 20:21 boot.status
-rw-r–r-- 1 root root 284 May 5 2018 hosts.conf
drwxrwxr-x 2 root root 1024 Jan 3 01:52 hwdb.d
drwxrwxr-x 2 root root 1024 Jan 3 02:17 iptables
drwxrwxr-x 2 root root 1024 Jan 3 01:52 logind.conf.d
drwxrwxr-x 2 root root 1024 Jan 3 02:45 modprobe.d
drwxrwxr-x 2 root root 1024 Jan 3 01:52 modules-load.d
drwx------ 2 root root 1024 Jan 23 18:29 pulse
drwxrwxr-x 2 root root 1024 Jan 3 02:45 pulse-daemon.conf.d
drwxrwxr-x 2 root root 1024 Jan 3 02:47 rc_keymaps
-rw-rw-r-- 1 root root 720 Jan 3 02:47 rc_maps.cfg.sample
drwxr-xr-x 20 root root 1024 Jan 23 18:44 retroarch
-rw-rw-r-- 1 root root 3660 Jan 3 02:17 samba.conf.sample
drwxrwxr-x 2 root root 1024 Jan 3 01:52 sleep.conf.d
drwxrwxr-x 2 root root 1024 Jan 3 01:52 sysctl.d
drwxrwxr-x 4 root root 1024 Jan 3 01:52 system.d
drwxrwxr-x 2 root root 1024 Jan 3 01:52 tmpfiles.d
drwxrwxr-x 2 root root 1024 Jan 3 01:52 udev.rules.d

But after reboot no changes are happening.

So I have 2 questions:

  1. Is there still no further overclocking (cpu or gpu) possible due to Amlogics limitations in kernel?
  2. Can we have an option in CE settings where we can set overclocking and make settings persist a reboot?

i found that I could only get the govenor to change if I formatted it this way:

echo “performance” /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Also on the S912 you also need , otherwise it only applies to the first 4 cpu’s:

echo “performance” /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

You must also ensure that the file is set to execute, which you will need to chmod its permissions.

shoog

1 Like

thx, I’ll try with the " ".

This is my autostart.sh for S912 box:

#!/bin/sh

echo 5 > /sys/class/mpgpu/cur_freq;
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor;

It works as it’s expected. Make sure you copy above lines to Notepad++ and save it to autostart.sh as Unix script file. Normal Notepad saved files don’t work for me…

This is mine:

#!/bin/sh

echo “performance” > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo “performance” > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

echo 5 > /sys/class/mpgpu/cur_freq

If permissions are set correctly the autostart.sh script will appear in green in the ls

The question is… does it make a difference in performance?

“echo 5 > /sys/class/mpgpu/cur_freq” on my S912 makes noticeable difference, especially on GUI responsiveness, becomes really snappy.
My experimentation with “governors” never resultated in any noticable difference.

1 Like

You are running a typical linux startup-file issue, which is very common and cost me some work hours in history.
While running the autostart at startup, the path-variable is not set, and thus, the echo command is not found.
Type “which echo” into the shell to get the full path to your echo command, mostly /bin/echo, and exchange “echo” in this startup-file with the full path ("/bin/echo").

Running the startup-file later manually typically works, because the path-variable is set and thus, the echo-command is found.

The most interesting question is: Does I have any benefits?