Skip to content

Commit

Permalink
remove deprecated asusctl code
Browse files Browse the repository at this point in the history
  • Loading branch information
aarron-lee committed Dec 7, 2024
1 parent 03594cc commit c1a5f54
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
11 changes: 0 additions & 11 deletions py_modules/advanced_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import device_utils
import json

ASUSCTL_PATH = shutil.which('asusctl')
PLATFORM_PROFILE_PATH = '/sys/firmware/acpi/platform_profile'


Expand All @@ -24,7 +23,6 @@ class DefaultSettings(Enum):
FORCE_DISABLE_TDP_ON_RESUME = 'forceDisableTdpOnResume'

class RogAllySettings(Enum):
USE_ASUSCTL = 'useAsusCtl'
USE_PLATFORM_PROFILE = 'platformProfile'
USE_WMI = 'useWmi'
USE_EXTREME_POWERSAVE = 'useExtremePowersave'
Expand Down Expand Up @@ -235,15 +233,6 @@ def rog_ally_advanced_options(options):
'currentValue': get_value(RogAllySettings.USE_EXTREME_POWERSAVE, False),
'statePath': RogAllySettings.USE_EXTREME_POWERSAVE.value,
})
# if ASUSCTL_PATH:
# options.append({
# 'name': 'Use asusctl for platform profile management',
# 'type': 'boolean',
# 'description': 'This is ignored if you disable platform profile management',
# 'defaultValue': True,
# 'currentValue': get_value(RogAllySettings.USE_ASUSCTL, True),
# 'statePath': RogAllySettings.USE_ASUSCTL.value
# })
if rog_ally.supports_wmi_tdp():
options.append({
'name': 'Use Asus WMI for TDP',
Expand Down
4 changes: 0 additions & 4 deletions py_modules/cpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ def set_amd_tdp(tdp: int):
elif device_utils.is_rog_ally():
if advanced_options.get_setting(RogAllySettings.USE_PLATFORM_PROFILE.value):
rog_ally.set_platform_profile(tdp)
# if advanced_options.get_setting(RogAllySettings.USE_ASUSCTL.value):
# rog_ally.set_asusctl_platform_profile(tdp)
# else:
# rog_ally.set_platform_profile(tdp)
if advanced_options.get_setting(RogAllySettings.USE_WMI.value) and rog_ally.supports_wmi_tdp():
return rog_ally.set_tdp(tdp)

Expand Down
31 changes: 0 additions & 31 deletions py_modules/devices/rog_ally.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import decky_plugin
import bios_settings

ASUSCTL_PATH = shutil.which('asusctl')
PLATFORM_PROFILE_PATH = '/sys/firmware/acpi/platform_profile'

FAST_WMI_PATH ='/sys/devices/platform/asus-nb-wmi/ppt_fppt'
Expand All @@ -32,36 +31,6 @@ def set_mcu_powersave(enabled):
except Exception as e:
decky_plugin.logger.error(f"{__name__} mcu_powersave error {e}")

# def set_asusctl_platform_profile(tdp):
# current_value = ''
# if os.path.exists(PLATFORM_PROFILE_PATH):
# with open(PLATFORM_PROFILE_PATH, 'r') as file:
# current_value = file.read()
# file.close()

# if ASUSCTL_PATH:
# commands = [ASUSCTL_PATH, 'profile', '-P']

# if tdp < 13:
# commands.append('Quiet')
# elif tdp < 20:
# commands.append('Balanced')
# else:
# commands.append('Performance')

# if commands[-1].lower() == current_value.strip():
# # already set, return
# return

# results = subprocess.call(commands)

# if results.stderr:
# decky_plugin.logger.error(f"{__name__} asusctl error {results.stderr}")

# sleep(1.0)

# return results

def supports_bios_wmi_tdp():
tdp_methods = {"ppt_fppt", "ppt_pl2_sppt", "ppt_pl1_spl"}

Expand Down

0 comments on commit c1a5f54

Please sign in to comment.