From 0c78b41bca82c691914f27180b6cb71c37cd4d8b Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sun, 28 Apr 2024 13:39:32 -0400 Subject: [PATCH] Apply SteamFork bits. --- LICENSE | 1 + README.md | 82 ++++++------------------------------ install.sh | 2 +- package.json | 4 +- py_modules/devices/README.md | 4 +- py_modules/plugin_update.py | 2 +- src/backend/utils.tsx | 2 +- 7 files changed, 21 insertions(+), 76 deletions(-) diff --git a/LICENSE b/LICENSE index 9fe61b8..df58731 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ BSD 3-Clause License +Copyright (c) 2024, Fewtarius Copyright (c) 2023, Aarron Lee Original Copyright (c) 2022-2023, Steam Deck Homebrew diff --git a/README.md b/README.md index e28c378..6e3abe1 100644 --- a/README.md +++ b/README.md @@ -41,89 +41,32 @@ This is a (formerly simple) Linux TDP Decky Plugin that wraps ryzenadj. Intended - ROG Ally TDP via WMI calls (allows for TDP control with secure boot) - etc -## Compatibility +## Deviations from Upstream +* Adds an explicit GPU power saving mode as implemented in [JELOS](https://github.com/JustEnoughLinuxOS/distribution). -Tested on ChimeraOS Stable (45), NobaraOS 39, and Bazzite Deck Edition. +## Compatibility -Other distros not tested. +Tested on [SteamFork](https://github.com/SteamFork), other distributions are not tested. Currently NOT compatible with Intel or Nvidia, this plugin is currently AMD APUs only -## Requirements - -### WARNING: This plugin assumes you already have ryzenadj installed and can be located in your PATH - -Note that ryzenadj is NOT necessary if you plan on using a [ryzenadj override](#custom-tdp-method). - -ChimeraOS, Bazzite Deck Edition, and NobaraOS Deck edition, should already have ryzenadj pre-installed. - -To check this, you can run `which ryzenadj` in a terminal/console, which should print out a path to a ryzenadj binary. - -e.g. - -``` -$ which ryzenadj -/usr/bin/ryzenadj -``` - -If you do not have ryzenadj installed, you will need to get a working copy installed onto your machine. - -To test your ryzenadj to make sure that it's functional, run the following: - -``` -$ sudo ryzenadj -i -``` - -This should print out a table that looks something like the following: - -``` -CPU Family: Rembrandt -SMU BIOS Interface Version: 18 -Version: v0.13.0 -PM Table Version: 450005 -| Name | Value | Parameter | -|---------------------|-----------|--------------------| -| STAPM LIMIT | 8.000 | stapm-limit | -| STAPM VALUE | 0.062 | | -``` - -If you see an error, you may need to set `iomem=relaxed` as a boot parameter for your kernel, or disable secure boot. - # Install ### Prerequisites -Decky Loader must already be installed. If using ryzenadj for TDP control, secure boot must be disabled. +Decky Loader must already be installed. If using ryzenadj for TDP control (Included w/ SteamFork), secure boot must be disabled. ### Quick Install / Update Run the following in terminal, then reboot. Note that this works both for installing or updating the plugin -**IF ON BAZZITE OS, USE THE BAZZITE INSTALLER [HERE](#bazziteos-installer)** - -``` -curl -L https://github.com/aarron-lee/SimpleDeckyTDP/raw/main/install.sh | sh -``` - -### BazziteOS installer - -The Bazzite installer does extra steps so that `Fix Steam Hardware Controls` functionality can work - -First install Decky Loader with this command in terminal: - -``` -ujust setup-decky -``` - -Then install SimpleDeckyTDP with: - ``` -ujust setup-decky simpledeckytdp +curl -L https://github.com/SteamFork/SimpleDeckyTDP/raw/main/install.sh | sh ``` ### Manual Install -Download the latest release from the [releases page](https://github.com/aarron-lee/SimpleDeckyTDP/releases) +Download the latest release from the [releases page](https://github.com/SteamFork/SimpleDeckyTDP/releases) Unzip the `tar.gz` file, and move the `SimpleDeckyTDP` folder to your `$HOME/homebrew/plugins` directory @@ -143,7 +86,7 @@ Dependencies: - fully functional ryzenadj ```bash -git clone https://github.com/aarron-lee/SimpleDeckyTDP.git +git clone https://github.com/SteamFork/SimpleDeckyTDP.git cd SimpleDeckyTDP @@ -176,7 +119,7 @@ sudo systemctl restart plugin_loader.service ### Desktop App -[SimpleDeckyTDP-Desktop App](https://github.com/aarron-lee/SimpleDeckyTDP-Desktop) - Experimental Electron frontend for the SimpleDeckyTDP Plugin's backend +[SimpleDeckyTDP-Desktop App](https://github.com/SteamFork/SimpleDeckyTDP-Desktop) - Experimental Electron frontend for the SimpleDeckyTDP Plugin's backend - Note: the Desktop app does not have full feature parity with the Decky Plugin. Certain features cannot be implemented yet, such as: - per-game profiles @@ -207,7 +150,7 @@ e.g. /path/to/script.sh 15 ``` -You can see how it's used in the code [here](https://github.com/aarron-lee/SimpleDeckyTDP/blob/1ab6b6df468e983a1246ff378875bb2a370b5698/py_modules/cpu_utils.py#L18) +You can see how it's used in the code [here](https://github.com/SteamFork/SimpleDeckyTDP/blob/1ab6b6df468e983a1246ff378875bb2a370b5698/py_modules/cpu_utils.py#L18) ### Custom Device settings @@ -241,7 +184,7 @@ First try updating the plugin to the latest version. ``` # update script -curl -L https://github.com/aarron-lee/SimpleDeckyTDP/raw/main/install.sh | sh +curl -L https://github.com/SteamFork/SimpleDeckyTDP/raw/main/install.sh | sh ``` If this doesn't fix your issue, next try deleting your `$HOME/homebrew/settings/SimpleDeckyTDP/settings.json` file, and rebooting. @@ -293,9 +236,10 @@ The ROG ally has some known issues related to CPU Boost and SMT. Thanks to the following for making this plugin possible: +- [SimpleDeckyTDP](https://github.com/aarron-lee/SimpleDeckyTDP) - [hhd-adjustor](https://github.com/hhd-dev/adjustor/) - [hhd-hwinfo](https://github.com/hhd-dev/hwinfo) - [decky loader](https://github.com/SteamDeckHomebrew/decky-loader/) - [ryzenadj](https://github.com/FlyGoat/RyzenAdj) - + diff --git a/install.sh b/install.sh index 101c5d9..fa11539 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ sudo rm -rf $HOME/homebrew/plugins/SimpleDeckyTDP echo "installing SimpleDeckyTDP plugin for TDP control" # download + install simple decky tdp -curl -L $(curl -s https://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $HOME/SimpleDeckyTDP.tar.gz +curl -L $(curl -s https://api.github.com/repos/SteamFork/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $HOME/SimpleDeckyTDP.tar.gz sudo tar -xzf SimpleDeckyTDP.tar.gz -C $HOME/homebrew/plugins # install complete, remove build dir diff --git a/package.json b/package.json index 1442f5f..2da3173 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "author": "Aarron L", "license": "BSD-3-Clause", "bugs": { - "url": "https://github.com/aarron-lee/SimpleDeckyTDP/issues" + "url": "https://github.com/SteamFork/SimpleDeckyTDP/issues" }, - "homepage": "https://github.com/aarron-lee/SimpleDeckyTDP", + "homepage": "https://github.com/SteamFork/SimpleDeckyTDP", "devDependencies": { "@rollup/plugin-commonjs": "^21.1.0", "@rollup/plugin-json": "^4.1.0", diff --git a/py_modules/devices/README.md b/py_modules/devices/README.md index 09c6825..9639682 100644 --- a/py_modules/devices/README.md +++ b/py_modules/devices/README.md @@ -14,7 +14,7 @@ This also requires the v28 or newer bios. Make sure you have the latest SimpleDeckyTDP installed, and enable STAMP in the bios. -install/update to latest SimpleDeckyTDP with: `curl -L https://github.com/aarron-lee/SimpleDeckyTDP/raw/main/install.sh | sh` +install/update to latest SimpleDeckyTDP with: `curl -L https://github.com/SteamFork/SimpleDeckyTDP/raw/main/install.sh | sh` If your device is compatible, enable the `Lenovo Custom TDP Mode` advanced setting in options: @@ -35,4 +35,4 @@ Asus WMI enables TDP control even with Secure Boot enabled For anybody that needs more fine-grained fan control on the ROG Ally, I'd recommend the [PowerControl Decky Plugin](https://github.com/mengmeet/PowerControl), but note that it conflicts with SimpleDeckyTDP, so you'd need to uninstall it. -As an alternative that is compatible with SimpleDeckyTDP, there is a fan-curve-only fork of PowerControl I created for personal use on my GPD devices [found here](https://github.com/aarron-lee/PowerControl) Other users have reported that it works on the ROG Ally +As an alternative that is compatible with SimpleDeckyTDP, there is a fan-curve-only fork of PowerControl I created for personal use on my GPD devices [found here](https://github.com/SteamFork/PowerControl) Other users have reported that it works on the ROG Ally diff --git a/py_modules/plugin_update.py b/py_modules/plugin_update.py index 84a0fb3..cc1bdd4 100644 --- a/py_modules/plugin_update.py +++ b/py_modules/plugin_update.py @@ -16,7 +16,7 @@ def recursive_chmod(path, perms): def download_latest_build(): # ssl._create_default_https_context = ssl._create_unverified_context - url = "http://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest" + url = "http://api.github.com/repos/SteamFork/SimpleDeckyTDP/releases/latest" gcontext = ssl.SSLContext() diff --git a/src/backend/utils.tsx b/src/backend/utils.tsx index ba8bb64..e037728 100644 --- a/src/backend/utils.tsx +++ b/src/backend/utils.tsx @@ -110,7 +110,7 @@ export const createPollTdp = export const getLatestVersionNum = async (serverApi: any) => { const { result } = await serverApi.fetchNoCors( - "https://raw.githubusercontent.com/aarron-lee/SimpleDeckyTDP/main/package.json", + "https://raw.githubusercontent.com/SteamFork/SimpleDeckyTDP/main/package.json", { method: "GET" } );