Undervolting the R9700

Does anyone have experience with undervolting the R9700?

I find the card makes too much fan-noise, and I would like to reduce the thermals and fan-speed.

This is the script I’m currently using

#!/bin/bash

#Check if card0 is R9700
if ! grep -q R9700 /sys/class/drm/card0/device/vbios_version 2>/dev/null; then
exit 0
fi

#Enable manual config
echo “manual” > /sys/class/drm/card0/device/power_dpm_force_performance_level

#Set the GPU clock offset (MHz)
echo “s -500” > /sys/class/drm/card0/device/pp_od_clk_voltage

#Set the GPU voltage offset (mV)
echo “vo -80” > /sys/class/drm/card0/device/pp_od_clk_voltage

#Commit
echo “c” > /sys/class/drm/card0/device/pp_od_clk_voltage

#Set the GPU power cap (W)
echo “210000000” > /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap

#Set the fan curve, [step, temp, speed], the junction temp is used.
echo “0 35 25” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo “1 50 25” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo “2 65 30” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo “3 75 30” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo “4 90 40” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve

#Commit
echo “c” > /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve

exit 0

Without any limits, the junction temperature high is around 90C and the fan-speed is 60%.

With the reduces power_cap and clock speed, the temperature is around 85C with 35% fan-speed. At 35% fan-speed is noise is greatly reduced.

I only use the card for AI workloads, and the tokens/sec in LM studio doesn’t really seem to change with the reduced power_cap.

Am I misreading the numbers, or does it make sense that the card has the same performance at 210W and 300W?

If anyone has experience with undervolting the card, I would love to know what the optimal values are.

1 Like

Yeah, it’s normal to be limited by bandwidth rather than compute on AI workloads.

Undervolting and overclocking are essentially the same so how far you can push any given card depends on the card. Continue reducing voltage offset in small steps and testing for any artifacting or instability. When you encounter either back off by some margin to regain stability and that’s the optimal value for your card.

1 Like

I thought I needed to find a balance between lowering the power usage and GPU performance.

The card is close to silent now, if lowering the power usage doesn’t impact performance, I’ll leave well enough alone.

That depends on what how you’re judging “performance”. If you’re only looking at TG (token generation) then you likely won’t see a massive difference because it tends to be bandwidth-bound.

On the other hand, if you look at PP (prompt processing), you’ll likely see a very noticeable drop from 300W to 210W, because it’s primarily compute-bound. I have my cards running at 330W, and I’ve seen a ~9% increase in PP.

1 Like

You can reduce power usage without sacrificing performance but only to the point of instability. If you’re happy as is that’s fine but you did limit clock speed by 500MHz so you could also try to regain the performance you sacrificed. Maybe the card is still stable and quiet enough at full clock speed with just the voltage offset. The balance always involves the possibility of instability though so if you don’t want to risk instability by running full clock speed with a negative voltage offset because your noise problem is solved then just leaving well enough alone is fine.

1 Like

How is the situation with temperatures and noise at that power? Do you have multiple cards in a case or outside one?

Honestly, I couldn’t really tell you what the noise is like because it’s in the back room with my NAS. Temperatures aren’t particularly worrisome, though (rarely gets over 60-65C, even on long runs).

They’re both in a Fractal Pop Silent case, which is currently not silent…I run the case fans (3 x Noctua Redux) on full speed, so…while it’s not obnoxious, it’s not quiet either. However, I’m yet to hear the GPU fans over the case fans.

Appreciate that’s probably not a useful answer for most folks’ use case. I do admit that a room dedicated to the wife’s hobby stuff and my printers and servers is a bit of a luxury in this economy.

You are right about the prompt processing being slower. I did some quick tests with 10MB PDF files, and it seems to be roughly 15% slower. Most of my everyday prompts don’t take long to process, I don’t really notice the difference.

Are you sure your GPU and memory is running at 60-65C at 330W, at 300W mime are running at 90C?

The card has 3 sensors, edge, memory and junction (GPU), you are probably reading the edge temperature, which is a lot cooler then the actual hardware.

If you have the rocm driver installed, you can use rocm-smi -t to read the value of all 3 temperature sensors.

I’ve not really checked, to be honest - I’m just going off the temperature reported in nvtop, because it’s the easiest to read during bursty workloads like LLM prompts.

After poor initial results, I’ve kept ROCm off my AI rig because it seemed to cause all sorts of issues with trying to update the RADV driver. I’ve never had good results with it, so it didn’t seem like a particularly good use of time to try to get it working only to ignore it in favour of Vulkan anyway.