mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-18 12:16:43 -04:00
Use hwmon to determine which sysfs path to use for gpu/power bits.
Instead of always using /sys/class/drm/card0 based paths, use /sys/class/hwmon looking for amdgpu name file to determine where to look. Fixes reading TDPLimit, GPUPerformanceLevel and ManualGPUClock in cases where sysfs uses card1 or other paths. NOTE: Using wrong cardX path is a bug and will be fixed, but this makes steamos-manager a bit more resilient to those bugs.
This commit is contained in:
parent
c82e8df52c
commit
f3e5c8b576
2 changed files with 43 additions and 22 deletions
|
@ -445,6 +445,7 @@ mod test {
|
|||
|
||||
let proxy = ManualGpuClockProxy::new(&test.connection).await.unwrap();
|
||||
|
||||
power::test::setup().await;
|
||||
assert!(proxy.manual_gpu_clock().await.is_err());
|
||||
|
||||
power::test::write_clocks(1600).await;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue