Skip to content

Instantly share code, notes, and snippets.

@klingtnet
Created November 17, 2020 16:21
Show Gist options
  • Select an option

  • Save klingtnet/450031840fafb1a05e5119d6f3804fc7 to your computer and use it in GitHub Desktop.

Select an option

Save klingtnet/450031840fafb1a05e5119d6f3804fc7 to your computer and use it in GitHub Desktop.

Revisions

  1. klingtnet revised this gist Nov 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion throttle-amd-gpu-fan.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ 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 2 to reset to auto
    echo 1 >"${pwm_control}_enable"
    cat "${pwm_control}_min" >"$pwm_control"
    done
  2. klingtnet created this gist Nov 17, 2020.
    11 changes: 11 additions & 0 deletions throttle-amd-gpu-fan.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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