Pulseaudio

From My Mnemonic Rhyme
Revision as of 07:30, 23 January 2021 by >Homaar (Die Seite wurde neu angelegt: „=arch: restart hanging pulse after suspend preemptively= Add /usr/lib/systemd/system-sleep/pulseaudio <pre> #!/bin/sh USER=weiss case "$1" in post)…“)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

arch: restart hanging pulse after suspend preemptively

Add /usr/lib/systemd/system-sleep/pulseaudio

#!/bin/sh

USER=weiss

case "$1" in
    post)
        su - $USER --shell=/bin/sh -c '
                export XDG_RUNTIME_DIR=/run/user/$(id -u);
                systemctl --user restart pulseaudio.service
                '
        ;;
esac