Zynthian overclocking

Probably you have read that the Raspberry Pi 5 is not so tolerant to overclocking as his predecessor. For this reason we have changed the default overclock value to None for all Pi5 configurations.

This doesn’t mean you can’t try overclocking. Indeed, if you have a Raspberry Pi 5 and a good heat dissipation system, like the Kit V5.1 does, you probably could overclock your zynthian.

For doing so, you should proceed step by step like this:

1.) From the “Hardware Options” in the webconf panel, change the overclock setting from “None” to “Medium” (10% up!) and save:

2.) Reboot and test deeply.

3.) If your zynthian keeps running and it’s 100% stable, without bizarre errors nor crashes or getting frozen, then you could repeat and try the "maximum " overclocking. If you are lucky enough, you will get a nice 20% of extra processing power!

4.) If things goes wrong and your zynthian doesn’t boot or it’s unstable, you should revert to the previous config. If your system can boot, try to be fast and change from webconf before it crashes.
If your zynthian don’t even boot, then you should make this change by hand:

  • Power-off and extract the SD-card
  • Mount the SD-card in your computer.
  • Edit this file from the boot partition (the smaller one):

config.txt

and remove / comment the overclocking lines:

over_voltage_delta=20000
arm_freq=2700

like this:

#over_voltage_delta=20000
#arm_freq=2700

  • Save,umount the SD-card and boot your zynthian with it. It should work now.
  • Then, please access the “Hardware Option” in the webconf and restore the overclocking that works for you (None or Medium). Don’t forget this step or the lines you changed by hand in the config.txt will be reverted in the next update or config change you do.

Alternately, you could simply re-burn your SD-card with the latest stable SD image and avoid the manual restoring :wink:

And that’s all!

Please, give feedback in this thread about your experiences with overclocking. We would like to know …

Enjoy!

2 Likes

Could we have some form of ramping up of processing during initial startup, e.g. starts with normal then after a defined duration, increases to the user defined overclocking setting? This could allow users to more safely overclock with the ability to recover during a subsequent boot. There could be a user adjustable parameter (in webconf) to define the time before overclocking commences, initially set to 2 minutes (for example) that the user may reduce to zero if they are confident it is all fully working. Some users may be content with retaining this time of normal clocking as a safety net that may not interfere with their workflow, e.g. they generaly turn on their zynthian at least 2 minutes before needing to play it at full throttle.

2 Likes

AFAIK as i know, this wont be easy. I’ve not made a super-deep research, but the overclocking frequency and overvoltage values are normally set on boot time. This could probably be changed dynamically (i’m not sure of this, but it smells like it should be possible) but if you get this “ramp” to work, how to test stability in a reliable way? Let’s try t:

1.) save current safe frequency / overvoltage pair in a file and sync to be sure it’s well saved
2.) step a little bit, make some intense CPU work for some time
3.) if it doesn’t crashes, go to 1.
4.) when it crashes, the system probably will be dead. Reboot and the script will look for the last “stable” step it saved before crashing, then take n steps lower to be sure it’s really stable and configure accordingly.

It could be feasible and it’s elegant for sure, but … is it worth the effort? :wink:

All the best!

1 Like

My suggestion is simpler…

  1. Save the user’s preferred overclock frequence and delay time.
  2. At boot, set overclock to known safe state, i.e. no overclocking.
  3. After user defined period, change overclocking to user defined value.

You are right that overclocking is set at boot time but we could emulate this by throttling CPU for the specified time, i.e. set overclocking to user requested value at boot and set CPU throttle to (say 50%) for user defined period.

That depends on how big an issue this proves to be. We have already, in the first few days had many issues. Does the problem calm down or continue to cuase issue over time?

The problem is mitigated. Default overclock is set to None in current stable image, so nobody should have issues with this in the future.
Overclocking is an advanced subject and from now, a “personal decision”. We have explained quite detailed how to do it and revert it. Of course, the scheme you propose is very elegant and it could be implemented (or at less tried!), but it will take time and effort and IMHO we have highest priorities. At the end, the RPi5 works really nice without overclocking at all!!

The best,

1 Like