Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917637 - media-video/pipewire: gentoo-pipewire-launcher restart bug
Summary: media-video/pipewire: gentoo-pipewire-launcher restart bug
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 17:09 UTC by Joakim Tjernlund
Modified: 2023-11-25 14:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2023-11-20 17:09:51 UTC
gentoo-pipewire-launcher has this snippet:

restart () {
    echo "Terminating PipeWire processes ..."
    pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1

    # pidwait was renamed to pwait w/ procps-4 (bug #914030)
    if command -v pidwait > /dev/null ; then
        pidwait -u "${USER}" -x pipewire\|wireplumber
    elif command -v pwait > /dev/null ; then
        pwait -u "${USER}" -x pipewire\|wireplumber
    fi

    echo "PipeWire terminated."
}

Above does not terminate pipewire-pulse and does not wait for each
daemon to die in sequence. I think something like this will
do better(modulo pidwait):
pkill -u "${USER}" -x wireplumber
pwait -u "${USER}" -x wireplumber
pkill -u "${USER}" -x pipewire-pulse
pwait -u "${USER}" -x pipewire-pulse
pkill -u "${USER}" -x pipewire
pwait -u "${USER}" -x pipewire
Comment 1 Joakim Tjernlund 2023-11-20 17:27:00 UTC
or if you think order is not important, change:
  -x pipewire\|wireplumber
to 
  -x wireplumber\|pipewire-pulse\|pipewire
Comment 2 Joakim Tjernlund 2023-11-23 18:38:34 UTC Comment hidden (spam)
Comment 3 Joakim Tjernlund 2023-11-25 14:44:16 UTC
I got confused by pipewire on systemd uses pipewire-pulse while
openrc uses /usr/bin/pipewire -c pipewire-pulse.conf

Current rule then does match I think