Skip to content

Instantly share code, notes, and snippets.

@klingtnet
Created November 17, 2020 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klingtnet/450031840fafb1a05e5119d6f3804fc7 to your computer and use it in GitHub Desktop.
Save klingtnet/450031840fafb1a05e5119d6f3804fc7 to your computer and use it in GitHub Desktop.
Throttle AMD GPU fan under linux
#!/usr/bin/env bash
# https://wiki.archlinux.org/index.php/Fan_Speed_Control#AMDGPU_sysfs_fan_control
set -eu
PWM_CONTROLS=$(find /sys/class/drm/card0/device/ -iname 'pwm?' -type f)
for pwm_control in "$PWM_CONTROLS"; do
# echo 2 to reset to auto
echo 1 >"${pwm_control}_enable"
cat "${pwm_control}_min" >"$pwm_control"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment