Up through kernel 5.10, my AMD RX550 GPU fan was happily spinning at low speed keeping my GPU cool under idle - around 35-39C. In 5.11 the kernel developers broke something. The fan doesn’t spin until GPU temperatures reach about 65C. I saw some discussion about this problem existing in 5.10, but apparently it was fixed. Now it’s back. Same in 5.12rc.
So, I found the service “amdgpu-fancontrol”, which lets me set a comfortable fan curve. Here’s a relevant section of code:
hwmon paths, hardcoded for one amdgpu card, adjust as needed
FILE_PWM=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/pwm1)
FILE_FANMODE=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/pwm1_enable)
FILE_TEMP=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/temp1_input)
Here’s the service:
[Unit]
Description=amdgpu-fancontrol[Service]
Type=simple
ExecStart=/usr/bin/amdgpu-fancontrol[Install]
WantedBy=multi-user.target
The problem is that the service keeps failing at boot with the message “invalid hwmon”. If I start the service manually after I login, it works fine. So the service is being called at a time before the hwmon device is created. The last digit of the hwmon device can change between boots or with kernel changes. I have tried to find the service that creates hwmon, and it looked to be “sensord.service”. (I don’t recall which command I used to determine this.) I added:
After=sensord.service
under [Unit], and this worked for a while, then stopped. (I think I updated the kernel, but I don’t remember.) I made sure the service was enabled, and it was, but it keeps failing at boot. I can’t find where in the boot sequence to invoke the service to get it to start successfully. This is so annoying I just reverted to 5.10 just to have my fan control back. But I’m running a Ryzen 9 5950X so I’d like to be on the latest stable kernel.
I’m at my wit’s end. The whole point of Linux is to give us back control of our computers, and then someone makes this decision for us. Ack! (Yes, I know I can start the service manually after each login, but that’s not the proper way to solve the problem.) Can someone give some advice?