Post
Topic
Board Mining (Altcoins)
Re: [ANN] TeamRedMiner 0.7.15 - Nimiq/Kawpow/Ethash/Cryptonight and More
by
kerney666
on 31/10/2020, 21:36:52 UTC
amdgpu-fancontrol works ... but only for the first gpu.
how can i set it for all 13 please
thank you


#hwmon paths, hardcoded for one amdgpu card, adjust as needed
FILE_PWM=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/pwm1)
FILE_FANMODE=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/pwm1_enable)
FILE_TEMP=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/temp1_input)


Well ok, sounds like that one was a little too much of a proof-of-concept. If you really just want to set a static fan speed, put this in a shell script. It will set all AMD gpus it can find to roughly 80% fan speed. Need to be run as root. Change 204 to something else for a different speed.

Code:
#!/bin/sh

find /sys/class/drm/card*/device/hwmon/hwmon*/pwm1 | while read p
do
    # Switch pwm1 into manual mode
    echo 1 > ${p}_enable

    # Set static speed (I'm assuming 0-255 is the range)
    # 255 * 0.8 = 204
    echo 204 > $p

    echo "$p -> pwm1 now "$(cat $p)
done