Working on a little Ethereum mining today.

I’ve got a rig running two AMD Radeon RX 570 GPUs with 4GB of RAM each.   I’m using Claymore Dual Miner for Ethereum, and when I gave it the arguments for target temperature

~/claymore10/ethdcrminer64 -epool us2.ethermine.org:4444 -ewal <wallet>.<worker> -epsw x -mode 1 -tt 68 -allpools 1

I had been a sudo error

Failed to set new fan speed, check if miner has root access!

Which leave leaves the fans running at auto, while they are quiet, I really need to keep the GPU temperature lower than 89C which was getting way to high.  Ideally I want to see it at around 66C.  So what I diced to do was remove the -tt 68 argument on the above command which eilminates the error messages.  Then to my miner.sh script I added these commands manually set the fan speeds for my RX 570 GPUs.

$ sudo echo 1 > /sys/class/drm/card2/device/hwmon/hwmon2/pwm1_enable

However I got an error permissions denied.

-bash: /sys/class/drm/card2/device/hwmon/hwmon2/pwm1_enable: Permission denied

After a couple of adjustments the command looks like this, it would work with sudo when running the miner.sh script as well as set fans to manual and then assign a speed.

So I used the follow commands

sudo /bin/su -c "echo 1 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1_enable"
sudo /bin/su -c "echo 178 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1"

This will set the fan to manual, then set then fan speed.  The speed is 0-255. So I want my fans to run at 70%, then I used 178 as the value.  Now my fan speeds are increased and temperature dropped over -10C just by getting more air flow.