Improve SteamOS/GPU detection and Linux packaging

Enhances GPU flag handling for SteamOS and Gamescope by adding early detection and flag injection in main.js. Updates the README with clearer SteamOS instructions, adds a SteamOS-optimized .desktop file, and improves Linux packaging options in package.json for AppImage and deb targets with appropriate flags and metadata.
This commit is contained in:
2025-12-28 11:42:52 +13:00
parent 27cb97ac00
commit a92e3e4652
4 changed files with 112 additions and 14 deletions
+21 -13
View File
@@ -21,27 +21,35 @@ This is caused by GPU compositing conflicts between Electron's Chromium renderer
### Solution
**Option 1: Automatic Detection (Recommended)**
The latest version of Nebula automatically detects SteamOS/Gamescope and applies the necessary fixes. Simply update to the latest version.
**Automatic Detection (v1.3.3+)**
The latest version of Nebula automatically detects SteamOS/Gamescope and applies the necessary fixes in both development and packaged builds.
**For AppImage/Packaged Builds:**
If the automatic detection isn't working, you can launch the AppImage with flags:
**Option 2: Manual Launch Script**
Use the provided `start-steamos.sh` script:
```bash
chmod +x start-steamos.sh
./start-steamos.sh
# Run the AppImage with SteamOS flags
./Nebula-*.AppImage --ozone-platform=x11 --disable-gpu-compositing --disable-gpu-vsync --no-sandbox --disable-dev-shm-usage --disable-features=VizDisplayCompositor
```
**Option 3: Command-line Flags**
If running manually, add these flags:
**Create a custom .desktop file:**
Copy `nebula-steamos.desktop` to `~/.local/share/applications/` for a Steam Deck optimized launcher:
```bash
electron . --ozone-platform=x11 --disable-gpu-compositing --disable-gpu-vsync --no-sandbox --disable-dev-shm-usage
cp nebula-steamos.desktop ~/.local/share/applications/
```
**Option 4: Environment Variable**
Set the `ELECTRON_OZONE_PLATFORM_HINT` environment variable:
**For Development:**
```bash
export ELECTRON_OZONE_PLATFORM_HINT=x11
npm start
npm run start:steamos
```
**Environment Variable Override:**
You can force SteamOS mode by setting an environment variable:
```bash
export SteamDeck=1
./Nebula-*.AppImage
```
## Linux (General)