Add runtime status checker + headless/X11 docs; distro-support refinements
- status.sh: runtime health check (service state, boot wiring, display backend auto-detect, encoder, ports, web UI, /dev/uinput, pairing) ending in a g2g verdict or concrete TODO list
- docs: TROUBLESHOOTING §12 (headless graphical-session.target boot trap) + §13 (X11/NVENC path & stale wlr drop-in env conflict); ARCHITECTURE capture-backend comparison; FOLLOWUPS P3 (installer X11/Ubuntu support); README diagnostics pointer
- lib/{config,packages,permissions,service}.sh, files/sway-headless.service: in-progress Debian/Ubuntu + headless support refinements
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,11 +108,11 @@ _ubuntu_sunshine_deb_url() {
|
||||
}
|
||||
|
||||
_install_sunshine_debian() {
|
||||
# Universal runtime deps. libva-utils gives `vainfo`; jq is used by hooks.
|
||||
# Universal runtime deps. vainfo is what Ubuntu calls libva-utils on Arch.
|
||||
# pipewire-pulse is the Ubuntu 24.04+ default audio path; on older releases
|
||||
# `pulseaudio-utils` works too — we don't force the codename split since
|
||||
# sunshine just needs *a* PulseAudio API endpoint.
|
||||
pkg_install jq vulkan-tools libva-utils curl ca-certificates
|
||||
pkg_install jq vulkan-tools vainfo curl ca-certificates
|
||||
|
||||
if pkg_installed sunshine; then
|
||||
ok "sunshine already installed (dpkg)"
|
||||
@@ -198,15 +198,36 @@ install_gpu_encoder_packages() {
|
||||
yay_install intel-media-driver vulkan-intel
|
||||
;;
|
||||
debian:nvidia)
|
||||
# On Ubuntu, the proprietary driver is usually already installed via
|
||||
# `ubuntu-drivers autoinstall` or the Server install path. Don't force a
|
||||
# specific nvidia-* version — they vary by release / driver branch.
|
||||
# Pull only the userspace VAAPI bridge if available; harmless if missing.
|
||||
pkg_install libnvidia-encode-no-dkms 2>/dev/null \
|
||||
|| pkg_install libnvidia-encode-575 2>/dev/null \
|
||||
|| pkg_install libnvidia-encode-565 2>/dev/null \
|
||||
|| pkg_install libnvidia-encode-560 2>/dev/null \
|
||||
|| info "NVENC userspace library not found via a known package name — relying on the existing driver install."
|
||||
# Ubuntu's nvidia-driver-NNN(-server) metapackage pulls in the matching
|
||||
# libnvidia-encode-NNN(-server) as a dependency, so NVENC is normally
|
||||
# already present. Only intervene if it's missing — and derive the right
|
||||
# package name from the loaded driver's major version instead of
|
||||
# guessing.
|
||||
if dpkg-query -W -f='${Status}\n' 'libnvidia-encode-*' 2>/dev/null \
|
||||
| grep -q '^install ok installed$'; then
|
||||
ok "NVENC runtime library already installed via the driver metapackage"
|
||||
else
|
||||
local drv_major drv_full
|
||||
drv_full="$(nvidia-smi --query-gpu=driver_version --format=csv,noheader,nounits 2>/dev/null | head -n1)"
|
||||
drv_major="${drv_full%%.*}"
|
||||
if [[ -z "$drv_major" ]]; then
|
||||
warn "Could not detect NVIDIA driver version; NVENC may be missing."
|
||||
else
|
||||
# Try -server first (cloud GPUs usually run server branches), then the
|
||||
# consumer branch. Stop at the first one apt knows about.
|
||||
local picked=""
|
||||
for cand in "libnvidia-encode-${drv_major}-server" "libnvidia-encode-${drv_major}"; do
|
||||
if apt-cache show "$cand" >/dev/null 2>&1; then
|
||||
picked="$cand"; break
|
||||
fi
|
||||
done
|
||||
if [[ -n "$picked" ]]; then
|
||||
pkg_install "$picked"
|
||||
else
|
||||
warn "No libnvidia-encode-${drv_major}* package in apt — install it manually if NVENC fails."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
debian:amd)
|
||||
pkg_install mesa-va-drivers mesa-vulkan-drivers vainfo
|
||||
|
||||
Reference in New Issue
Block a user