Skip to content

Don't report a PipeWire restart that didn't happen - #8

Open
munzzyy wants to merge 1 commit into
flipperdevices:devfrom
munzzyy:audio-restart-report-failure
Open

Don't report a PipeWire restart that didn't happen#8
munzzyy wants to merge 1 commit into
flipperdevices:devfrom
munzzyy:audio-restart-report-failure

Conversation

@munzzyy

@munzzyy munzzyy commented Jul 27, 2026

Copy link
Copy Markdown

audio-driver-restart.sh always reports the PipeWire restart as having worked:

systemctl --user restart pipewire pipewire-pulse wireplumber 2>/dev/null || true
sleep 1
log "PipeWire restarted"

The error goes to /dev/null, || true swallows the exit status, and the success line runs unconditionally.

That path can't really succeed as written. The script requires root at the top ([[ $EUID -ne 0 ]] && exit 1), and systemctl --user as root talks to root's own user manager, not the desktop user's session that owns the audio stack. So whoever runs this to fix a silent sound card is told PipeWire was restarted when nothing happened on the session that matters, and stops digging.

This keeps the behaviour non-fatal but stops it claiming success, and says why so the operator knows where to look. I left the actual user-session targeting alone on purpose — resolving the right uid (loginctl + runuser, or XDG_RUNTIME_DIR) is a design call, and I'd rather not guess at a convention for your test rigs. Happy to follow up with that if you want it.

The rebind logic above it is untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant