Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev-i386 libxcb1-dev python3-venv python3-dev \
gcc-multilib libc6-dev-i386 python3-venv python3-dev \
flatpak ostree

- name: Get version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends gcc-multilib libc6-dev-i386 libxcb1-dev
sudo apt-get install -y --no-install-recommends gcc-multilib libc6-dev-i386

- name: Setup Rust
id: setup-rust
Expand Down Expand Up @@ -62,17 +62,17 @@ jobs:

- name: Compile sources
id: compile-sources
run: python -m compileall -q volt-gui
run: python -m compileall -q src/volt-gui

- name: Import pure modules
id: import-modules
run: cd volt-gui && python -c "import probe, profiles, presets, database"
run: cd src/volt-gui && python -c "import probe, profiles, presets, database"

- name: Check version sync
id: check-version
shell: bash
run: |
layer=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)
gui=$(cd volt-gui && python -c "import database; print(database.APP_VERSION)")
gui=$(cd src/volt-gui && python -c "import database; print(database.APP_VERSION)")
echo "layer=${layer} gui=${gui}"
test "${layer}" = "${gui}"
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[package]
name = "volt"
version = "2.1.1"
version = "2.2.0"
edition = "2021"
rust-version = "1.85.1"

[lib]
name = "volt"
crate-type = ["cdylib", "rlib"]
path = "volt/lib.rs"
path = "src/volt/lib.rs"

[[bin]]
name = "volt"
path = "volt/volt.rs"
path = "src/volt/volt.rs"

[[bin]]
name = "volt-probe"
path = "volt-probe/volt-probe.rs"
path = "src/volt-probe/volt-probe.rs"

[dependencies]
libc = "0.2"
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ PROBE := $(TARGET_DIR)/$(TRIPLE_64)/release/volt-probe
GUI_BIN := $(BIN_DIR)/volt-gui
DESKTOP := $(SHARE_DIR)/$(DESKTOP_FILE)

RUST_SOURCES := Cargo.toml Cargo.lock $(wildcard volt/*.rs) $(wildcard volt-probe/*.rs)
GUI_SOURCES := $(wildcard volt-gui/*.py)
RUST_SOURCES := Cargo.toml Cargo.lock $(wildcard src/volt/*.rs) $(wildcard src/volt-probe/*.rs)
GUI_SOURCES := $(wildcard src/volt-gui/*.py)
VENV_STAMP := $(OUT)/.venv

DESKTOP_NAME := volt-gui
Expand All @@ -95,7 +95,7 @@ CONTAINER_STAMP := $(OUT)/.container-image

NO_SUDO = @test -z "$$SUDO_USER" || { echo "error: do not build with sudo — run 'make' as your user, then 'sudo make install'"; exit 1; }

DIST_TREES := Cargo.toml Cargo.lock volt volt-probe volt-gui images flatpak container .github
DIST_TREES := Cargo.toml Cargo.lock src images flatpak container .github

ifeq ($(DESTDIR),)
ROOT_GUARD := check-root
Expand Down Expand Up @@ -183,7 +183,7 @@ $(GUI_BIN): $(GUI_SOURCES) $(VENV_STAMP) | $(BIN_DIR) $(OUT)/pyinstaller
$(NO_SUDO)
$(VENV)/bin/pyinstaller --onefile --name=$(@F) -y --log-level WARN \
--distpath $(BIN_DIR) --workpath $(OUT)/pyinstaller --specpath $(OUT)/pyinstaller \
volt-gui/volt-gui.py
src/volt-gui/volt-gui.py

$(DESKTOP): Makefile | $(SHARE_DIR)
@printf '%s\n' \
Expand Down Expand Up @@ -231,7 +231,7 @@ $(DIST_STAMP): $(GUI_BIN) \
install -Dm644 README.md $(DIST)/README.md
install -Dm644 requirements.txt $(DIST)/requirements.txt
cp -r $(DIST_TREES) $(DIST)/
rm -rf $(DIST)/volt/target
rm -rf $(DIST)/src/volt/target
mkdir -p $(DIST)/build/bundles
cp $(FLATPAK_BUNDLES) $(DIST)/build/bundles/
touch $(DIST)/build/.venv
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Settings are read once at game start. Press Apply, then restart the game.

### The probe

volt-gui runs `volt-probe` under the profile you are editing. It opens a 1px window that is never mapped, creates a surface, swapchain and sampler, records what the device reported, and exits. Nothing appears on screen.
volt-gui runs `volt-probe` under the profile you are editing. For each backend it can reach it opens a 1px window that is never mapped and creates a surface and swapchain; it creates one sampler, records what the device reported, and exits. Nothing appears on screen.

```
volt --probe myprofile -- volt-probe
```

It uses X11, which every desktop has through XWayland. Games may open Wayland or gamescope surfaces instead, and the profile is written before volt knows which. This only affects present modes, image counts and alpha modes, and the lists mostly agree. Where they don't, the layer handles it at runtime: image count is clamped against the real surface, and a rejected present or alpha mode leaves the game's value with a warning.
It opens X11 and Wayland, each through a library loaded at runtime, so a machine missing one reports the other and a machine missing both leaves those settings on `default`. This only affects present modes, image counts and alpha modes. The file carries one section per backend that opened, and the card offers the union with every value naming the backends that reported it: `mailbox (xcb, wayland)`, `immediate (xcb)`. The tag is a label only, profiles store the value. Games may open gamescope or a Flatpak surface instead, and where the game's surface refuses a value the layer handles it at runtime: image count is clamped against the real surface, and a rejected present or alpha mode leaves the game's value with a warning.

### GPU

Expand Down Expand Up @@ -178,7 +178,7 @@ volt-gui is the PySide6 front end. Apply just saves the profile. No elevated per
| GUI | Python 3.10+, PySide6 |
| Flatpak bundles | `flatpak`, `ostree` |
| Container release | `podman` or `docker` |
| Probe build | `libxcb` headers |
| Probe | `libxcb` or `libwayland-client` at runtime, neither required |

No native aarch64 build. See [FEX-Emu / Box64](#fex-emu--box64).

Expand Down Expand Up @@ -416,7 +416,7 @@ There's no environment override for the settings themselves. A profile file is t
|------|------------|
| `~/.config/volt-gui/default.toml` | default profile |
| `~/.config/volt-gui/<name>.toml` | named profiles |
| `~/.config/volt-gui/probe.toml` | what the last probe read |
| `~/.config/volt-gui/probe.toml` | what the last probe read, one section per backend |
| `~/.config/volt-gui/options.toml` | volt-gui preferences and last active profile |

Profiles are plain TOML, one section per tab and one string per setting, so you can edit them by hand or keep them in a dotfiles repo. `probe.toml` is written by the layer and watched by the GUI, so a freshly probed device fills the panel without a restart. Deleting it costs a re-probe.
Expand Down Expand Up @@ -472,7 +472,7 @@ Your home directory is mounted into the sandbox, so profiles apply unchanged.

**Presets** fill the active profile with curated values, from Quality (trilinear, 16x anisotropy, blended mips, classic vsync) down to Potato Low Latency (bilinear, anisotropy off, hard mip cuts, immediate present, 2 images). A preset writes every value, so anything it doesn't set goes back to default. Frame limit, composite alpha and clipped presentation are left alone since those depend on your display. A preset naming something your hardware lacks resets that one to default and says which.

**Options** holds volt-gui's own preferences, not anything the layer reads: theme, transparency, scale, start maximised or in tray, tray icon, welcome window. They save as you change them and take effect on restart. One instance at a time.
**Options** holds volt-gui's own preferences, not anything the layer reads: theme, transparency, display backend, scale, start maximised or in tray, tray icon, welcome window. They save as you change them and take effect on restart. One instance at a time.

## What volt will never do

Expand Down
1 change: 0 additions & 1 deletion container/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ FROM ${BASE}
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev-i386 \
libxcb1-dev \
python3 python3-venv python3-dev \
flatpak ostree \
ca-certificates make \
Expand Down
10 changes: 8 additions & 2 deletions volt-gui/database.py → src/volt-gui/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from probe import shading_options


APP_VERSION: Final[str] = "2.1.1"
APP_VERSION: Final[str] = "2.2.0"
APP_AUTHOR: Final[str] = "pythonlover02"
APP_LICENSE: Final[str] = "GPL 3.0 License"
APP_DESCRIPTION: Final[str] = "My AMD Adrenaline / NVIDIA Settings Linux Alternative"
Expand Down Expand Up @@ -173,9 +173,15 @@
"options": (DEFAULT_VALUE, "cachyos", "amd", "intel", "nvidia"),
"fallback": "cachyos",
},
"qt_platform": {
"label": "Display Backend Preference",
"description": "Which Qt platform plugin the interface prefers. default lets Qt pick: wayland on a Wayland session, xcb on X11. Either choice falls back to the other where the one you pick is unavailable, so xcb on a session without XWayland still opens a window. Takes effect on program restart.",
"options": (DEFAULT_VALUE, "xcb", "wayland"),
"fallback": "",
},
"window_transparency": {
"label": "Window Transparency",
"description": "Window background transparency. default is off. Takes effect on program restart.",
"description": "Window background transparency. default is off. Only does something under xcb: Wayland has no window opacity protocol, so set Display Backend Preference to xcb for this to land. Takes effect on program restart.",
"options": (DEFAULT_VALUE, "on", "off"),
"fallback": "off",
},
Expand Down
File renamed without changes.
Loading
Loading