amdgpu-fancontrol icon indicating copy to clipboard operation
amdgpu-fancontrol copied to clipboard

Fix not being able to start service because temperature not yet available

Open y0ast opened this issue 4 years ago • 2 comments

sometimes it takes a while for the temperature of the gpu to become available, leading to

FILE_TEMP=$(echo /sys/class/drm/card0/device/hwmon/hwmon?/temp1_input)

being empty and the service failing with "invalid hwmon files".

I tried to look for a valid service to start after, but it doesn't seem to exist. Alternative to this solution there's a few others:

  • Restart (with 5 sec delays) until service starts successfully.
  • Add a path watcher for /sys/class/drm/card0/device/hwmon/hwmon?/temp1_input

The first could lead to an infinite restart loop, the second muddles logic from the amdgpu_control script and the service.

Open to suggestions. The fix suggested in #25 is not sufficient for me, but this works.

fixes #25

y0ast avatar May 03 '20 13:05 y0ast

Hi, thanks for reaching out.

I'm not going to merge a sleep patch, but keep this one open for documentation purposes for now, it might help people after all. I'll add some additional thoughts in #25

grmat avatar May 25 '20 11:05 grmat

I've now updated it to just do a restart on failure. Would you be open to merging that?

Despite your intention of this code being only a demo script, it is now directly mentioned in the Arch wiki: https://wiki.archlinux.org/index.php/Fan_speed_control#fancurve_script

Therefore it would be nice if the default setup at least starts on most machines.

y0ast avatar Jun 07 '20 18:06 y0ast