greenboost-gaming-suite
LOW
maintainer QiE2035
0 votes
scanned 2026-09-23 15:40:39.984319
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: qie2035 <qie2035@users.noreply.github.com>
2
#
3
# GreenBoost Gaming Suite, packaged from the upstream v0.2 tag.
4
#
5
# Notes for future maintainers:
6
#
7
# * The Vulkan layer MUST be built with `make vulkan`, not with the compile
8
# line upstream's own install.sh uses. install.sh links only
9
# greenboost_vulkan_layer.c, leaving nis_*_spv_* and gb_hud_spv_* undefined;
10
# the resulting .so fails dlopen() and the layer silently never loads.
11
# `make vulkan` embeds the SPIR-V blobs (nis_blobs.S / hud_blobs.S) and
12
# needs the NIS shader source at ../NVIDIAImageScaling/NIS/NIS_Main.glsl,
13
# which prepare() unpacks next to the source tree.
14
#
15
# * install.sh itself is deliberately NOT shipped or run here: it requires
16
# root, installs OS packages, writes to /usr/local, runs groupadd and
17
# regenerates initramfs images. Everything it does is reproduced below
18
# into $pkgdir, and the GUI's layer-install buttons are redirected to the
19
# package manager by arch-packaged-paths.patch.
20
#
21
# * Upstream's initramfs exclusion hooks (initramfs-tools/dracut) are not
22
# packaged: mkinitcpio only copies systemd.conf and 20-systemd-stub.conf
23
# into the image, so /usr/lib/tmpfiles.d/greenboost-gaming.conf never
24
# reaches early userspace on Arch and there is nothing to exclude it from.
25
pkgname=greenboost-gaming-suite
26
pkgver=0.2
27
pkgrel=3
28
pkgdesc="Gaming optimisation suite for GreenBoost: Vulkan and OpenGL memory-tiering layers, a GUI for DLSS/power/display profiles, and Steam Proton integration"
29
arch=('x86_64')
30
url="https://gitlab.com/IsolatedOctopi/greenboost_gaming_suite"
31
# Upstream's SPDX headers (27 files) are GPL-2.0-only and the README says
32
# "GPL v2"; its LICENSE additionally permits per-file MIT and frames the
33
# combined work as dual MIT/GPLv2-compatible. Distribution of the whole
34
# package is therefore under GPL-2.0-only; the LICENSE text is installed
35
# verbatim for the per-file details.
36
license=('GPL-2.0-only')
37
install="${pkgname}.install"
38
39
depends=(
40
'python' # gb_gaming backend, fan daemon, Proton wrapper
41
'vulkan-icd-loader' # consumes the implicit-layer manifest
42
'gtk3'
43
'webkit2gtk-4.1' # Tauri WebView runtime
44
'libsoup3'
45
'libayatana-appindicator' # system tray icon
46
'python-gobject' # gi: GNOME/Wayland VRR and display settings
47
'polkit' # pkexec helpers
48
'sudo' # sudo -n helpers (fan/power control)
49
)
50
makedepends=(
51
'git' # the Proton wrapper's syntax gate
52
'gcc'
53
'pkgconf' # Makefile probes `pkg-config --variable=includedir vulkan`
54
'nodejs'
55
'npm'
56
'rust' # provides cargo
57
'shaderc' # glslc, for the NIS and HUD SPIR-V blobs
58
'vulkan-headers'
59
)
60
checkdepends=('python-pytest')
61
optdepends=(
62
'greenboost: memory tiering / VRAM inflation (kernel module + CUDA shim); without it the layers still load but the tier pool stays inert'
63
'nvidia-utils: NVML for fan curves, power and clock limits, live GPU stats'
64
'steam: deploy the bundled Proton compatibility tool'
65
'mangohud: memory-tier occupancy shown in the game overlay'
66
)
67
68
source=(
69
# GitLab's archive keeps the tag's "v" in its top-level directory, so the
70
# extracted tree is greenboost_gaming_suite-v${pkgver}.
71
"${url}/-/archive/v${pkgver}/greenboost_gaming_suite-v${pkgver}.tar.gz"
72
"NVIDIAImageScaling-1.0.3.tar.gz::https://github.com/NVIDIAGameWorks/NVIDIAImageScaling/archive/refs/tags/v1.0.3.tar.gz"
73
"arch-packaged-paths.patch"
74
"arch-proton-gb-gaming-paths.patch"
75
)
76
sha256sums=(
77
'f5387243bc769563eb1ebe79123c1034acb14f8023a83584cefd0d47b70f6faa'
78
'e34a67c5cc3459476d12c440845dcaf1210e92b89f8876069107973d88d944e1'
79
'7703cd99867a249d10fdabf9738930a5db0a9def78578a156205ba09d3252873'
80
'3abb6a932a8e9e6cc1379363d42834a2d4acae993be8f48a61ddf83bcdf625e8'
81
)
82
83
prepare() {
84
# The Makefile resolves NIS_SRC as $(CURDIR)/../NVIDIAImageScaling/NIS/NIS_Main.glsl,
85
# so the shader SDK has to sit one level above the extracted source tree.
86
rm -rf "$srcdir/NVIDIAImageScaling"
87
mv "$srcdir/NVIDIAImageScaling-1.0.3" "$srcdir/NVIDIAImageScaling"
88
89
cd "$srcdir/greenboost_gaming_suite-v${pkgver}"
90
patch -p1 -i "$srcdir/arch-packaged-paths.patch"
91
patch -p1 -i "$srcdir/arch-proton-gb-gaming-paths.patch"
92
}
93
94
build() {
95
cd "$srcdir/greenboost_gaming_suite-v${pkgver}"
96
97
# C layers. -march=native / -C target-cpu=native are intentionally NOT used
98
# (upstream's install.sh uses both): packages have to stay portable.
99
make vulkan
100
make gl
101
102
# Tauri GUI (React frontend -> dist/, then the Rust binary).
103
cd src
104
npm ci --no-fund --no-audit
105
npm run build
106
cd src-tauri
107
108
# tauri/custom-protocol is what makes the generated context embed ../dist
109
# instead of pointing the webview at tauri.conf.json's devUrl. The macro
110
# decides with `dev: cfg!(not(feature = "custom-protocol"))`, and the app
111
# crate declares no [features] of its own, so it has to be enabled through
112
# the dependency. Without it the GUI starts and shows only
113
# "Could not connect to localhost: Connection refused".
114
cargo build --release --locked --features tauri/custom-protocol
115
116
# Hard guard: prove the frontend really was embedded. dist/index.html names
117
# its hashed bundles, and Tauri keeps asset *keys* (the request paths)
118
# uncompressed even though it brotli-compresses asset bodies, so at least one
119
# of those paths must appear in the binary. The devUrl string cannot be used
120
# for this: the whole tauri.conf.json is embedded in both dev and release
121
# builds, so it is present either way (a false positive that hid this bug).
122
local _asset _embedded=0
123
for _asset in $(grep -oE 'assets/[A-Za-z0-9._-]+\.(js|css)' ../dist/index.html | sort -u); do
124
grep -aq "$_asset" target/release/tauri-app && _embedded=$((_embedded + 1))
125
done
126
if (( _embedded == 0 )); then
127
echo "ERROR: no frontend bundle path found inside target/release/tauri-app;" >&2
128
echo " the tauri/custom-protocol feature did not take effect." >&2
129
exit 1
130
fi
131
}
132
133
check() {
134
cd "$srcdir/greenboost_gaming_suite-v${pkgver}"
135
python -m pytest tests/ -q
136
# Static guard that the layer manifest keeps disable_environment and that the
137
# HOOK macro still compares against real vk* names.
138
bash tests/run_layer_contract_test.sh
139
}
140
141
package() {
142
cd "$srcdir/greenboost_gaming_suite-v${pkgver}"
143
144
# ── Vulkan implicit layer + OpenGL interposer ──────────────────────
145
install -Dm755 libVkLayer_greenboost.so "$pkgdir/usr/lib/libVkLayer_greenboost.so"
146
install -Dm755 libgb_gl.so "$pkgdir/usr/lib/libgb_gl.so"
147
148
# Manifest mirroring upstream's write_layer_manifest(), with library_path
149
# pointing at /usr/lib. disable_environment is mandatory: without it the
150
# Vulkan loader treats the manifest as malformed and skips the layer.
151
install -d "$pkgdir/usr/share/vulkan/implicit_layer.d"
152
cat > "$pkgdir/usr/share/vulkan/implicit_layer.d/VkLayer_greenboost.json" <<'MANIFEST'
153
{
154
"file_format_version": "1.0.0",
155
"layer": {
156
"name": "VK_LAYER_GREENBOOST_memory",
157
"type": "GLOBAL",
158
"library_path": "/usr/lib/libVkLayer_greenboost.so",
159
"api_version": "1.3.0",
160
"implementation_version": "1",
161
"description": "GreenBoost virtual VRAM , inflates device-local heap and routes overflow allocations to T2/T3 DDR via DMA-BUF",
162
"enable_environment": {
163
"GREENBOOST_VULKAN": "1"
164
},
165
"disable_environment": {
166
"GREENBOOST_VULKAN_DISABLE": "1"
167
}
168
}
169
}
170
MANIFEST
171
chmod 644 "$pkgdir/usr/share/vulkan/implicit_layer.d/VkLayer_greenboost.json"
172
173
# ── GUI + Python backend ───────────────────────────────────────────
174
# /usr/lib/greenboost-gaming is the layout the Rust frontend (manager.rs,
175
# optimizer.rs) and the shipped polkit/sudoers rules already hard-code.
176
install -Dm755 src/src-tauri/target/release/tauri-app \
177
"$pkgdir/usr/lib/greenboost-gaming/greenboost-gaming-gui"
178
179
install -d "$pkgdir/usr/lib/greenboost-gaming/gb_gaming"
180
install -m644 gb_gaming/*.py "$pkgdir/usr/lib/greenboost-gaming/gb_gaming/"
181
182
# ── launcher ───────────────────────────────────────────────────────
183
install -d "$pkgdir/usr/bin"
184
cat > "$pkgdir/usr/bin/greenboost-gaming" <<'LAUNCHER'
185
#!/usr/bin/env bash
186
# GreenBoost Gaming Suite launcher
187
#
188
# Deliberately does NOT export GREENBOOST_VULKAN=1: the Vulkan layer is
189
# implicit, so setting it here would enable it for this process and therefore
190
# for Steam and everything Steam spawns. The Proton wrapper exports it itself
191
# right before it execs the game, which is the only place that knows it is
192
# looking at a game.
193
export GREENBOOST_ACTIVE=1
194
195
# GDK / Wayland niceties
196
export GDK_BACKEND=${GDK_BACKEND:-wayland,x11}
197
198
# ── NVIDIA + Wayland WebKitGTK quirk ─────────────────────────────────
199
# WebKitGTK's DMA-BUF renderer presents explicit-sync surfaces that the
200
# NVIDIA proprietary driver supplies no acquire point for, so the compositor
201
# kills the client and GTK3 dies with:
202
# Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display.
203
# (upstream trace: wl_display.error(wp_linux_drm_syncobj_surface_v1, 4,
204
# "explicit sync is used, but no acquire point is set"))
205
# Disabling that renderer keeps the GUI usable; see the Tauri issue
206
# tauri-apps/tauri#10702 for the full history.
207
#
208
# This is preferred over __NV_DISABLE_EXPLICIT_SYNC=1 here: that switch is
209
# read by the NVIDIA driver libraries, so Steam and every game launched from
210
# this Suite would inherit it as well. WEBKIT_DISABLE_DMABUF_RENDERER only
211
# affects the webview in this process tree.
212
#
213
# Applied only on Wayland with the proprietary driver loaded, never overrides
214
# a value you set yourself, and GREENBOOST_WEBKIT_GPU=1 opts out completely
215
# (e.g. once a driver or GTK fix lands).
216
if [[ -z "${GREENBOOST_WEBKIT_GPU:-}" && -z "${WEBKIT_DISABLE_DMABUF_RENDERER+x}" ]]; then
217
case "${GDK_BACKEND%%,*}" in
218
wayland|"*"|"")
219
if { [[ -e /sys/module/nvidia ]] \
220
|| [[ -e /sys/module/nvidia_drm ]] \
221
|| [[ -e /proc/driver/nvidia/version ]]; } \
222
&& [[ ! -e /sys/module/nouveau ]]; then
223
export WEBKIT_DISABLE_DMABUF_RENDERER=1
224
fi
225
;;
226
esac
227
fi
228
229
# Enable Proton's Wayland backend when the session is Wayland
230
_XDG="${XDG_SESSION_TYPE:-}"
231
if [[ "$_XDG" == "wayland" ]] || [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
232
export PROTON_ENABLE_WAYLAND=${PROTON_ENABLE_WAYLAND:-1}
233
fi
234
235
APP_LIB_DIR="/usr/lib/greenboost-gaming"
236
237
# The Proton wrapper and the fan daemon import gb_gaming from here as well.
238
export PYTHONPATH="$APP_LIB_DIR:${PYTHONPATH:-}"
239
240
exec "$APP_LIB_DIR/greenboost-gaming-gui" "$@"
241
LAUNCHER
242
chmod 755 "$pkgdir/usr/bin/greenboost-gaming"
243
244
# ── .desktop + icon ────────────────────────────────────────────────
245
# The basename must match APP_ID (tauri.conf.json's identifier), which is
246
# what GTK reports to Wayland as the app_id; GNOME Shell looks up
247
# "<app_id>.desktop" for the running window's icon.
248
install -d "$pkgdir/usr/share/applications"
249
cat > "$pkgdir/usr/share/applications/com.ferran.greenboost-gaming-suite.desktop" <<'DESKTOP'
250
[Desktop Entry]
251
Version=1.0
252
Type=Application
253
Name=GreenBoost Gaming Suite
254
GenericName=Gaming Optimization Suite
255
Comment=Manage Steam games, DLSS/FSR libraries, and GPU profile under GreenBoost
256
Exec=/usr/bin/greenboost-gaming %U
257
Icon=greenboost-gaming
258
Terminal=false
259
Categories=Game;Settings;System;
260
Keywords=greenboost;gaming;steam;proton;dlss;vulkan;vram;gpu;
261
StartupNotify=true
262
StartupWMClass=com.ferran.greenboost-gaming-suite
263
DESKTOP
264
chmod 644 "$pkgdir/usr/share/applications/com.ferran.greenboost-gaming-suite.desktop"
265
266
install -Dm644 src/src-tauri/icons/128x128.png \
267
"$pkgdir/usr/share/icons/hicolor/128x128/apps/greenboost-gaming.png"
268
269
# ── per-game profiles ──────────────────────────────────────────────
270
install -d "$pkgdir/usr/share/greenboost-gaming/profiles/per-game"
271
install -m644 profiles/per-game/*.json \
272
"$pkgdir/usr/share/greenboost-gaming/profiles/per-game/"
273
274
# ── runtime root used by the patched GUI ───────────────────────────
275
# arch-packaged-paths.patch makes gaming_project_root() return
276
# /usr/share/greenboost-gaming when greenboost_proton/install.sh is there,
277
# which is what the GUI's Proton install/uninstall buttons need. The
278
# in-tree install.sh is NOT installed: it needs root and would shadow the
279
# package's own /usr/lib layers from /usr/local.
280
install -d "$pkgdir/usr/share/greenboost-gaming/greenboost_proton"
281
install -m755 greenboost_proton/install.sh "$pkgdir/usr/share/greenboost-gaming/greenboost_proton/install.sh"
282
install -m755 greenboost_proton/proton "$pkgdir/usr/share/greenboost-gaming/greenboost_proton/proton"
283
install -m644 greenboost_proton/gb_proton_main.py \
284
greenboost_proton/compatibilitytool.vdf \
285
greenboost_proton/toolmanifest.vdf \
286
greenboost_proton/version \
287
greenboost_proton/channel \
288
"$pkgdir/usr/share/greenboost-gaming/greenboost_proton/"
289
290
# ── Steam compatibility tools (system-wide) ────────────────────────
291
# Same location the proton-ge-custom-bin AUR package uses. Mirrors
292
# greenboost_proton/install.sh: identical payload in two directories, the
293
# VDF renamed per variant and the channel sidecar preset.
294
local _variant _name _display _dst
295
for _variant in stable experimental; do
296
if [[ "$_variant" == "stable" ]]; then
297
_name="greenboost-proton"
298
_display="GreenBoost Proton"
299
else
300
_name="greenboost-proton-experimental"
301
_display="GreenBoost Proton Experimental"
302
fi
303
_dst="$pkgdir/usr/share/steam/compatibilitytools.d/$_name"
304
install -d "$_dst"
305
install -m755 greenboost_proton/proton "$_dst/proton"
306
install -m644 greenboost_proton/gb_proton_main.py \
307
greenboost_proton/compatibilitytool.vdf \
308
greenboost_proton/toolmanifest.vdf \
309
greenboost_proton/version \
310
"$_dst/"
311
sed -i "s|greenboost-proton|$_name|g; s|GreenBoost Proton|$_display|g" \
312
"$_dst/compatibilitytool.vdf"
313
echo "$_variant" > "$_dst/channel"
314
chmod 644 "$_dst/channel"
315
done
316
317
# ── fan daemon (per-user unit) ─────────────────────────────────────
318
install -Dm644 scripts/gb-gaming-fan-daemon.service \
319
"$pkgdir/usr/lib/systemd/user/gb-gaming-fan-daemon.service"
320
# The unit's PYTHONPATH points at upstream's /usr/local install location,
321
# and its explanatory comment names it too; both have to say /usr/lib here.
322
sed -i -e 's|/usr/local/lib/greenboost-gaming|/usr/lib/greenboost-gaming|g' \
323
-e 's|# bundled gb_gaming package (when installed in /usr/local).|# bundled gb_gaming package (installed at /usr/lib/greenboost-gaming).|' \
324
"$pkgdir/usr/lib/systemd/user/gb-gaming-fan-daemon.service"
325
326
# ── privileged helper rules ────────────────────────────────────────
327
# /usr/share/polkit-1/rules.d is the packaging-friendly location; the rule
328
# already authorises /usr/lib/greenboost-gaming paths.
329
install -Dm644 scripts/60-greenboost-fan.rules \
330
"$pkgdir/usr/share/polkit-1/rules.d/60-greenboost-fan.rules"
331
install -Dm440 scripts/60-greenboost-fan.sudoers \
332
"$pkgdir/etc/sudoers.d/60-greenboost-fan"
333
334
# ── gaming_mode group-write access ─────────────────────────────────
335
install -Dm644 scripts/99-greenboost-gaming.rules \
336
"$pkgdir/usr/lib/udev/rules.d/99-greenboost-gaming.rules"
337
install -Dm644 scripts/greenboost-gaming.tmpfiles.conf \
338
"$pkgdir/usr/lib/tmpfiles.d/greenboost-gaming.conf"
339
# Replaces install.sh's `groupadd -r greenboost`; the pacman sysusers hook
340
# creates the group, which the tmpfiles rule and the udev rule both need.
341
install -d "$pkgdir/usr/lib/sysusers.d"
342
echo 'g greenboost - -' > "$pkgdir/usr/lib/sysusers.d/greenboost-gaming.conf"
343
chmod 644 "$pkgdir/usr/lib/sysusers.d/greenboost-gaming.conf"
344
345
# ── docs + license ─────────────────────────────────────────────────
346
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
347
install -d "$pkgdir/usr/share/doc/$pkgname"
348
install -m644 README.md CHANGELOG.md ARCHITECTURE.md CONTRIBUTING.md \
349
GREENBOOST_PROTON.md DLSS_UPDATER.md \
350
"$pkgdir/usr/share/doc/$pkgname/"
351
install -m644 docs/FEATURES.md \
352
"$pkgdir/usr/share/doc/$pkgname/FEATURES.md"
353
install -m644 greenboost_proton/architecture.md \
354
"$pkgdir/usr/share/doc/$pkgname/greenboost-proton-architecture.md"
355
}
356
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-23 15:40:39 | Low | 1 |