I wanted to lock fans at 80% but in a slightly different manner. I've changed nothing in /sys/class/drm/. Just
readlink -f /sys/class/drm/card1/device
, where card1 is my amd videocard.
Thus I know the path to the file I want to change.

And after that:
sudo sh -c "echo '1' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1_enable"
sudo sh -c "echo '200' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1"
Works! Ubuntu kernel 5.4
Answer from alex on Stack ExchangeI wanted to lock fans at 80% but in a slightly different manner. I've changed nothing in /sys/class/drm/. Just
readlink -f /sys/class/drm/card1/device
, where card1 is my amd videocard.
Thus I know the path to the file I want to change.

And after that:
sudo sh -c "echo '1' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1_enable"
sudo sh -c "echo '200' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1"
Works! Ubuntu kernel 5.4
In case anyone is interested the solution I made and the corresponding systemd service is here: redfan https://github.com/nmtitov/redfan
So far my best guess is to write the following script and keep it always running in the background:
while sleep 1; do echo 0 > /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable; done
Every second I "disable" pwm and make fans running at max speed. The driver (or something else) restores the value, but the next second I immediately disable it again.
I'm currently testing out a Vega 56 (PowerColor) under linux. I've installed the new 17.40 amdgpu-pro driver and things seem to be working fine apart from temperature control.
I've noted amdgpu-pro allows the temperature to rise to quite high levels, or higher than I would have thought is healthy. When I put load on the card, temperature rises to the 84-88 degree range but the fans was still far from 100%.
At one point, I left the computer for an hour only to come back and find that the fan had stopped(!?) and the card was extermely hot. After restarting the computer, the fans didn't start spinning (so I thought it was fried) and after leaving the system on for about a minute, I even heard a noice comming from it, as if something physically popped in there.
Amazingly enough, the card came back to life after cooling down for 20+ minutes, but this incident has left me wondering.
-
How high can the temperature go without damaging the card?
-
Is it possible to tell the software to be more agressive with the fans?
I'm greatful for any advice.
One of the key things to consider when playing with the Vega is that the mem temp is almost more important than the core temp. Since mem is shared on the GPU die it is just as vulnerable to temp fluctuations. The card will throttle HARD if mem temp is high. This is key because you can run core temp at 70c and be baking the mem at 85+.
I used MSI afterburner for my OC. Seeing that mem temp allowed me to really fine tune at pull a 1650 actual OC, was set to 1680 in the software. I did the 64 bios flash. Undervolting is still key here to manage temps and throttling.
As far as temperature neither the GPU or mem should be passing 85c. I too had noticed issues with and software and the fans curve. I just established a custom curve in MSI and it has worked great since. I even set it to turn off the fan when not in use.
The fans won't usually hit 100% no matter what. Not with default fan control settings, anyway (even in Windows). The GPU will throttle before the fans are allowed to run above a certain level.
When you left the computer alone for an hour was it just idle? If so, the fans turned off because the GPU temperature was low enough (< 60C on most cards). Yes, that's hot, but it's not a problem. It could survive 20+ years at 60C.
The hum was probably just coil noise - those of us who water cool our cards are aware of that sound.
As for being able to control the fans in Linux, I believe that is supposed to be included with Kernel 4.15 if AMD gets their major driver infrastructure accepted into the mainstream kernel. You can find the branch and build the kernel yourself, I'd imagine, if you don't want to wait.