Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Apply SteamFork bits.
Browse files Browse the repository at this point in the history
  • Loading branch information
fewtarius committed Apr 28, 2024
1 parent 7e807f5 commit 0c78b41
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 76 deletions.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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

Expand Down
82 changes: 13 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)

<!-- [![](https://img.shields.io/github/downloads/aarron-lee/SimpleDeckyTDP/total.svg)](https://github.com/aarron-lee/SimpleDeckyTDP/releases) [![](https://img.shields.io/github/downloads/aarron-lee/SimpleDeckyTDP/latest/total)](https://github.com/aarron-lee/SimpleDeckyTDP/releases/latest) [![](https://img.shields.io/github/v/release/aarron-lee/SimpleDeckyTDP)](https://github.com/aarron-lee/SimpleDeckyTDP/releases/latest) -->
<!-- [![](https://img.shields.io/github/downloads/SteamFork/SimpleDeckyTDP/total.svg)](https://github.com/SteamFork/SimpleDeckyTDP/releases) [![](https://img.shields.io/github/downloads/SteamFork/SimpleDeckyTDP/latest/total)](https://github.com/SteamFork/SimpleDeckyTDP/releases/latest) [![](https://img.shields.io/github/v/release/SteamFork/SimpleDeckyTDP)](https://github.com/SteamFork/SimpleDeckyTDP/releases/latest) -->
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions py_modules/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
2 changes: 1 addition & 1 deletion py_modules/plugin_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
);

Expand Down

0 comments on commit 0c78b41

Please sign in to comment.