Created
November 17, 2020 16:21
-
-
Save klingtnet/450031840fafb1a05e5119d6f3804fc7 to your computer and use it in GitHub Desktop.
Throttle AMD GPU fan under linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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