Need help with getting AMD GPU Power for use on CachyOS #1045
wonglc82-cmyk
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I tried adding this to custom_sensor.py to show AMD GPU Power on my 3.5" Turing screen, but seem to be getting errors. I saw a discussion with regards to Nvidia and Librehardware monitor, but as i understand it, Arch Linux would need to use pyamdgpuinfo instead. Could I get some help? Thank you!
import math
import logging
import pyamdgpuinfo
from library.sensors.sensors_custom_interface import CustomDataSource
logger = logging.getLogger(name)
class AMDGPUPower(CustomDataSource):
def init(self):
super().init()
# Initialise and detect the first available AMD GPU
try:
if pyamdgpuinfo.detect_gpus() > 0:
self.gpu = pyamdgpuinfo.get_gpu(0)
else:
self.gpu = None
logger.error("No AMD GPU detected via pyamdgpuinfo.")
except Exception as e:
self.gpu = None
logger.error(f"Failed to initialise pyamdgpuinfo: {e}")
The error I'm getting is;
Thursday 06 August 2026 08:30:49 +08 [ERROR] Error loading custom sensor class AMDGPUPower from sensors_custom.py : module 'library.sensors.sensors_custom' has no attribute 'AMDGPUPower'
All reactions