191 lines
5.7 KiB
Markdown
191 lines
5.7 KiB
Markdown
# Phase 4: Remote Gaming (Sunshine + Moonlight)
|
|
|
|
## Status: 🔄 IN PROGRESS
|
|
|
|
**Last Updated:** 2026-01-19
|
|
|
|
---
|
|
|
|
## Current Progress
|
|
|
|
| Task | Status | Notes |
|
|
|------|--------|-------|
|
|
| Tailscale on Nobara | ✅ Complete | IP: 100.98.57.73 |
|
|
| VA-API verification | ✅ Complete | RX 6600 H.264/HEVC encoding working |
|
|
| Sunshine Flatpak | ❌ Failed | Capture methods incompatible |
|
|
| Native Sunshine | ⏳ Pending | Recommended installation method |
|
|
| Moonlight pairing | ⏳ Pending | Awaiting Sunshine setup |
|
|
|
|
### Verified Hardware
|
|
- **GPU:** AMD Radeon RX 6600M (Navi 23) + AMD Radeon 680M (integrated)
|
|
- **Driver:** Mesa Gallium 25.3.2 (radeonsi, navi23, LLVM 21.1.7)
|
|
- **VA-API:** v1.22 with H.264 and HEVC encode support
|
|
|
|
### Tailscale Network
|
|
| Device | Tailscale IP | Status |
|
|
|--------|--------------|--------|
|
|
| xtrm-pc (Nobara) | 100.98.57.73 | Online |
|
|
| kaloyans-macbook-air | 100.68.118.59 | Online |
|
|
| xtrm-unraid | 100.100.208.70 | Online |
|
|
|
|
### Flatpak Issues Encountered
|
|
The Flatpak version of Sunshine failed due to:
|
|
1. **wlr capture:** Missing wlr-export-dmabuf protocol (KDE Plasma incompatible)
|
|
2. **PipeWire capture:** XDG portal permissions blocked in sandbox
|
|
3. **KMS capture:** Cannot apply setcap to sandboxed binaries
|
|
|
|
**Solution:** Use native DNF installation instead.
|
|
|
|
---
|
|
|
|
## Goal
|
|
Enable low-latency 60FPS game streaming from Nobara Linux (AMD GPU) to MacBook and Android devices, using Tailscale for optimal network pathing.
|
|
|
|
---
|
|
|
|
## Architecture Overview
|
|
|
|
```
|
|
┌─────────────────────────────────┐
|
|
│ Tailscale Mesh Network │
|
|
│ (Encrypted, P2P when possible) │
|
|
└─────────────────┬───────────────┘
|
|
│
|
|
┌────────────────────────────┼────────────────────────────┐
|
|
│ │ │
|
|
▼ ▼ ▼
|
|
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
│ Nobara Gaming PC│ │ MacBook │ │ Android Device │
|
|
│ xtrm-pc │ │ Moonlight Client│ │ Moonlight Client│
|
|
│ 100.98.57.73 │ │ 100.68.118.59 │ │ │
|
|
│ AMD RX 6600 │ │ │ │ │
|
|
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
```
|
|
|
|
---
|
|
|
|
## Installation (Native - Recommended)
|
|
|
|
### Step 1: Remove Flatpak (if installed)
|
|
```bash
|
|
flatpak remove dev.lizardbyte.app.Sunshine -y
|
|
```
|
|
|
|
### Step 2: Install Native Sunshine
|
|
```bash
|
|
sudo dnf copr enable lizardbyte/stable -y
|
|
sudo dnf install sunshine -y
|
|
```
|
|
|
|
### Step 3: Set KMS Capture Permission
|
|
```bash
|
|
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
|
```
|
|
|
|
### Step 4: Enable Service
|
|
```bash
|
|
systemctl --user enable --now sunshine
|
|
```
|
|
|
|
### Step 5: Configure Sunshine
|
|
1. Open https://localhost:47990
|
|
2. Set admin password
|
|
3. Go to Configuration → Video:
|
|
- Encoder: vaapi
|
|
- Adapter: /dev/dri/renderD128
|
|
|
|
---
|
|
|
|
## Moonlight Client Setup
|
|
|
|
### MacBook
|
|
Moonlight already installed. Add PC:
|
|
- Host: 100.98.57.73 (Tailscale IP)
|
|
- Or hostname: xtrm-pc (if MagicDNS enabled)
|
|
|
|
### Pairing
|
|
1. Open Moonlight, add xtrm-pc
|
|
2. Enter 4-digit PIN shown in Moonlight
|
|
3. Input PIN in Sunshine Web UI → PIN Pairing
|
|
|
|
---
|
|
|
|
## VA-API Verification Output
|
|
|
|
```
|
|
vainfo: VA-API version: 1.22 (libva 2.22.0)
|
|
vainfo: Driver version: Mesa Gallium driver 25.3.2 for AMD Radeon RX 6600M
|
|
vainfo: Supported profile and entrypoints
|
|
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
|
|
VAProfileH264Main : VAEntrypointEncSlice
|
|
VAProfileH264High : VAEntrypointEncSlice
|
|
VAProfileHEVCMain : VAEntrypointEncSlice
|
|
VAProfileHEVCMain10 : VAEntrypointEncSlice
|
|
```
|
|
|
|
---
|
|
|
|
## Firewall Configuration (Optional)
|
|
|
|
Restrict Sunshine to Tailscale network only:
|
|
```bash
|
|
sudo firewall-cmd --permanent --zone=trusted --add-source=100.64.0.0/10
|
|
sudo firewall-cmd --permanent --zone=trusted --add-port=47984-48010/tcp
|
|
sudo firewall-cmd --permanent --zone=trusted --add-port=47998-48010/udp
|
|
sudo firewall-cmd --permanent --zone=trusted --add-port=47989-47990/tcp
|
|
sudo firewall-cmd --reload
|
|
```
|
|
|
|
---
|
|
|
|
## Streaming Settings
|
|
|
|
| Setting | LAN Value | Remote Value |
|
|
|---------|-----------|--------------|
|
|
| Bitrate | 50-80 Mbps | 20-40 Mbps |
|
|
| FPS | 60-120 | 60 |
|
|
| Resolution | Native | 1080p |
|
|
| Codec | HEVC | HEVC |
|
|
|
|
---
|
|
|
|
## Verification Checklist
|
|
|
|
- [x] Tailscale running on Nobara: 100.98.57.73
|
|
- [x] VA-API encoding verified: H.264 + HEVC
|
|
- [ ] Sunshine installed (native)
|
|
- [ ] KMS capture working
|
|
- [ ] Sunshine Web UI accessible
|
|
- [ ] Moonlight paired
|
|
- [ ] Desktop streaming works
|
|
- [ ] Game streaming at 60 FPS
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
### Encoder Fails
|
|
```bash
|
|
# Verify VA-API
|
|
vainfo
|
|
|
|
# Check Sunshine logs
|
|
journalctl --user -u sunshine -f
|
|
```
|
|
|
|
### Connection Issues
|
|
```bash
|
|
# Check Tailscale connectivity
|
|
tailscale ping kaloyans-macbook-air
|
|
|
|
# Verify ports
|
|
ss -tlnp | grep sunshine
|
|
```
|
|
|
|
---
|
|
|
|
## Related Documents
|
|
|
|
- [00-CURRENT-STATE.md](./00-CURRENT-STATE.md) - Infrastructure overview
|
|
- [05-PHASE5-RUSTDESK.md](./05-PHASE5-RUSTDESK.md) - RustDesk for general remote access
|