Odroid-XU4 kernel/devicetree scaling_governor causes resets

Problems with packages? Post here, using [tags] of the package name.

Odroid-XU4 kernel/devicetree scaling_governor causes resets

Postby aroberts » Sat Sep 09, 2017 7:53 am

I've just installed arch arm on a odroid-xu4. I found I was getting shutdowns under load.

I've traced this down to the CPU scaling_governor being set to performance by default.
This is causing idle cpu temperatures of 65C. Under load the system was routinely getting above 85C,
and presumably hitting the critical threshold and shutting down at points.

With the ondemand governor, idle temps are around 50C, and I can run the system under full load with no issues.
The ondemand governor should be the default, certainly not the peformance governor.

As a temporary fix, you can use this perl script:
to change the governor (install to /usr/local/bin)
I also added a systemd service to set the governor at startup, thus:

Code: Select all
cat > /usr/local/bin/cpufreq.sh
/usr/bin/echo "Starting cpufreq.sh"
if ["$UID" != "0"] ; then
  /usr/bin/echo "cpufreq.sh: UID is not 0, run as root"
# Set temperature check points for fan control
for i in `/usr/bin/seq 0 4`; do
/usr/bin/echo "50000" > /sys/class/thermal/thermal_zone$i/trip_point_0_temp
/usr/bin/echo "55000" > /sys/class/thermal/thermal_zone$i/trip_point_1_temp
/usr/bin/echo "60000" > /sys/class/thermal/thermal_zone$i/trip_point_2_temp
# Set ondemain CPU governor
/usr/bin/echo -n "Current CPU Governor: "
/usr/bin/cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
/usr/local/bin/odroid-cpu-control -s -g "ondemand" -m 300M -M 1.4G
/usr/bin/echo -n "New CPU Governor: "
/usr/bin/cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
/usr/bin/echo "Finished cpufreq.sh"
chmod 755 /usr/local/bin/cpufreq.sh

Code: Select all
cat > /etc/systemd/system/cpugovernor.service[Unit]
Description=Set ODroid CPU governor to ondemand


systemctl daemon-reload
systemctl enable cpugovernor.service
systemctl start cpugovernor.service

Hope this is useful. It will also work with the XU3, which presumably also has the same issue.
Posts: 42
Joined: Tue Mar 15, 2016 4:32 am

Return to Packages

Who is online

Users browsing this forum: No registered users and 3 guests