A simple bash script to control the fan speed of AMD graphics cards
This is a simple bash script to control the fan speed of AMD graphics cards. The project has originally been forked from grmat/amdgpu-fancontrol and adjusted for my needs as a temporary tool to use while I work on my own, more elaborate solution. As such, I didn't invest much time to bring this up to my personal standards in regards to documentation, installation and ease of use.
Note: Due to a bug, the current PWM value is not reported accurately (it always shows 0) with the fan mode set to manual (so when using this script), at least on some cards (including my RX 6900 XT). This doesn't mean this script doesn't work correctly: adjusting the PWM value still works fine, it's just the hwmon readback that's wrong (which has no influence on the functionality of the script, aside from resulting in incorrect debug output). This issue will supposedly be fixed in kernel 5.12. See here for details (particularly this comment).
temp2_inputis used, which should be the junction temperature on RX 5xxx series cards and newer. This temperature represents the hottest point at any given moment and is also what is used to control custom fan curves in Windows