Run the manifest commands without a display
The first deploy to the Steam Frame aborted in install.sh: OVRAS creates its QApplication before it handles --force-install-manifest, and Qt's default platform plugin (xcb) aborts when there is no display, as over SSH. Registering and unregistering draw nothing, so the generated install.sh and uninstall.sh now run them with QT_QPA_PLATFORM=offscreen. The normal start keeps DISPLAY=:0, as rendering needs a real context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,10 @@ cat > "$out/install.sh" <<EOF
|
||||
cd "\$(dirname "\$0")" || exit 1
|
||||
# An update replaces the files of a running instance: stop it first.
|
||||
pkill -f "/$exe( |\\\$)" 2>/dev/null && sleep 1
|
||||
./$exe --force-install-manifest || exit 1
|
||||
# OVRAS creates its QApplication before handling the manifest options, and
|
||||
# Qt's default platform plugin (xcb) aborts without a display, e.g. over SSH.
|
||||
# Registering draws nothing, so use the display-less "offscreen" plugin.
|
||||
QT_QPA_PLATFORM=offscreen ./$exe --force-install-manifest || exit 1
|
||||
# Start now. Over SSH there is no display; Qt needs one even for off-screen
|
||||
# rendering, so use the Frame's (:0).
|
||||
DISPLAY="\${DISPLAY:-:0}" nohup ./$exe >/dev/null 2>&1 &
|
||||
@@ -58,7 +61,8 @@ cat > "$out/uninstall.sh" <<EOF
|
||||
# be deleted afterwards.
|
||||
cd "\$(dirname "\$0")" || exit 1
|
||||
pkill -f "/$exe( |\\\$)" 2>/dev/null
|
||||
exec ./$exe --force-remove-manifest
|
||||
# No display needed for unregistering (see install.sh).
|
||||
exec env QT_QPA_PLATFORM=offscreen ./$exe --force-remove-manifest
|
||||
EOF
|
||||
|
||||
cat > "$out/run.sh" <<EOF
|
||||
|
||||
@@ -172,13 +172,30 @@
|
||||
- **Result:** `APPLICATION_VERSION="5.8.17-release"`, `CMAKE_PROJECT_VERSION=5.8.17`, package
|
||||
`dist/AdvancedSettings-5.8.17-linux-arm64.tar.gz` (3.0 MB).
|
||||
|
||||
### Fix: manifest commands without a display (2026-10-07)
|
||||
|
||||
- **Problem (first deploy to the Frame):** `install.sh` aborted with a core dump in
|
||||
`./AdvancedSettings_app --force-install-manifest`. Log: "could not connect to display",
|
||||
then "no Qt platform plugin could be initialized" (fatal).
|
||||
- **Cause:** `main.cpp` creates the `QApplication` before it handles the manifest options.
|
||||
Qt's default platform plugin (`xcb`) aborts without a display, and over SSH there is
|
||||
none. `install.sh` set `DISPLAY=:0` only for the start, not for registering.
|
||||
`uninstall.sh` (`--force-remove-manifest`) had the same problem.
|
||||
- **Fix (`package-release.sh`, generated scripts only):** both manifest calls run with
|
||||
`QT_QPA_PLATFORM=offscreen`. Registering draws nothing, so it needs no display at all.
|
||||
The normal start keeps `DISPLAY=:0` (`xcb`), because rendering needs a real OpenGL/Vulkan
|
||||
context. No change to the program.
|
||||
- **Result:** package rebuilt (`--no-build`), generated scripts checked with `sh -n`.
|
||||
- **Not tested yet:** the fix itself on the Frame (T1, T11). No local x86 build was at hand
|
||||
for a test without a display.
|
||||
|
||||
### Test checklist on the Frame (step 5)
|
||||
|
||||
Deploy: `build_scripts/steamframe/deploy-to-frame.sh <user>@<frame>` (SteamVR running).
|
||||
|
||||
| # | Check | Criterion | Result |
|
||||
|---|---|---|---|
|
||||
| T1 | `install.sh`: registration works (log: "Manifest reinstalled", via Background) | R2 | open |
|
||||
| T1 | `install.sh`: registration works (log: "Manifest reinstalled", via Background) | R2 | first try failed: abort without a display (fixed, see above); retest open |
|
||||
| T2 | Tab appears in the dashboard, UI correct (OpenGL) | R2, R3 | open |
|
||||
| T3 | `./run.sh vulkan`: UI correct | R3 | open |
|
||||
| T4 | Laser right way up, click, scrolling on several pages (both APIs) | R4 | open |
|
||||
|
||||
Reference in New Issue
Block a user