[Bug]: HDMI Video and Audio Support #63

Open
opened 2026-06-28 13:48:28 +00:00 by ssmithx · 1 comment
Collaborator

Description

HDMI Video and Audio support

Steps to Reproduce

Plug in HDMI

Expected Behavior

Archy switches over to full screen HDMI only and disabled laptop display

Actual Behavior

Nothing

Archipelago Version

1.7.99-alpha

Hardware

x86_64 (Intel/AMD)

Relevant Logs

No response

Screenshots

No response

### Description HDMI Video and Audio support ### Steps to Reproduce Plug in HDMI ### Expected Behavior Archy switches over to full screen HDMI only and disabled laptop display ### Actual Behavior Nothing ### Archipelago Version 1.7.99-alpha ### Hardware x86_64 (Intel/AMD) ### Relevant Logs _No response_ ### Screenshots _No response_
ssmithx changed title from [Bug]: to [Bug]: HDMI Video and Audio Support 2026-06-28 14:07:10 +00:00
Author
Collaborator

HDMI Kiosk Fix — 2026-06-28

Problems Fixed

1. Screen running off the edge (wrong resolution)

Cause: Launcher picked the current xrandr mode (*-marked) instead of the highest available.
Fix: /usr/local/bin/archipelago-kiosk-launcher:36-45 — mode selection now picks the resolution with the most pixels (1920x1080) instead of the previously active mode (1366x768).

2. No audio over HDMI

Causes:

  • Chromium had no XDG_RUNTIME_DIR → couldn't find PulseAudio socket
  • ALSA default device pointed to analog (PCH) card, not PulseAudio
  • Chromium blocks audio autoplay by default

Fixes:

  • /usr/local/bin/archipelago-kiosk-launcher:86 — added XDG_RUNTIME_DIR=/run/user/1000 to chromium env
  • /etc/asound.conf — routes ALSA default through PulseAudio
  • /usr/local/bin/archipelago-kiosk-launcher:104 — added --autoplay-policy=no-user-gesture-required

3. Choppy audio (CPU starvation)

Causes:

  • GPU process spun at 55–77% CPU on Intel HD 5500 under X11 (--enable-gpu-rasterization forced GPU commands through software)
  • CPUQuota=75% (= 0.75 cores) was too low — kiosk throttled 40% of the time (862s total)
  • Two renderer raster threads contended for CPU

Fixes:

  • /usr/local/bin/archipelago-kiosk-launcher:83GPU_FLAGS="--in-process-gpu --num-raster-threads=1" (eliminates separate GPU process)
  • /usr/local/bin/archipelago-kiosk-launcher:93 — added GpuRasterization to --disable-features
  • /etc/systemd/system/archipelago-kiosk.service:29CPUQuota=200% (2 cores, down from 40% to 19% throttled)

Files Changed

File Change
/etc/asound.conf Created — routes ALSA default → PulseAudio
/etc/systemd/system/archipelago-kiosk.service CPUQuota=75%CPUQuota=200%
/usr/local/bin/archipelago-kiosk-launcher Mode picks highest res; XDG_RUNTIME_DIR; --in-process-gpu; --num-raster-threads=1; GpuRasterization disabled; --autoplay-policy

Verification

# Resolution
DISPLAY=:0 xrandr --current | grep HDMI

# Default audio sink
pactl info | grep "Default Sink"

# Audio test
XDG_RUNTIME_DIR=/run/user/1000 speaker-test -D default -c 2 -l 1

# CPU throttling
cat /sys/fs/cgroup/system.slice/archipelago-kiosk.service/cpu.stat
# HDMI Kiosk Fix — 2026-06-28 ## Problems Fixed ### 1. Screen running off the edge (wrong resolution) **Cause:** Launcher picked the current xrandr mode (`*`-marked) instead of the highest available. **Fix:** `/usr/local/bin/archipelago-kiosk-launcher:36-45` — mode selection now picks the resolution with the most pixels (1920x1080) instead of the previously active mode (1366x768). ### 2. No audio over HDMI **Causes:** - Chromium had no `XDG_RUNTIME_DIR` → couldn't find PulseAudio socket - ALSA `default` device pointed to analog (PCH) card, not PulseAudio - Chromium blocks audio autoplay by default **Fixes:** - `/usr/local/bin/archipelago-kiosk-launcher:86` — added `XDG_RUNTIME_DIR=/run/user/1000` to chromium env - `/etc/asound.conf` — routes ALSA `default` through PulseAudio - `/usr/local/bin/archipelago-kiosk-launcher:104` — added `--autoplay-policy=no-user-gesture-required` ### 3. Choppy audio (CPU starvation) **Causes:** - GPU process spun at 55–77% CPU on Intel HD 5500 under X11 (`--enable-gpu-rasterization` forced GPU commands through software) - `CPUQuota=75%` (= 0.75 cores) was too low — kiosk throttled 40% of the time (862s total) - Two renderer raster threads contended for CPU **Fixes:** - `/usr/local/bin/archipelago-kiosk-launcher:83` — `GPU_FLAGS="--in-process-gpu --num-raster-threads=1"` (eliminates separate GPU process) - `/usr/local/bin/archipelago-kiosk-launcher:93` — added `GpuRasterization` to `--disable-features` - `/etc/systemd/system/archipelago-kiosk.service:29` — `CPUQuota=200%` (2 cores, down from 40% to 19% throttled) ## Files Changed | File | Change | |------|--------| | `/etc/asound.conf` | **Created** — routes ALSA `default` → PulseAudio | | `/etc/systemd/system/archipelago-kiosk.service` | `CPUQuota=75%` → `CPUQuota=200%` | | `/usr/local/bin/archipelago-kiosk-launcher` | Mode picks highest res; `XDG_RUNTIME_DIR`; `--in-process-gpu`; `--num-raster-threads=1`; `GpuRasterization` disabled; `--autoplay-policy` | ## Verification ```bash # Resolution DISPLAY=:0 xrandr --current | grep HDMI # Default audio sink pactl info | grep "Default Sink" # Audio test XDG_RUNTIME_DIR=/run/user/1000 speaker-test -D default -c 2 -l 1 # CPU throttling cat /sys/fs/cgroup/system.slice/archipelago-kiosk.service/cpu.stat ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lfg2025/archy#63
No description provided.