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:
https://github.com/mad-ady/odroid-cpu-control
to change the governor (install to /usr/local/bin)
I also added a systemd service to set the governor at startup, thus:

$this->bbcode_second_pass_code('', '
cat > /usr/local/bin/cpufreq.sh
#!/bin/sh
/usr/bin/echo "Starting cpufreq.sh"
if ["$UID" != "0"] ; then
/usr/bin/echo "cpufreq.sh: UID is not 0, run as root"
fi
# 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
done
# 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"
^D
chmod 755 /usr/local/bin/cpufreq.sh
')

$this->bbcode_second_pass_code('', '
cat > /etc/systemd/system/cpugovernor.service[Unit]
Description=Set ODroid CPU governor to ondemand
Before=multi-user.target

[Service]
User=root
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/local/bin/cpufreq.sh

[Install]
WantedBy=multi-user.target
^D
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.
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Return to Packages

Who is online

Users browsing this forum: No registered users and 14 guests