Thermal Settings

You can force the OpenWRT One hardware to dial back at a lower-than-stock temperature. I’m playing with this to determine what each setting does.

This all goes in System >> Startup >> Local Startup (the /etc/rc.local file):

# ==============================

# SET CPU THERMAL LIMITS:
echo 90000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp # Hard Critical shutdown threshold
echo 85000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp # Extreme throttle threshold
echo 75000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp # Aggressive throttle threshold
echo 65000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp # Maximum safe optimal operating temperature
echo 55000 > /sys/class/thermal/thermal_zone0/trip_point_4_temp # The baseline operating threshold

# SET THERMAL LIMITS FOR WIFI CHIPS
# Wait 10 seconds to ensure drivers are fully registered in sysfs
sleep 10

# Use 'ls -d' to isolate the physical hardware paths
for hwmon_dir in $(ls -d /sys/class/ieee80211/phy*/hwmon* 2>/dev/null); do

    MAX_FILE="${hwmon_dir}/temp1_max"
    CRIT_FILE="${hwmon_dir}/temp1_crit"

    # Write to max file if it exists (using printf to prevent newline)
    if [ -f "$MAX_FILE" ]; then
        printf "%s" "85000" > "$MAX_FILE" 2>/dev/null > "$MAX_FILE"
    fi

    # Write to crit file if it exists (using printf to prevent newline)
    if [ -f "$CRIT_FILE" ]; then
        printf "%s" "75000" > "$CRIT_FILE" 2>/dev/null > "$CRIT_FILE"
    fi
done

# ==============================

Issue the command:

ps | grep rc.local

You’ll see something like this:

ps | grep rc.local
 3598 root      1332 S    grep rc.local
21369 root      1352 S    sh /etc/rc.local

So you’d issue:

kill 21369

Then you can restart /etc/rc.local to load the changes without having to reboot:

sh /etc/rc.local

I know /sys/class/thermal/thermal_zone0/trip_point_0_temp shuts down the router, and I know /sys/class/ieee80211/phy*/hwmon*/temp1_max shuts off the WiFi chip. The rest of them, I assume, are logging warnings and throttling the hardware to reduce heat generation.