Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OV stability fixes #334

Merged
merged 2 commits into from
Oct 31, 2022
Merged

Conversation

tb59427
Copy link
Contributor

@tb59427 tb59427 commented Oct 30, 2022

This PR contains two commits:
Further increase minimum CPU voltage to 1.2V further increases CPU voltage to 1.2V. This has proven to increase
stability greatly. However, it does not completely avoid OV freezes. It appears - at least on some OV systems - that changing CPU frequency occasionaly also creates freezes.

Fix CPU clock/frequency at 720MHz fixes the issue of CPU clock changes occasionally creating freezes by fixing CPU
clock at 720Mhz. See commit message, if you want to change the frequency to a different speed.

In combination these two fixes have created a rock solid OV (Stefly 5.7 LVDS) for me.

This fix, when applied, changes the OPP voltages for the CPU from a minimum of
1V to 1.2V when creating Openvario images. This fixes freezes previously
encountered even after minimum CPU voltage was increased  to 1.1V.

It is deliberately created as a patch to linux kernel file
arch/arm/boot/dts/sun7i-a20.dtsi to always remind us to check this file when a
new kernel is pulled into the OV build. Maybe at some time in the future the
linux maintainers may bring this change into their code base making this
patch unneccessary.

It is a "follow up" change to commit #0426cb7023a415d2c4645d19ec54f9462579bd5c
(read the commit message there if you want to fully understand the reasoning
behind increasing minimum CPU voltage for the cubieboard)

Beware this fix may not completely fix instabilities of OV as
switching CPU speed has been identified as an additional cause of freeze
at least on some systems. There is a separate commit for a fix stopping
CPU frequency from being changed by the kernel.
During various tests with different settings for CPU voltage and CPU speed (see commit #0426cb7023a415d2c4645d19ec54f9462579bd5c
and commit #5cd841d1c151f8701aefecb393a72c0bd7ea82b5) it transpired that OV runs most stable with CPU speed
fixed (thus stopping the ability to change processor speed). In my lab OV has run for more than two weeks in a row with this change.

I have implemented this as a small service run on (and on demand) by systemd. This
service invokes /opt/bin/fix_cpu_freq.sh - a small bash script fixing scaling_min and scaling_max frequencies for the CPU at the same value.
Currently this value is 720MHz which has proven to be more than sufficient for my OV (5.7 no sensorboard).

If needed CPU speed can easily be changed in said script (see comments in the script).

One could argue that with this patch, my previous voltage patches (see commit numbers above) would be obsolete.
True, if people stay with the 720MHz. If - for some reason - people change their min/max frequencies again, the voltage patch comes in
handy as it ensures high enough voltage for the CPU for reasonable stability.
@mihu-ov
Copy link
Member

mihu-ov commented Oct 30, 2022

Finally :-)

@linuxianer99 linuxianer99 merged commit 5108189 into Openvario:master Oct 31, 2022
@Blaubart
Copy link
Contributor

Thanks a lot!!

@tb59427 tb59427 deleted the OV-stability-fixes branch October 31, 2022 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants