9 ms·
An Introduction to PipeWire
- WhyNotHugo 4y agoOne of the things that bothers me about Pipewire, is that the protocol to communicate with it is undocumented -- only the reference C implementation exists. On top of that, language bindings don't expose a lot of things. Like whether a node is muted or not. I tried to write a tiny widget to show whether my mic is muted on not on my statusbar -- short of reverse engineering the C implementation, there's no simple way to do it. What worries me is that we're building so much on top of something undocumented. If the devs decide to move on, what'll happen?
- resoluteteeth 4y agoI just switched to PipeWire and it's working great. It's fantastic that it can replace both pulseaudio and jack; it seems like a massive improvement in the linux audio situation.
- im_down_w_otp 4y agoMy only problem so far is that I can't figure out how to correctly define a custom profile for my Tascam Model 12. I created one for ALSA/PulseAudio that used to work perfectly, but it appears that PipeWire has a new config format and mechanism for this kind of thing, and I've been unable to wrangle it into a working result. My current workaround is to use one of the PipeWire patchbay GUIs to do ad hoc what I'd normally have as baseline configured system setup.
- deleted 4y ago[deleted]
- CameronNemo 4y agoI have successfully used the ALSA use case manager to get everything hooked up right with my USB audio interface. Maybe that will work for you.
- nousermane 4y agoAnother happy user of PipeWire+Helvum here. Finally, a proper "Virtual Audio Cable" for Linux!
- cowtools 4y agoI had no idea about this helvum thing- this is great!
- resoluteteeth 4y agoThis kind of thing was so hard to do with with pulseaudio, lol. I'm so happy that it's easy now with pipewire.
- freeqaz 4y agoLink: https://gitlab.freedesktop.org/pipewire/helvum https://gitlab.freedesktop.org/pipewire/helvum It's a visual patch bay for Pipewire. I had no idea and I had to look it up.
- MobiusHorizons 4y agoIt is also featured in the article
- jcelerier 4y agoThere's also qpwgraph when you're used to qjackctl
- escalt 4y agoPeople still using PulseAudio can use pagraphcontrol (https://github.com/futpib/pagraphcontrol https://github.com/futpib/pagraphcontrol)
- codethief 4y agoI like that UI better than Helvum! Does it also work with PipeWire?
- mikewhy 4y agoI was playing Spider-Man with a dual sense and got wondering. That game puts out audio to your speakers, a separate audio stream to the speaker in the controller, and _another_ stream of audio for the haptics. Is this any bit possible with any Linux audio solution?
- jeroenhd 4y agoI don't see why that wouldn't be possible with Pipewire. The system will provision your application with the default audio output but through the Pipewire API you can send any audio stream(s) you want to any device(s) you want. I've played around with patchbay software to manage existing audio streams. I've sent audio to both my headset and streaming software, adding a block of effects inbetween through JACK audio software, and used a similar JACK audio interface to put audio from a voice chat app to the front left and then piped it into my headphones. I don't know the API for creating audio streams directly but as long as you can introduce enough sources and expose every audio output as a separate sink (i.e. one for your controller) it's all relatively easy. I doubt game developers will make use of this any time soon, though. Maybe if the success of the Steam Deck brings a new life to Steam Machines?
- mikewhy 4y agoHmm, I suppose that could work, didn't think about targeting the Pipewire api. I didn't play around with it much, but the controller did appear as a 5.1 (or was it 7.1?) in Linux. Oh, and I forgot, the controller itself also has a headphone jack. The controller itself can take 3 audio streams, two of which can be used for sound.
- jeroenhd 4y agoYou can route an audio stream into any channel of any audio device so even if the controller shows 9 channels, you can use all of them if you provide enough sources. I've added 8 (*2, stereo) channels to OBS at some point for shit and giggles and that worked fine without interrupting my normal headphones. Things can only work better without the compatibility layer. Your biggest issue trying to get this done will probably be picking the right channels for the right controllers because you have no idea what controllers are what on other systems. An audio device dropdown after some auto detection should work, but if the controller has weird specialised channels that don't follow the normal system output (i.e. 5.1 but two channels are actually stereo headphones and not real 5.1) then configuration may be a pain.
- yewenjie 4y agoWhenever my laptop stays on for more than like a day, audio quality reduces for my pipewire setup. I have not bbeen able to debug it so far - but restarting the machine makes it go away.
- nyanpasu64 4y agoOdd, are you using speakers or headphones or Bluetooth, what does pw-top say before and after quality drops, and is there anything in journalctl --user?
- viraptor 4y agoReport it upstream. They were pretty good with walking me through debugging an issue.
- Laaas 4y agoShitty workaround: `systemctl --user restart pipewire`
- jakobdabo 4y agoI hope somebody has a solution for a problem that I have and can't find anything online. I have a simple Pipewire setup. When plugging a regular 3.5mm headphone (/w a mic) it always ends up in maximum capture settings, so if I forget to open `alsamixer` and decrease the mic capture and boost levels to a reasonable level, people behind the other end of Zoom calls suffer. If I unplug it and plug again, it resets to 100% again. How to fix this?
- heavyset_go 4y agoAre you using WirePlumber or pipewire-media-session? WirePlumber seems to remember my volume settings, but that also might be a DE thing possibly.
- stjohnswarts 4y agohttps://old.reddit.com/r/pipewire/ https://old.reddit.com/r/pipewire/ is fairly active for such questions. I think sometimes even pipewire devs people are on there.
- brunoqc 4y agoAlso check https://github.com/wwmm/easyeffects https://github.com/wwmm/easyeffects and https://github.com/jaakkopasanen/AutoEq https://github.com/jaakkopasanen/AutoEq. I wish https://github.com/wwmm/easyeffects/wiki/Community-Presets https://github.com/wwmm/easyeffects/wiki/Community-Presets had more presets.
- deleted 4y ago[deleted]
- raffraffraff 4y agoStill find it odd that I will need to use pipewire-pulseaudio and parec if I want to create a loopback device and null sink so I can select a sound device that doesn't play audio locally, and record audio to send over the network. Unless someone else has done all of this with native PipeWire?
- Venn1 4y agoI'm waiting on something that will replace PulseAudio module-jack-sink + netjack2.
- jcelerier 4y agoI use pw-loopback -m '[FL FR]' --playback-props='media.class=Audio/Source node.name=my-source for loopback, is it missing something for your use case?
- raffraffraff 4y agoI'll try that. Last time I checked (not that long ago!) the instructions were to use pactl to create null + loopback, and parec to record and pipe to [whatever]. I'll check out pw-loopback!
- codethief 4y agoMy Bluetooth devices regularly disconnect & reconnect, sometimes no longer output anything (until I disconnect/reconnect manually), or won't allow me to switch to certain codecs anymore (until I disconnect/reconnect). Has anyone had the same issues? (Using PipeWire + pipewire-media-session)
- d_tr 4y agoNot sure at all this will help, but wireplumber is supposed to be the replacement for pipewire-media-session. So this is something easy you could try if your distribution has a package for wireplumber.
- gerdesj 4y ago"One first design choice was to avoid tackling any management logic directly inside PipeWire" That single statement indicates to me that PW has got it right. Also I've been using it for 18 months now on Arch after a brief to and fro with PA where stuff failed badly for a short while. Now it is nigh on flawless and just works. This: https://github.com/werman/noise-suppression-for-voice#pipewire https://github.com/werman/noise-suppression-for-voice#pipewi... works really well and I can have my window next to a very busy road open and no one can hear it on Teams. Sorry ... Teams! I use Teams actually 8)
- artogahr 4y agoThis looks really cool, but how do I select which microphone it uses for filtering? If I choose "Noise Canceling source" as the input device like the guide suggests, is that source picking up noise from my laptop's internal microphone, my usb headset microphone, or my bluetooth headphones' microphone? I don't see an obvious way to control that.
- gerdesj 4y agoI only have one USB headset and it just works on my laptop and desktop so I suspect it simply attaches to all input devices. I use the Noise Cancelling source and it works. For a short while on Arch it crashed in use and the extra source vanished and went back to the default devices but an update fixed that within about a week. I think you should just use the Noise Cancelling source for everything and it will work. Teams has an echo test and you can always call a friend/colleague to test.
- nyanpasu64 4y agoI'm convinced that splitting out management logic and pipewire-pulse was the wrong choice so far for desktops. It exposes regular users to the failure modes of race conditions (https://bugs.kde.org/show_bug.cgi?id=438565#c21 https://bugs.kde.org/show_bug.cgi?id=438565#c21, likely https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/102 https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues..., https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2409 https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/24...) and inscrutable wireplumber "100% CPU burning" bugs deep in Lua interpreter call stacks, as the price of complexity which only benefits complex users like cars.
- jancsika 4y ago> this API has been in use by the pro-audio audience and targets low-latency for audio and MIDI connections between applications. My emphasis there because I love that the author got this right. It's always been frustrating to help users tangled up in Jack only to find out they're just trying to get a single application to output audio with low-latency. (Their assumption being that Jack is the tool to attain low latency audio input/output in Linux.) Good vibes around Pipewire and good vibes in an article describing Pipewire are a good sign for an audio server. :) Edit: clarification, typo
- nyanpasu64 4y ago> For each component (subgraph of the whole PipeWire graph), one node is the driver and is responsible for timing information. A new thing I learned I guess. JACK treats both the output ports and input ports of the single hw device as a driver, and if the output ports (capture) generates more samples than the input ports (playback) accept, you eventually get buffer xruns. > Note: in this simple example, the buffer size provided to ALSA by PipeWire determines the time we have to generate new data. I thought PipeWire uses quantums, effectively ignoring ALSA periods and "racing the beam" using software timers instead.
- phendrenad2 4y agoIt's still amazing to me that people care about low-level details of their Linux system, like PipeWire. Personally, I'll use PipeWire when the most popular distro switches to it (which is Ubuntu). (If Ubuntu is already using PipeWire, good! Don't tell me. I don't want to know.) This is my act of rebellion against the Linux community, in hopes that my act of obstinance will help bring about a truly Windows-like Linux environment.
- CameronNemo 4y agoI mean I didn't care about X11 until I used Wayland and realized that I didn't just have to deal with screen tearing. To get screen sharing to work on most Wayland systems, you do need Pipewire. So I learned enough to set it up. And then I learned enough to tune it for my audio recording use cases. Which wasn't actually that much work.
- brnt 4y agoI'm using X11 and I haven't seen screen tearing since the augths. I do see frequent Wayland hangs, weirdly indepdent of hardware and distro... Agree with OP, these things don't really interest me either. I did try Pipewire; is worked as well as PulseAudio for me. The most complicated thing I do is use connect Bluetooth headphones every now and then.
- p_l 4y agoThat's because the reality is that screen tearing happens due to hw changes in certain GPUs and not X11, and Wayland compositors dumb down the GPU interface that they need to synchronize in userspace anyway and thus lack of sync logic in intel gpus doesn't cause tearing anymore.
- Zardoz84 4y agoEvery time that I Try Wayland, I always get really annoying bugs. Including one that puts black both of my screens and I only can do it's a REISUB. I would keep yet on X11, that on my case works better.
- 4y ago
- jdjslskshdj 4y agoPipewire was a great improvement over pulse, but the overall audio/bluetooth situation on linux is part of what pushed me to switch back to a Mac.
- WhyNotHugo 4y agoReally? I tried the first M1 Mac Minis, and bluetooth was terrible -- macOS would constantly switch to the worst quality profile. I use an iPhone on a daily basis, and I always with its bluetooth was as reliable as my Linux laptop. What exactly did you find lacking in the Linux world? Are you an audio professional?
- atoav 4y agoHelvum did not work for me. pw-viz did: https://github.com/Ax9D/pw-viz https://github.com/Ax9D/pw-viz In my daily patching I still tend to use Catia tho