Eraden / amdgpud

MIT License
195 stars 11 forks source link

Allow setting unsorted fan speeds #68

Open xdevs23 opened 9 months ago

xdevs23 commented 9 months ago

With certain clocks, voltages and power levels on a Vega 64, sometimes the VRAM temperature is falsely reported as 1 °C, in some scenarios even for prolonged periods of time. I use the VRAM temperature as the value to regulate the fan speed as in most of (if not all) the time the VRAM is up to 10 °C hotter than the Core.

The temperature being reported as 1 °C means that the fans will stay turned off even if the VRAM (and maybe the core) are heating up to death, causing instability issues. To combat this, I'd like to set the fan speed to 100 % when temp <= 2 °C just to be on the safe side.

It would be nice to be able to do something like this:

temp_input = "temp3_input"
log_level = "Error"

[[speed_matrix]]
temp = 0.0
speed = 100.0

[[speed_matrix]]
temp = 2.0
speed = 100.0

[[speed_matrix]]
temp = 3.0
speed = 0.0

# and all the rest

However, this causes following error:

ERROR amdfand            > Fan speed 1.0 for config entry 2 is lower than previous value 100.0. Entries must be sorted
ERROR amdgpu_config::fan > Curve fan speeds should be monotonically increasing, found 100 then 1

Error comes from https://github.com/Eraden/amdgpud/blob/main/crates/amdgpu-config/src/fan.rs#L300

Or, if you want to add new configs:

temp_input = "temp3_input"
log_level = "Error"
turn_off_below = 3.0
force_full_speed_at = [1.0, 80.0]

# and all the rest

Edit: To clarify, what I want is to be able to set 100% fan speed when VRAM temp < 2 °C but still use the normal fan curve otherwise.