Servers

Manually set Dell server fan speed:

Install ipmitool
sudo apt install ipmitool

Disable auto fan control
sudo ipmitool raw 0x30 0x30 0x01 0x00

Set fan 100% (0x64 == 100. Use this last value to adjust speed.)
sudo ipmitool raw 0x30 0x30 0x02 0xff 0x64

Enable auto fan control
sudo ipmitool raw 0x30 0x30 0x01 0x01

#!/usr/bin/env bash

# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed to high send the raw IPMI command to enable dynamic fan control.
#
# Requires ipmitool – apt-get install ipmitool
# ----------------------------------------------------------------------------------


# TEMPERATURE
# Change this to the temperature in celcius you are comfortable with.
# If it goes above it will send raw IPMI command to enable dynamic fan control
MAXTEMP=30
FAN_PERCENT=30

FAN_HEX_SPEED=$(echo "obase=16; $FAN_SPEED" | bc)

# This variable sends a IPMI command to get the temperature, and outputs it as two digits.
TEMP=$(ipmitool sdr type temperature | grep Ambient | grep degrees | grep -Po '\d{2}' | tail -1)

if [[ $TEMP > $MAXTEMP ]];
  then
    printf "Temperature is too high! ($TEMP C) Activating dynamic fan control!" | systemd-cat -t R710-IPMI-TEMP
    echo "Teperature is too high! ($TEMP C) Activating dynamic fan control!"
    ipmitool raw 0x30 0x30 0x01 0x01
  else
    # enable manual fan control
    ipmitool raw 0x30 0x30 0x01 0x00
    ipmitool raw 0x30 0x30 0x02 0xff 0x$(echo "obase=16; $FAN_PERCENT" | bc)
    printf "Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
    echo "Temperature is OK ($TEMP C)"
fi
sudo su -c 'echo "0" > /sys/class/backlight/intel_backlight/brightness';
Laptop LCD Brightness