Initial build setup for x86_64 Stormux.
This commit is contained in:
21
x86_64/airootfs/usr/local/bin/init-pipewire-sound.sh
Executable file
21
x86_64/airootfs/usr/local/bin/init-pipewire-sound.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Initialize pipewire audio by attempting to play sound until it succeeds
|
||||
# This ensures pipewire is fully ready before fenrir starts
|
||||
|
||||
maxAttempts=30
|
||||
attempt=0
|
||||
|
||||
while [[ $attempt -lt $maxAttempts ]]; do
|
||||
# Try to play a silent sound using sox
|
||||
if play -qnV0 synth .1 whi norm -100 2>/dev/null; then
|
||||
# Success! Pipewire is working
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Wait a moment before trying again
|
||||
sleep 1
|
||||
((attempt++))
|
||||
done
|
||||
|
||||
# Even if we failed, exit successfully so we don't block boot
|
||||
exit 0
|
||||
Reference in New Issue
Block a user