pw-reserve(1)

✨ pw-reserve(1) β€” the PipeWire device reservation utility ✨

okay so real quick, before we get into it: this whole page is the man page for pw-reserve, bestie. That's the name, that's the manual, that's the vibe. Now let's go πŸ’…


🌸 NAME 🌸

pw-reserve β€” the PipeWire device reservation utility. that's it, that's the whole name section πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pw-reserve [options]

literally just options. that's the whole synopsis, she's simple like that ✨


πŸ’– DESCRIPTION πŸ’–

okay so what does she do. pw-reserve reserves a device using the DBus org.freedesktop.ReserveDevice1 device reservation scheme [1], and then it just... sits there. waiting. waiting until it gets terminated by SIGINT or some other signal. main character energy honestly 😭

it can also ask other applications to release a device. which is genuinely so useful β€” you can use this to make audio servers like PipeWire, Pulseaudio, JACK, or any other application that respects the device reservation protocol ignore a device. or, even better, to make them release a sound device they're already using so that other applications can have it. sharing is caring, periodt 🫢


✨ OPTIONS ✨

  • -r, --release β€” asks whatever client is currently holding the device to release it, and then tries to reserve it after that. but listen πŸ‘€ if you don't pass this option and the device is already in use, pw-reserve will exit with error status. no negotiating, no waiting, just error. πŸ’€
  • -n NAME, --name=NAME β€” the name of the device you wanna reserve. by convention, this is:
    • AudioN: for ALSA card number N

like, pw-reserve can technically reserve any device name, no cap. however β€” and this is the important bit β€” PipeWire does not currently support other values than the one listed above. so like. go wild, but PipeWire won't get it πŸ™ˆ

  • -a NAME, --appname=NAME β€” the application name to use when you're reserving the device. it's giving "who am i in this reservation" πŸŽ€
  • -p PRIO, --priority=PRIO β€” the priority to use when reserving the device. yes it's a PRIO, keep it as PRIO bestie ✨
  • -m, --monitor β€” monitors reservations of a given device instead of reserving it. so you're just watching. lurking. observing the reservation drama πŸ‘‘
  • -h, --help β€” show help. iconic, helpful, we love her πŸ’œ
  • --version β€” show version information. no short flag for this one, she stands alone 🌟

πŸ”₯ EXIT STATUS πŸ”₯

if the device reservation succeeds, pw-reserve does not exit until it's terminated with a signal. she's staying. in that case, it exits with status 0 if it's terminated by SIGINT or SIGTERM. 🫑

otherwise? it exits with nonzero exit status. not every story has a happy ending 😭


🌈 EXAMPLES 🌈

pw-reserve -n Audio0

reserve ALSA card 0, and exit with error if it's already reserved. straightforward, no notes πŸ’…

pw-reserve -n Audio0 -r

reserve ALSA card 0, requesting any applications that have reserved the device to release it for us. assertive. love that for us πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

The PipeWire Developers <https://gitlab.freedesktop.org/pipewire/pipewire/issues> β€” that's where you go with issues, bestie πŸ›

PipeWire is available from <https://pipewire.org> β€” go say hi ✨


πŸ’€ SEE ALSO πŸ’€

[1] https://git.0pointer.net/reserve.git/tree/reserve.txt β€” A simple device reservation scheme with DBus. this is the whole source of truth for the reservation scheme, so like, iykyk πŸ“–


and that's the whole page, bestie!! πŸŒΈπŸ’–πŸŽ€πŸ¦‹βœ¨

mwah, go reserve some devices. this was pw-reserve(1) from PipeWire 1.6.8 β€” written, as always, by the PipeWire girlies. catch you in the next man page πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from