Browse Source

Added odroid xu4 specific system files

master
Drew Short 9 years ago
parent
commit
8d66e5a915
  1. 13
      hardware_specific/odroid-xu4/README
  2. 6
      hardware_specific/odroid-xu4/update-fans.service
  3. 22
      hardware_specific/odroid-xu4/update-fans.sh
  4. 8
      hardware_specific/odroid-xu4/update-fans.timer
  5. 0
      scripts/installers/install_tools_arch.sh

13
hardware_specific/odroid-xu4/README

@ -0,0 +1,13 @@
Included are the the following files to more gracefully handle temperatures on the odroid xu4 running with systemd.
update-fans.sh is the script that actually updates the system files for the fan. Namely the fan speed and temperature settings.
It gets installed into /usr/local/bin/
update-fans.service is the service that calls the script to update the fans
update-fans.timer is the systemd timer that updates the fan speeds 5 seconds after systemd starts.
These should be placed in /usr/lib/systemd/system or wherever your systemd services and timers are stored
Finally the timer should be activated with "systemctl enable update-fans.timer".
If you don't feel like restarting to change the fan settings immediately, you can run "systemctl start update-fans.service"

6
hardware_specific/odroid-xu4/update-fans.service

@ -0,0 +1,6 @@
[Unit]
Description=update-fans
[Service]
Type=simple
ExecStart=/usr/local/bin/update-fans.sh

22
hardware_specific/odroid-xu4/update-fans.sh

@ -0,0 +1,22 @@
#!/usr/bin/env bash
#
# Run as root as a systemd service at startup
#
# Set the triggering temp levels to 40/75/85
# Supposedly continuous operation at over 85C is not recommended
echo "40 75 85" > /sys/devices/odroid_fan.13/temp_levels
# Set the fan speeds to:
# 1 at below 40C (Off)
# 28% above 40C and below 75C
# 75% above 75C and below 85C
# 100% above 85C
echo "1 28 75 100" > /sys/devices/odroid_fan.13/fan_speeds
# Display the current fan speed and temperature
#
# Sensor 2 seems to be the processor, or atleast the one that triggers the fan speeds
#
# Sensor 4 is always lower than the other sensors and doesn't change as fast under CPU load. Possibly memory controller?
#cat /sys/devices/odroid_fan.13/pwm_duty && sudo cat /sys/devices/10060000.tmu/temp

8
hardware_specific/odroid-xu4/update-fans.timer

@ -0,0 +1,8 @@
[Unit]
Description=Update the system fan and temperature setting at startup
[Timer]
OnStartupSec=5
[Install]
WantedBy=multi-user.target

0
install_tools_arch.sh → scripts/installers/install_tools_arch.sh

Loading…
Cancel
Save