19 ms·
PipeWire: Bluetooth Support Status Update
- colordrops 4y agoIronic, I just upgraded my NixOS system which uses PipeWire and now my Bluetooth headset has gotten really flakey for video con calls. It's not that audio is broken, but something has changed with PipeWire where it no longer uses the right audio device for output and input and I have to fiddle for a few minutes now before every call. Haven't figured it out yet.
- heavyset_go 4y agoAre you using WirePlumber and pipewire-pulse?
- colordrops 4y agoI don't know, I'll look into it. I assume pipewire-pulse is in use because it works with all the pulse tooling.
- heavyset_go 4y agoYeah, if it works with the PA tools, then you're using pipewire-pulse. If you aren't using WirePlumber, try it out, as pipewire-media-session doesn't work as well and is more of a reference implementation than an end-user product.
- ubercow13 4y agoI found when Fedora switched to wireplumber it made bluetooth much less reliable. Every time I connected my headphones I had to restart wireplumber multiple times for them to connect. Haven't tried it for a few months though, maybe it's improved.
- maxerickson 4y agoYeah, I've just been restarting the pipewire service instead of looking into it, but I started having audio output fail when I switched to wireplumber.
- ahartmetz 4y agoWireplumber looks much more wonky to me than media-session, so I'm deferring the switch for now. Wireplumber's design seems flashy and not guided by experience or good taste to me, the opposite of Pipewire proper.
- 4khilles 4y agoI have the same issue on the latest Fedora. It's very disappointing that bluetooth connectivity isn't a solved problem in 2022 (at least on Linux, haven't noticed any issues in Windows for a while). Are we ever going to get to a point where bluetooth "just works"?
- TobTobXX 4y agoRelevant XKCD: https://xkcd.com/2055/ https://xkcd.com/2055/
- R0flcopt3r 4y agoI have daily bluetooth issues on Windows. Someone decided it was a good idea to have bluetooth jabra speakers/microphones for our meetingrooms... It takes 5 minutes to do the pair/connect/set correct device dance... every. day. My macbook can't even figure out that it should try to connect to my offce trackpad after I have had it connected to my home trackpad! Thankfully it has a built in trackpad that I can use to manually connect when the "automation" fails..
- doublepg23 4y agoIs that with an M1? I had a 12" MacBook no-adjectives in the past which didn't even work with AirPods well. I was hoping the M1 would have a better BT stack (the iPhone's...)
- colordrops 4y agoIt turns out that Nix Unstable switched from media-session to WirePlumber recently and that is the source of the instability I'm seeing. Perhaps it's not yet configured properly in Nix.
- colordrops 4y agoPrevious response is too old to edit. Looks like NixOS's pipewire service enables WirePlumber by default. Not sure if it changed recently from media-session, and that's why it's gone unstable, or if it's something else.
- heavyset_go 4y agoI've run into a similar issue, where the default output device wouldn't be selected, when I used PulseAudio by itself before Pipewire was a thing. I had to use one of the PA console mixers to set my default output and input devices, and with some playing around with it, I was able to make them the default. Might help to use pactl or one of the many PA mixers to poke around and see if there's anything you can adjust to fix the issue. Might also help to test out pipewire-media-session to see if that helps, too.
- hiimshort 4y agoWhen I was futzing around two or three months ago with audio on my NixOS system I believe it was still using media-session. Are you on unstable? I believe the intention was to migrate to WirePlumber, but didn't expect that to happen already.
- colordrops 4y agoYeah I'm on unstable, and it's indeed using WirePlumber now. That must have been the change that destabilized things, thanks.
- ComputerGuru 4y agoI’ve only heard good things about PipeWire so I must ask: will this finally give me a lower latency option for Bluetooth audio on Linux? After my old Anker speakers went belly-up° I “upgraded” to their latest model which I didn’t realize was aux/3.5mm-free and have been suffering ever since from horrendous lag when using the external speakers to stream movies on my Linux laptop. ° Ok, in actuality my kid broke half a male 3.5mm connector in the speaker’s 3.5mm female port and I was too lazy to break it open and solder in a replacement. Mostly due to not wanting to hunt for a layout-compatible female 3.5mm jack.
- Filligree 4y agoLower latency is one of the design goals for Pipewire, so almost certainly yes. How much lower latency may be a different matter.
- ComputerGuru 4y agoI’ve been wanting to experiment with some hard-coded low-level (asm/C/rust) Bluetooth on a microcontroller to experimentally/empirically determine the lowest possible Bluetooth audio delay for some time (getting rid of all encoding, context switching, garbage collection, etc etc overhead). ~~I think~~ it’s fundamentally a laggy approach to audio streaming because of the packetization that takes place, but it shouldn’t be to the extent that it is so immediately noticeable.
- ncmncm 4y agoSometimes constant latency is more important than minimal latency.
- ajsnigrutin 4y agoWas latency ever an issue with movies? I know mine works without issue on pulseaudio+bluez by delaying the video to sync it with audio (which is actually noticable with an old noname speaker when you pause/play the video - the video stalls, then (i guess) the audio buffers are filled, and movie starts playing with syned a/v, and then when pausing, maybe half a second of audio is still played after you've paused it).
- spacemanmatt 4y agoSince I switched to pipewire I've had the best Linux audio end-user experience with BlueTooth devices, ever.
- kaladin-jasnah 4y agoPipeWire supports the most audio codecs of any desktop operating system, period. Windows and Mac don't have LDAC, Mac doesn't have aptX, etc.
- smoldesu 4y agoDefinitely, having just bought some XM4s I was kinda taken aback by having LDAC automatically pop up in my audio settings. Very neat to see support being that seamless!
- adamomada 4y agoI vaguely remember an old post from here showing someone hacking up Bluetooth to give SBC codec better quality, and it only being available on Linux (or maybe it was Linux+Android?) I’ll try to dig it up and edit it in here, as I think it was a great hack
- aviraldg 4y agoDo you mean mSBC?
- adamomada 4y agoI found a couple links, since I remembered that Zenwalk distro was one of the first to include it. They call it SBC XQ [0] http://soundexpert.org/articles/-/blogs/audio-quality-of-sbc-xq-bluetooth-audio-codec http://soundexpert.org/articles/-/blogs/audio-quality-of-sbc... Via [1] http://www.zenwalk.org/2019/09/audio-quality-of-sbc-xq-bluetooth-audio.html http://www.zenwalk.org/2019/09/audio-quality-of-sbc-xq-bluet...
- silentprog 4y ago
- rektide 4y agoBluetooth continues to be one of the most critically under-delivered standards, in my view. LC3, that this update discusses at the end, was announced January 2020. Over two years ago. There's still, to my knowledge, no devices that support it. None, not a one. In general I feel like we only just got Bluetooth 5.0 devices available on computers. Bluetooth 4.0 or 4.2 has been frighteningly prevalent, until very very recently. Bluetooth 5 harkens back to mid 2016, Bluetooth 5.1 was announced January 2019, 5.2 in January 2020, 5.3 (you guessed it) 2021, but I'd wager you'd need to drop numerous significant figures below 1% to account for how many laptops (much less desktops) are sold today whose bluetooth is >5.0. Truly one of the slowest, laggiest, least adoptable technologies on the planet. Really weird to me. I can definitely accept some lag. LC3 is really using bluetooth-le, a very different scheme. At the same time, I see folks like zephyr-project already kind of making inroads into this future[1], in the open. A not small part of me thinks the way we do consumer devices is totally jank. That folks like PineBuds are living in the future, where we can compile our own OS'es for our peripherals. PineBuds[2] could, with a little zeal & push, become the first LC3 device on the planet. And they could, perhaps, unlike most other devices that'll be made in the next couple years, possibly support whatever comes next. Shifting areas of interest a bit, but: another data-point in opening the future, the software Intel uses for their new PSE management engine just got open sourced[3]. It too is built on Zephyr. On the positive-side, for PipeWire, incredibly sweet to see Hands-Free Profile get better. This is essentially the idea of a computer acting like a headset. This enables such vast additional degree of system flexibility, creates so many interesting situations. Phones, cars, other things are very limited in what they can do. But if we can wirelessly plug in a general purpose computer, make it act like audio system: we can do so much more. The old Nohands[4] stack is wildly out of date & unsupported. PipeWire just doing the thing is 100% super sweet as the world needs to be. In general, a more amorphous world where computers can act as hosts or devices is one I thing would be vastly empowering: software is soft, and so too should be hardware, when it can. [1] https://github.com/zephyrproject-rtos/liblc3codec https://github.com/zephyrproject-rtos/liblc3codec [2] https://www.pine64.org/2022/04/01/introducing-the-pinebuds-and-pinepod-seriously/ https://www.pine64.org/2022/04/01/introducing-the-pinebuds-a... [3] https://news.ycombinator.com/item?id=31121264 https://news.ycombinator.com/item?id=31121264 (2 points, 7 days ago, 0 comments) [4] http://nohands.sourceforge.net/ http://nohands.sourceforge.net/
- 0xbkt 4y agoI was never successful in getting both mic and HQ audio working with BT on PulseAudio. Configuring to use A2DP gives the most fulfilling sound quality while nullifying the mic, thus becoming a huge deal-breaker for me. Does PipeWire incorporate any wizardry to overcome this and let me have simultaneous access to both mic and high quality audio? I have a JBL Everest Elite 700 and I am running on Ubuntu 21.10.
- sph 4y agoIt does. I haven't tested it personally but AFAIK PipeWire does switch automatically to the best codec when you're not using the mic.
- maxhille 4y agoAFAIK the best you can do is mSBC (if the headset supports it). It is still not high quality though and as I understand it this is a general Bluetooth limitation.
- waplot 4y agoCan someone explain to me what pipewire's goal is? to be a better pulseaudio? if so, in what way is it trying to be better? also, how's the codebase quality? from what i heard, pulse's codebase is a mess, so if it can improve in that sense, i guess that's a win (?) why does it do video? is trying to do media capture like OBS or be a compositor like wayland? if so why bother? those solutions exist already... maybe it should just stick to audio, cuz that part of it feels like feature creep.
- patrickthebold 4y agoI can't answer all your questions, but OBS uses pipewire (I think for wayland support[1]), so there's that. [1] https://github.com/obsproject/obs-studio/pull/4287 https://github.com/obsproject/obs-studio/pull/4287
- pabs3 4y agoThis LWN article is a good backgrounder on PipeWire: https://lwn.net/Articles/847412/ https://lwn.net/Articles/847412/
- ncmncm 4y agoPipewire is driven by the need to handle synchronized media from multiple sources delivered to multiple sinks in real time with minimal, constant latency. The reference problem is cars, which often have a dash cam, back-up cam, dash video display, instrument panel display, bluetooth phone connection, radio receiver, satellite receiver, audio amplifier, dash microphone, backseat video display with audio, seatbelt alarm, and more besides, that all have to be managed sensibly with minimal engagement. Handling audio without video fails if they have to be kept in sync. Anyway that's my outsider's impression.
- stragies 4y agoSo, a glue layer for * (LAN-)devices, most a source/sink/control for various Audio/Video streams. * Those devices (can) share/use any HW (Microphones/Speakers/V4L-devices) available * programs producing/consuming sound/video, to be "exported" as individual sinks/sources * Eventing support to dynamically change media routing Your stated "reference problem" (Car AV) is (imho) not the most user-"relatable" scenario (after all, who has "hackable car"), a more common scenario I'd see: * In several of the rooms of the dwelling there are * Devices large/small with several connection types * LAN (PCs, TVs, AV-HW, MediaPlayers, ...) with protocols including e.g. * Well-known programs (VLC, KODI) with their "own" protocol * UPNP/DLNA/AirPlay/Miracast/PulseAudio/RTSP/... * SIP/WebRTC devices/clients (Doorbells, VoIP-Phones, VideoConf) * Devices with Vendor-specific protocols. e.g LG WebOS * USB connection to one of the above (WebCam, Android-devices, phones) * Wifi-P2P (Some of LAN devices have this too, for e.g. screencasting) * Bluetooth BTLE/Classic (devices can be stationary/mobile/transient) I would like to enable these usecases: * Send [emulated] [second] screen from PC to any Display surface * View any desktop/UI/program/device on any other display surface * Control all the above from PCs/Phones/Tablets, or Events (Doorbell -> Camera PiP @TV) * Route any audio/video source to my speech-recognition/video-conf/VoIP Software * Use Android device [connected to USB[ of another Device]] as 8+ devices: Camera F/R, Screen I/O, Audio I/O Headphone/Speaker/BT Microphone/App-Output * Use "hook"-scripts for eventing/device control (TV might need some command to switch to HDMI3) I realize most of the above can be probably be done using some GST/FFMPEG glue scripts/code and some systemd dependencies, but I'm haven't found quickly relatable examples of: * "Run this command/config to add an ffpmeg commandline as virtual camera" * "Use this config to represent your TV as another display output device" * "Run this command On DevA to launch a GUI-binary on DevB, and make this "stream" available as VideoSource in Browser@DevA" * "Use the Webcam on DevA, bluetooth headsets via DevB for input, TV1 as VideoOutput, AudioOut on AVR, runnings VideoConf on DevC" * "Do this to implement access-control" (Bob can see Input "foo", but Alice can't)
- pabs3 4y agoI had choppy audio when under high CPU load on older hardware with PipeWire, but got told that increasing the latency prevents that. The reason I don't get that with PulseAudio is that it has higher latency than PipeWire's default latency. Turns out this command works for me: pw-metadata -n settings 0 clock.force-quantum 2048
- snvzz 4y agoPipeWire will use SCHED_RR automatically, but Linux mainline is pretty bad at actually delivering consistently low scheduling latency. As an alternative to increasing latency, especially if you're not running on batteries, try linux-rt. (PREEMPT_RT). It makes scheduling latency decent. On my machines, the max column in rt-test cyclictest, after running for a day, remains at <100µs, whereas if I use mainline it easily goes to ms range within a minute or two, and I've seen it go as high as 30ms. linux-rt patchset is slowly getting merged into mainline. I am hopeful that at some point we will be able to build it with PREEMPT_RT, and that desktop kernels in distributions will do that.
- pabs3 4y agoDebian has Linux RT builds, so I could use those, but really the change in quantum isn't noticeable at all. I just need to figure out how to configure pipewire to keep it at that value instead of reverting after restarts.
- snvzz 4y agoWith its 30ms scheduling latency peaks (guaranteed xrun), I've found mainline is simply not capable of audio in any reasonable form. If you do audio at all and run Linux, I can't recommend PREEMPT_RT enough.
- sph 4y agoFedora has started considering the switch to a fully preemptible kernel.
- pabs3 4y agoHere is a good article on the background of PipeWire: https://lwn.net/Articles/847412/ https://lwn.net/Articles/847412/
- JeremyNT 4y agoI have the steam deck, as referenced in the article, and Bluetooth audio works very well. The latency is nearly imperceptible. Pipewire is a really great improvement in the audio story for desktop Linux!
- amurthy123 4y agoPipewire is the best audio experience for Linux. It recognizes my bluetooth headphones almost instantly, and it's pretty great.
- hsbauauvhabzb 4y agoI’m really interested in pipewire for use with AirPods, I really want to be able to leverage wireless comms for voice. Does the current state support AirPods well? Sorry if that’s obvious but I’m under the impression the AirPod codecs are slightly different to non apple headphones.
- oynqr 4y agoAirpods should work fine, probably defaulting to AAC.
- hsbauauvhabzb 4y agoThanks, it turns out I had pipe wire installed, and mic quality was good. I’m unsure if as good as on my phone but good enough for meetings!
- j0057 4y agoPipeWire is great (and so were PA and Alsa and OSS in their time) and I hope the PipeWire's end-user documentation will be improved, so that I can use wireplumber instead of pipewire-media-session. Right now the end-user story is still a bit rough.