[Bug 201539] AMDGPU R9 390 automatic fan speed control in Linux 4.19/4.20/5.0

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Sat Dec 7 19:48:10 UTC 2019


https://bugzilla.kernel.org/show_bug.cgi?id=201539

--- Comment #45 from muncrief (rmuncrief at humanavance.com) ---
(In reply to MasterCATZ from comment #43)
> the file is correct .. and you can tell that because its reading the temp
> "current pwm: 76"
> 
> error is because NOTHING is being allowed to edit pwm1_enable it is stuck on
> auto so nothing can manually change pwm1
> 
> 
> 
> but if their is an error in my adjustments let me know 
> 
> 
> # hwmon paths, hardcoded for one amdgpu card, adjust as needed
> HWMON=$(ls /sys/class/drm/card1/device/hwmon/hwmon1)
> FILE_PWM=$(echo /sys/class/drm/card1/device/hwmon/hwmon1/pwm1)
> FILE_FANMODE=$(echo /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable)
> FILE_TEMP=$(echo /sys/class/drm/card1/device/hwmon/hwmon1/temp1_input)

Your variables are set wrong. If your GPU is card1 they should be:

HWMON=$(ls /sys/class/drm/card1/device/hwmon)
FILE_PWM=$(echo /sys/class/drm/card1/device/hwmon/$HWMON/pwm1)
FILE_FANMODE=$(echo /sys/class/drm/card1/device/hwmon/$HWMON/pwm1_enable)
FILE_TEMP=$(echo /sys/class/drm/card1/device/hwmon/$HWMON/temp1_input)


The "HWMON" variable is there to determine which actual hardware monitor is
being used because it can change whenever you boot. One time it could be
hwmon1, the next time hwmon3, etc. So you can't hard-code it as you're doing.
You have to use the $HWMON variable to set FILE_PWM, FILE_FANMODE, and
FILE_TEMP.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the dri-devel mailing list