File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const (
3131 configManagerId = "org.desktopspec.ConfigManager"
3232 _configHwSystem = "/usr/share/uos-hw-config"
3333 intelPstatePath = "/sys/devices/system/cpu/intel_pstate"
34- AmdPstatePath = "/sys/devices/system/cpu/amd_pstate"
34+ amdPstatePath = "/sys/devices/system/cpu/amd_pstate"
3535 amdGPUPath = "/sys/class/drm/card0/device/power_dpm_force_performance_level"
3636)
3737
@@ -151,8 +151,7 @@ func newManager(service *dbusutil.Service) (*Manager, error) {
151151 }
152152 // check pstate , if has pstate, it is intel pstate mode , then
153153 // we need another logic
154- m .hasPstate = dutils .IsFileExist (intelPstatePath ) || dutils .IsFileExist (AmdPstatePath )
155- // check if amd is used
154+ m .hasPstate = (dutils .IsFileExist (intelPstatePath ) || dutils .IsFileExist (amdPstatePath )) && dutils .IsFileExist (pstateConfPath ) // check if amd is used
156155 m .hasAmddpm = dutils .IsFileExist (amdGPUPath )
157156
158157 m .refreshSystemPowerPerformance ()
You can’t perform that action at this time.
0 commit comments