Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R9 390: fan1_input - No such device #17

Open
kleest opened this issue Feb 25, 2020 · 2 comments
Open

R9 390: fan1_input - No such device #17

kleest opened this issue Feb 25, 2020 · 2 comments

Comments

@kleest
Copy link

kleest commented Feb 25, 2020

Using an R9 390, reading the current fan speed results in a program crash:

  File "/usr/lib/python3.8/site-packages/amdgpu_fan/controller.py", line 35, in main
    logger.debug(f'{name}: Temp {temp}, Setting fan speed to: {speed}, fan speed{card.fan_speed}, min:{card.fan_min}, max:{card.fan_max}')
  File "/usr/lib/python3.8/site-packages/amdgpu_fan/lib/amdgpu.py", line 50, in fan_speed
    return int(self.read_endpoint('fan1_input'))
  File "/usr/lib/python3.8/site-packages/amdgpu_fan/lib/amdgpu.py", line 37, in read_endpoint
    return e.read()
OSError: [Errno 19] No such device

This is due to cat /sys/class/drm/card0/device/hwmon/hwmon1/fan1_input: No such device

System information:

1d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] [1002:67b1] (rev 80)
Linux 5.5.5-arch1-1 #1 SMP PREEMPT Thu, 20 Feb 2020 18:23:09 +0000 x86_64 GNU/Linux
@SpyrosRoum
Copy link

SpyrosRoum commented Apr 20, 2020

I am having the exact same issue, also with an R9 390 (from sapphire if that helps) though I find it weird because if I try to ls /sys/class/drm/card0/device/hwmon/hwmon1/ I can see fan1_input listed

Edit to say that if I start it with systemctl (sudo systemctl start amdgpu-fan.service) it looks like it run without issues

@kleest
Copy link
Author

kleest commented Apr 20, 2020

For the time being, I fixed it with:

--- a/amdgpu_fan/lib/amdgpu.py
+++ b/amdgpu_fan/lib/amdgpu.py
@@ -48,7 +48,7 @@ class Card:
     def fan_speed(self):
         try:
             return int(self.read_endpoint('fan1_input'))
-        except KeyError:  # better to return no speed then explode
+        except:  # better to return no speed then explode
             return 0
 
     @property

Of course, this is no permanent solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants