Disable SMT toggle for now, awaiting fix from MangoHud
This commit is contained in:
parent
38b9cfa8b9
commit
aff1c394c9
4 changed files with 9 additions and 5 deletions
|
@ -24,7 +24,7 @@ NOTE: You cannot enable or disable cpu0, hence why there are only 7 in the range
|
|||
|
||||
Enable: `echo 1 > /sys/devices/system/cpu/cpufreq/boost` enables boost across all threads.
|
||||
|
||||
Disable: `echo 1 > /sys/devices/system/cpu/cpufreq/boost` disables boost across all threads.
|
||||
Disable: `echo 0 > /sys/devices/system/cpu/cpufreq/boost` disables boost across all threads.
|
||||
|
||||
### Set CPU frequency
|
||||
|
||||
|
|
BIN
extras/ui.png
BIN
extras/ui.png
Binary file not shown.
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 95 KiB |
5
main.py
5
main.py
|
@ -4,7 +4,7 @@ class Plugin:
|
|||
CPU_COUNT = 8
|
||||
SCALING_FREQUENCIES = [1700000, 2400000, 2800000]
|
||||
|
||||
# call from main_view.html with setCPUs(onclick_event) or call_plugin_method("set_cpus", count)
|
||||
# call from main_view.html with setCPUs(count, smt)
|
||||
async def set_cpus(self, count, smt=True) -> int:
|
||||
# print("Setting CPUs")
|
||||
if smt:
|
||||
|
@ -51,6 +51,9 @@ class Plugin:
|
|||
if read_scaling_governor_cpu(cpu) != "userspace":
|
||||
write_scaling_governor_cpu(cpu, "userspace")
|
||||
path = cpu_freq_scaling_path(cpu)
|
||||
if index == len(self.SCALING_FREQUENCIES) - 1:
|
||||
write_scaling_governor_cpu(cpu, "schedutil")
|
||||
else:
|
||||
write_to_sys(path, selected_freq)
|
||||
updated += 1
|
||||
return updated
|
||||
|
|
|
@ -114,7 +114,8 @@
|
|||
</head>
|
||||
<body onload="onReady()">
|
||||
<!-- SMT toggle switch, roughly copied from https://github.com/SteamDeckHomebrew/ExtraSettingsPlugin/blob/main/main_view.html -->
|
||||
<div class="quickaccessmenu_TabGroupPanel_1QO7b Panel Focusable">
|
||||
<!-- Due to a bug in MangoHud, this has been hidden for now -->
|
||||
<div class="quickaccessmenu_TabGroupPanel_1QO7b Panel Focusable" style="display:none;">
|
||||
<div class="quickaccesscontrols_PanelSectionRow_26R5w">
|
||||
<div class="quickaccesscontrols_PanelSectionRow_26R5w">
|
||||
<div class="gamepaddialog_Field_eKmEX gamepaddialog_WithFirstRow_2bDqk gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL gamepaddialog_StandardPadding_xIITX gamepaddialog_HighlightOnFocus_2HFrm Panel Focusable" style="--indent-level:0;">
|
||||
|
@ -232,7 +233,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="font-size:x-small;">
|
||||
WARNING: this will change the CPU governor, affecting battery life until reboot.
|
||||
WARNING: This will change the CPU governor.
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue