Compare commits

...

43 commits
dev ... main

Author SHA1 Message Date
NGnius (Graham) bf7b5617b2 Update README 2024-06-13 18:37:46 -04:00
NGnius (Graham) fadf492aac Create PR template 2024-06-13 18:17:42 -04:00
NGnius (Graham) 921f360e9e Add question issue template, update other templates 2024-06-13 18:03:55 -04:00
NGnius (Graham) 1996eb7e16 Merge branch 'dev' 2024-05-08 22:08:05 -04:00
NGnius (Graham) 6b7ce73a24 Merge branch 'dev' 2024-05-07 20:23:24 -04:00
NGnius (Graham) 64dc319223 Merge branch 'dev' 2024-04-25 22:13:24 -04:00
NGnius (Graham) 5f642a33e3 Merge branch 'dev' 2024-04-23 21:15:58 -04:00
NGnius (Graham) 3f3241ed45 Merge branch 'dev' 2024-04-21 20:51:41 -04:00
NGnius (Graham) b100b1f2f2 Update to ryzenadj alt for v0.14.0 2024-04-01 10:04:02 -04:00
NGnius (Graham) f9e384d50c Merge branch 'dev' 2024-03-31 16:31:42 -04:00
NGnius (Graham) d23880bf4d Remove checkboxes in issue templates since they don't save properly 2023-10-30 17:29:02 -04:00
NGnius (Graham) 579ee2ee85 Change sysfuss to online dependency 2023-08-29 19:06:00 -04:00
NGnius (Graham) decc0cd73d Merge branch 'dev' 2023-08-28 17:13:28 -04:00
OlegEnot 3de8a89c9b
uk-UA translation (#113)
* Add files via upload

* Update ru-RU.po

* Update ru-RU.po

Error correction

* Update ru-RU.po

SlowPPT and FastPPT term adaptation according to functionality

* Update ru-RU.po

* Added Ukrainian translation
2023-07-01 01:06:06 +00:00
OlegEnot 94e429e448
ru-RU translation (#112)
* Add files via upload

* Update ru-RU.po

* Update ru-RU.po

Error correction

* Update ru-RU.po

SlowPPT and FastPPT term adaptation according to functionality

* Update ru-RU.po
2023-06-29 00:04:03 +00:00
NGnius (Graham) a7be114fd3
Create FUNDING.yml 2023-06-04 20:44:33 +00:00
NGnius (Graham) 2878232ba4
Update with better checkboxes bug-report.yml 2023-05-25 23:41:30 +00:00
NGnius (Graham) eb4ec05425
Update bug-report.yml 2023-05-25 23:28:20 +00:00
Jesús Rojas 760002f430
Fix DeckyFront End Errorr by bumping DFL to 3.20.7 (#103) 2023-05-13 15:12:58 +01:00
Marco Rodolfi 53f8867372
Added italian translation (#98)
* Added italian translation

* Updated it translation with latest strings
2023-05-02 22:01:45 +00:00
NGnius (Graham) e27b330577 Update bug report versions 2023-04-10 22:29:41 -04:00
NGnius (Graham) 15833c82e9 Merge branch 'dev' 2023-04-05 22:18:47 -04:00
NGnius (Graham) fad17807e2 Merge branch 'dev' 2023-04-05 22:12:43 -04:00
NGnius (Graham) 2c1321b544 Merge branch 'dev' 2023-04-02 22:47:59 -04:00
NGnius (Graham) 2fef0d7dd1 Update translations 2023-04-01 11:06:26 -04:00
NGnius (Graham) c12a944316 Update bug report template for v1.3.0 2023-04-01 10:53:55 -04:00
NGnius (Graham) 74a9b723e6 Merge branch 'main' of https://github.com/NGnius/PowerTools 2023-04-01 10:52:54 -04:00
NGnius (Graham) 68f8bfbc7f Merge branch 'dev' 2023-04-01 10:51:22 -04:00
NGnius (Graham) 1a5a8ca352
Update versions in bug template 2023-03-14 16:02:04 +00:00
NGnius (Graham) 33cd064667 Merge branch 'dev' for v1.2.0 2023-03-04 10:35:30 -05:00
NGnius (Graham) 4bf548152f Merge branch 'dev' 2023-02-10 23:36:40 -05:00
NGnius (Graham) c9557736ef Bump version to v1.1.1 2023-02-10 17:26:16 -05:00
NGnius (Graham) 5a71586095 Merge branch 'dev' 2023-02-10 17:24:30 -05:00
NGnius (Graham) 23cf76f084 Merge branch 'dev' 2023-02-09 23:02:23 -05:00
NGnius (Graham) f879c82f33 Merge branch 'dev' 2023-02-04 16:19:28 -05:00
NGnius (Graham) 05de36a082 Update bug report versions 2023-02-03 17:57:56 -05:00
NGnius (Graham) 1ca1148a4c Merge branch 'dev' 2023-02-03 17:40:03 -05:00
NGnius (Graham) b731ebddc5 Add OS selector to bug report 2023-01-16 17:15:52 -05:00
NGnius (Graham) 5b6c5ec268 Improve templates with better checklist and dropdown checks 2023-01-16 17:02:39 -05:00
NGnius (Graham) ab2eea5fb4 Bump version to 1.0.6 (front) and 1.0.5+1 (back) 2023-01-11 19:58:19 -05:00
NGnius (Graham) bfcdbf8742 Add pnpm lock file to help with ongoing Decky stuff 2023-01-11 19:47:09 -05:00
NGnius (Graham) 0b89ed13ec Use new bug report form 2023-01-02 10:12:35 -05:00
NGnius (Graham) f0862ddd73 (Re)configure branch for release 2022-10-11 17:39:16 -04:00
15 changed files with 189 additions and 68 deletions

2
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,2 @@
github: NGnius
liberapay: NGnius

View file

@ -1,26 +0,0 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Expected Behaviour**
A clear and concise description of what you expected to happen.
**Actual Behaviour**
A clear and concise description of what actually happened.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Screenshots, etc.**
If applicable, add screenshots to help explain your problem.
Please include the log (located at `/tmp/powertools.log`) if possible.
Note: the log is deleted when the device is restarted.

72
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View file

@ -0,0 +1,72 @@
name: "Bug Report"
description: "Report an issue with PowerTools"
labels: "bug"
body:
- type: textarea
id: expected-behaviour
attributes:
label: Expected Behaviour
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: actual-behaviour
attributes:
label: Actual Behaviour
description: A clear and concise description of what actually happened.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behaviour.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '.....'
4. See error......
validations:
required: true
- type: textarea
id: extras
attributes:
label: Anything else?
description: |
Screenshots? Logs? limits_overrides.ron? limits_cache.ron? Anything that will give more context about the problem!
If applicable, add screenshots to help explain your problem.
Please include the log (located at `/tmp/powertools.log`) if possible.
Note: the log is deleted when the device is restarted.
Tip: You can attach files by clicking this area to highlight it and then dragging them in.
validations:
required: false
- type: input
id: version
attributes:
label: Version
description: What version of PowerTools are you using? This is the version beside `Native` near the bottom of the plugin's UI.
validations:
required: true
- type: input
id: platform
attributes:
label: Platform
description: What driver is PowerTools using?
value: SteamDeck
validations:
required: true
- type: dropdown
id: operating-system
attributes:
label: OS
description: On which operating system are you running PowerTools?
options:
- _
- SteamOS 3 (Stable)
- SteamOS 3 (Preview/Beta)
- SteamOS 3 (Main)
- HoloISO
- Not listed
validations:
required: true

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: NGnius
url: https://git.ngni.us/sys/website/wiki#contact-information
about: Repository owner

View file

@ -1,17 +0,0 @@
---
name: Feature Request
about: Suggest a tool to add
title: ''
labels: enhancement
assignees: ''
---
**Describe what you'd like to be able to do**
A clear and concise description of what you want. E.g. I'd like to be able to select how many CPU cores are enabled.
**Describe alternatives you've considered**
A clear and concise description of any alternatives you've considered. E.g. Enabling and disabling CPU cores with another computer connected over SSH.
**Additional context**
Description of how can this be done. E.g. This can be accomplished with `echo {0 or 1} > /sys/devices/system/cpu/cpu{cpu_number}/online`.

View file

@ -0,0 +1,32 @@
name: Feature Request
description: Suggest functionality to add
labels: "enhancement"
body:
- type: textarea
id: feature-description
attributes:
label: Describe what you'd like to be able to do
description: A clear and concise description of what you want.
placeholder: I'd like to be able to ...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternatives you've considered.
placeholder: This can also be done by ... but ...
validations:
required: true
- type: textarea
id: extras
attributes:
label: Anything else?
description: |
Description of how this can be achieved, or other additional context.
If this is related to the UI, consider adding a picture.
Tip: You can attach files by clicking this area to highlight it and then dragging them in.
placeholder: This can be accomplished by doing ...
validations:
required: false

23
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: "Question"
description: "Ask for more information about PowerTools"
labels: "question"
body:
- type: textarea
id: question-elaboration
attributes:
label: Question
description: |
A clear and concise description of what you'd like to know.
Please check the wiki and closed issues to avoid waiting for an answer when you didn't need to.
validations:
required: true
- type: textarea
id: extras
attributes:
label: Extra Info
description: |
Additional context or information which may be helpful when answering your question.
Tip: You can attach files by clicking this area to highlight it and then dragging them in.
validations:
required: false

13
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,13 @@
## Description
A short description of what the PR changes.
If this is a minor change and the commit message(s) explains it well, feel free to delete this section.
## Motivation
Why did you write this PR and/or why should it be accepted.
## Fixes
Please indicate issues that this fixes or addresses here.
If this is a bugfix with no pre-existing issue, please describe the bug here instead.

View file

@ -1,12 +1,12 @@
# PowerTools
<!-- TODO Update badges for new git repo location -->
[![Decky store](https://img.shields.io/badge/dynamic/json?color=blue&label=release&query=%24%5B%3F%28%40.name%3D%3D%27PowerTools%27%29%5D.versions%5B0%5D.name&url=https%3A%2F%2Fplugins.deckbrew.xyz%2Fplugins&style=flat-square)](https://plugins.deckbrew.xyz/)
[![Custom store](https://img.shields.io/badge/dynamic/json?color=blue&label=preview&query=%24%5B%3F%28%40.name%3D%3D%27PowerTools%27%29%5D.versions%5B0%5D.name&url=https%3A%2F%2Fnot-decky-alpha.ngni.us%2Fplugins&style=flat-square)](https://github.com/NGnius/PowerTools/wiki)
[![Custom store](https://img.shields.io/badge/dynamic/json?color=blue&label=preview&query=%24%5B%3F%28%40.name%3D%3D%27PowerTools%27%29%5D.versions%5B0%5D.name&url=https%3A%2F%2Fnot-decky-alpha.ngni.us%2Fplugins&style=flat-square)](https://git.ngni.us/NG-SD-Plugins/PowerTools/wiki)
[![GitHub package.json version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgit.ngni.us%2FNG-SD-Plugins%2FPowerTools%2Fraw%2Fbranch%2Fmain%2Fpackage.json&query=%24.version&style=flat-square&label=local&cacheSeconds=600)](https://git.ngni.us/NG-SD-Plugins/PowerTools/src/branch/main/package.json)
[![Liberapay](https://img.shields.io/liberapay/patrons/NGnius?style=flat-square)](https://liberapay.com/NGnius)
[![GitHub](https://img.shields.io/badge/GPL--3.0-orange?style=flat-square&label=license&cacheSeconds=600)](https://github.com/NGnius/PowerTools/blob/main/LICENSE)
[![GitHub package.json dependency version (local)](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgit.ngni.us%2FNG-SD-Plugins%2FPowerTools%2Fraw%2Fbranch%2Fmain%2Fpackage.json&query=%24..%5B'decky-frontend-lib'%5D&style=flat-square&label=decky-frontend-lib&cacheSeconds=600)](https://github.com/NGnius/PowerTools/blob/main/pnpm-lock.yaml)
[![GitHub](https://img.shields.io/badge/GPL--3.0-orange?style=flat-square&label=license&cacheSeconds=600)](https://git.ngni.us/NG-SD-Plugins/PowerTools/blob/main/LICENSE)
[![GitHub package.json dependency version (local)](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgit.ngni.us%2FNG-SD-Plugins%2FPowerTools%2Fraw%2Fbranch%2Fmain%2Fpackage.json&query=%24..%5B'decky-frontend-lib'%5D&style=flat-square&label=decky-frontend-lib&cacheSeconds=600)](https://git.ngni.us/NG-SD-Plugins/PowerTools/blob/main/pnpm-lock.yaml)
![plugin_demo](./assets/ui.png)
@ -20,24 +20,38 @@ You will need that installed for this plugin to work.
- Enable & disable CPU threads & SMT
- Set CPU frequencies
- Set GPU frequencies and power (fastPPT & slowPPT)
- Cap battery charge rate (when awake)
- Cap battery charge level
- Display supplementary battery info
- Keep settings between restarts (stored in `~/.config/powertools/<gameId>.json`)
- Keep settings between restarts (stored in `~/homebrew/settings/PowerTools/<appId>.ron`)
This plugin is tested on Steam Deck, but is designed to work on other Linux devices as well. Unfortunately I am currently unable to test on other devices.
This plugin is tested on Steam Deck LCD/OLED, but is designed to work on other Linux devices as well. Unfortunately I am currently unable to test on most other devices.
## Install
Please use Decky's [built-in store](https://plugins.deckbrew.xyz/) to install official releases.
If you want to test unstable versions, use [my custom store](https://not-decky-alpha.ngni.us/plugins). If you would like to use an in-development version, feel free to build PowerTools yourself.
## Build
## Build/Deploy
0. Requirements: a functioning Rust toolchain for x86_64-unknown-linux-gnu (or -musl), pnpm, and some tech literacy
1. In a terminal, navigate to the backend directory of this project and run `./build.sh`
2. In the root of this project, run `pnpm run build`
3. Transfer the project (especially dist/ and bin/) to a folder in your Steam Deck's `~/homebrew/plugins` directory
4. Restart Decky with `sudo systemctl restart plugin_loader.service`
## License
This is licensed under GNU GPLv3.
## Contributing
All contributions are welcome!
Anything from a comment on an issue to a new feature pull request will be appreciated by PowerTools's crack team of one (NGnius).
### Translations
Adding new languages and keeping existing language files up to date makes PowerTools more accessible to the majority of the world which doesn't speak English. Take a look at [this comment](https://git.ngni.us/NG-SD-Plugins/PowerTools/issues/9#issuecomment-345) (and the rest of that issue) to get started.
### Code
To prevent spam, this server does not allow regular users to create/fork repositories. Please open an issue [here](https://git.ngni.us/sys/website) to request permission. There's no pressure to actually do anything with that permission, though it may be revoked when the server is running low on space.

20
backend/Cargo.lock generated
View file

@ -891,22 +891,22 @@ dependencies = [
]
[[package]]
name = "libryzenadj"
version = "0.13.0"
name = "libryzenadj-alt"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5bccdf07c3234c06c435648a53d8cb369f76d20e03bb8d2f8c24fb2330efc32"
checksum = "f0a8cc66a7f77b864c2ef014dd9f9a3b03305d9e7f130202ca4addde9bc71f8b"
dependencies = [
"errno",
"libryzenadj-sys",
"libryzenadj-sys-alt",
"num_enum",
"thiserror",
]
[[package]]
name = "libryzenadj-sys"
version = "0.13.0"
name = "libryzenadj-sys-alt"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1de3621be974e892e12d4a07a6a2e32b6a05950759b062d94f5b54f78fabc3a"
checksum = "cb9de62ac92216770e51b5fa0628c22246a23c948e006f4ee65f6b96f6e0dd35"
dependencies = [
"bindgen",
"cmake",
@ -1170,14 +1170,14 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "powertools"
version = "2.0.3-alpha1"
version = "2.0.3"
dependencies = [
"async-trait",
"chrono",
"clap",
"community_settings_core",
"libc",
"libryzenadj",
"libryzenadj-alt",
"limits_core",
"log",
"regex",
@ -1482,6 +1482,8 @@ dependencies = [
[[package]]
name = "smokepatio"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3416e8c907d171c4334df3933873c32bff97ca5ad7ae0ee93e6268e04e2041ef"
dependencies = [
"embedded-io",
"log",

View file

@ -1,6 +1,6 @@
[package]
name = "powertools"
version = "2.0.3-alpha1"
version = "2.0.3"
edition = "2021"
authors = ["NGnius (Graham) <ngniusness@gmail.com>"]
description = "Backend (superuser) functionality for PowerTools"
@ -31,7 +31,7 @@ limits_core = { version = "3", path = "./limits_core" }
regex = "1"
# steam deck libs
smokepatio = { version = "0.2", default-features = false, path = "../../smokepatio" }
smokepatio = { version = "0.2", default-features = false }
libc = "0.2"
# online settings
@ -40,7 +40,7 @@ chrono = { version = "0.4", features = [ "serde" ] }
# hardware enablement
#libryzenadj = { version = "0.14", path = "../../libryzenadj-rs-14" }
libryzenadj = { version = "0.13" }
libryzenadj-alt = { version = "0.14" }
# ureq's tls feature does not like musl targets
ureq = { version = "2", features = ["json", "gzip", "brotli", "charset", "tls"], default-features = false, optional = true }

View file

@ -1,4 +1,4 @@
use libryzenadj::RyzenAdj;
use libryzenadj_alt::RyzenAdj;
use std::sync::Mutex;
use crate::persist::GpuJson;
@ -22,9 +22,9 @@ fn msg_or_err<D: std::fmt::Display, E: std::fmt::Display>(
fn log_capabilities(ryzenadj: &RyzenAdj) {
log::info!(
"RyzenAdj v{}.{}.{}",
libryzenadj::libryzenadj_sys::RYZENADJ_REVISION_VER,
libryzenadj::libryzenadj_sys::RYZENADJ_MAJOR_VER,
libryzenadj::libryzenadj_sys::RYZENADJ_MINIOR_VER
libryzenadj_alt::libryzenadj_sys::RYZENADJ_REVISION_VER,
libryzenadj_alt::libryzenadj_sys::RYZENADJ_MAJOR_VER,
libryzenadj_alt::libryzenadj_sys::RYZENADJ_MINIOR_VER
);
#[cfg(feature = "experimental")]
if let Some(x) = ryzenadj.get_init_table_err() {

View file

@ -59,6 +59,7 @@ mod test {
online: status,
clock_limits: None,
governor: "schedutil".to_owned(),
root: Some("/".to_owned()),
}
}
}

View file

@ -1,6 +1,6 @@
{
"name": "PowerTools",
"version": "2.0.3-alpha1",
"version": "2.0.3",
"description": "Power tweaks for power users",
"scripts": {
"build": "shx rm -rf dist && rollup -c",

View file

@ -1,7 +1,7 @@
{
"name": "PowerTools",
"author": "NGnius",
"flags": ["root", "_debug", "global-dfl"],
"flags": ["root", "global-dfl"],
"publish": {
"discord_id": "106537989684887552",
"description": "Power tweaks for power users",