From 41b3e5067704c20c0b12aa1eb20f4c412608c6c5 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:40:58 +0900 Subject: [PATCH] Improve PipeWire reliability --- Dockerfile | 2 +- entrypoint.sh | 2 +- kasmvnc-entrypoint.sh | 2 +- selkies-gstreamer-entrypoint.sh | 2 +- supervisord.conf | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a32a932..5d6761c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -631,7 +631,7 @@ RUN if [ -d "/usr/libexec/sudo" ]; then SUDO_LIB="/usr/libexec/sudo"; else SUDO_ chmod -f 4755 /usr/bin/sudo-root || echo 'Failed to set chmod setuid for root' USER 1000 -ENV PIPEWIRE_LATENCY="32/48000" +ENV PIPEWIRE_LATENCY="128/48000" ENV XDG_RUNTIME_DIR=/tmp/runtime-ubuntu ENV PIPEWIRE_RUNTIME_DIR="${PIPEWIRE_RUNTIME_DIR:-${XDG_RUNTIME_DIR:-/tmp}}" ENV PULSE_RUNTIME_PATH="${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}" diff --git a/entrypoint.sh b/entrypoint.sh index 04161ff..733717d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,7 +33,7 @@ touch /dev/input/js0 /dev/input/js1 /dev/input/js2 /dev/input/js3 || sudo-root t # Set default display export DISPLAY="${DISPLAY:-:20}" # PipeWire-Pulse server socket path -export PIPEWIRE_LATENCY="32/48000" +export PIPEWIRE_LATENCY="128/48000" export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp}" export PIPEWIRE_RUNTIME_DIR="${PIPEWIRE_RUNTIME_DIR:-${XDG_RUNTIME_DIR:-/tmp}}" export PULSE_RUNTIME_PATH="${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}" diff --git a/kasmvnc-entrypoint.sh b/kasmvnc-entrypoint.sh index 71c6119..b35f692 100755 --- a/kasmvnc-entrypoint.sh +++ b/kasmvnc-entrypoint.sh @@ -12,7 +12,7 @@ until [ -d "${XDG_RUNTIME_DIR}" ]; do sleep 0.5; done # Set default display export DISPLAY="${DISPLAY:-:20}" # PipeWire-Pulse server socket path -export PIPEWIRE_LATENCY="32/48000" +export PIPEWIRE_LATENCY="128/48000" export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp}" export PIPEWIRE_RUNTIME_DIR="${PIPEWIRE_RUNTIME_DIR:-${XDG_RUNTIME_DIR:-/tmp}}" export PULSE_RUNTIME_PATH="${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}" diff --git a/selkies-gstreamer-entrypoint.sh b/selkies-gstreamer-entrypoint.sh index dbfdef5..fac6043 100755 --- a/selkies-gstreamer-entrypoint.sh +++ b/selkies-gstreamer-entrypoint.sh @@ -17,7 +17,7 @@ export SDL_JOYSTICK_DEVICE=/dev/input/js0 # Set default display export DISPLAY="${DISPLAY:-:20}" # PipeWire-Pulse server socket path -export PIPEWIRE_LATENCY="32/48000" +export PIPEWIRE_LATENCY="128/48000" export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp}" export PIPEWIRE_RUNTIME_DIR="${PIPEWIRE_RUNTIME_DIR:-${XDG_RUNTIME_DIR:-/tmp}}" export PULSE_RUNTIME_PATH="${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}" diff --git a/supervisord.conf b/supervisord.conf index f963cc2..55b673c 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -92,7 +92,7 @@ priority=10 [program:pipewire] command=bash -c "until [ -S \"/tmp/.X11-unix/X${DISPLAY#*:}\" ]; do sleep 0.5; done; /usr/bin/pipewire" -environment=PIPEWIRE_LATENCY="32/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" +environment=PIPEWIRE_LATENCY="128/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" stdout_logfile=/tmp/pipewire.log stdout_logfile_maxbytes=5MB stdout_logfile_backups=0 @@ -104,7 +104,7 @@ autorestart=true [program:wireplumber] command=bash -c "until [ \"$(echo ${XDG_RUNTIME_DIR}/pipewire-*.lock)\" != \"${XDG_RUNTIME_DIR}/pipewire-*.lock\" ]; do sleep 0.5; done; /usr/bin/wireplumber" -environment=PIPEWIRE_LATENCY="32/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" +environment=PIPEWIRE_LATENCY="128/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" stdout_logfile=/tmp/wireplumber.log stdout_logfile_maxbytes=5MB stdout_logfile_backups=0 @@ -116,7 +116,7 @@ autorestart=true [program:pipewire-pulse] command=bash -c "until [ \"$(echo ${XDG_RUNTIME_DIR}/pipewire-*.lock)\" != \"${XDG_RUNTIME_DIR}/pipewire-*.lock\" ]; do sleep 0.5; done; /usr/bin/pipewire-pulse" -environment=PIPEWIRE_LATENCY="32/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" +environment=PIPEWIRE_LATENCY="128/48000",DISPLAY="%(ENV_DISPLAY)s",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",DBUS_SYSTEM_BUS_ADDRESS="%(ENV_DBUS_SYSTEM_BUS_ADDRESS)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse" stdout_logfile=/tmp/pipewire-pulse.log stdout_logfile_maxbytes=5MB stdout_logfile_backups=0