How hard is life without PulseAudio?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
Yuki_thePenguin
Established Member
Posts: 10
Joined: Fri Oct 14, 2022 9:20 pm
Location: Neverland
Has thanked: 6 times

How hard is life without PulseAudio?

Post by Yuki_thePenguin »

Greetings. I hope anyone reading this is well.

I've heard about folks removing their PulseAudio installations and leaving it all up to JACK on their systems, given that the two are normally not very good friends. However, there are also a bunch of people warning not to do it if one doesn't want to get into trouble when running generic applications such as web browsers, media players, and so forth.

My question to those who have removed PulseAudio: How's life?

Can you hack Firefox, VLC Media Player, OBS, Tangerine, and others to run using ALSA/JACK only? Is it a huge time investment in that one has to hack through every single application that would normally "prefer" PulseAudio, or is there a systemwide fix that will keep me up tinkering all night, but that I won't have to bother about ever again?

Yes, I've tried running PulseAudio through JACK. It works, but it just doesn't suit my needs, and is somewhat annoying to me for multiple different reasons.

Thank you in advance, and God bless.

User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: How hard is life without PulseAudio?

Post by bluzee »

By far the best solution is to have multiple sound devices that are fed into a mixer and then to the amplifier or powered monitors. Turn PulseAudio off on the device you use for audio production and run Jack on it excursively.

I only remove PulseAudio completely from computers that I only use for audio production as there is no need for it.

Trying to share one audio device with Jack apps, PulseAudio apps and Alsa exclusive apps will cause conflicts. If you open an app with exclusive Alsa access that is it. Only that one app can access the sound device. If you have Jack or PulseAudio running you have to stop it before you can start the Alsa exclusive app. Many media players will have Jack support and will work fine if you have Jack running. Many others including your Browser will not. If PulseAudio is not installed they can only run using the apulse wrapper which turns them into an Alsa exclusive app. Again, there can be only one.

If you have apps that need PulseAudio, I would not remove it. PulseAudio and Jack can both be easily started and stopped on the audio device to be used as the demand dictates. If you want to run some type of DAW software that can do all routing internally and wants to run as Alsa direct then just stop any other audio server while you are using the DAW. Once again there can only be one and you will not have sound access for any other app like Browser or media player.

Each of these has their place and each is uniquely suited to a particular task. There is no good or bad their is simply what you need at present.

novalix
Established Member
Posts: 94
Joined: Wed Aug 11, 2021 1:12 pm
Has thanked: 6 times
Been thanked: 31 times

Re: How hard is life without PulseAudio?

Post by novalix »

When i start jack, pulseaudio hands over. No need to explicitly stop it. When i start ardour with the alsa backend, pa hands over. No need to explicitly stop it. When i stop jack, pa grabs the interface. No need to start it. When i stop ardour (alsa), pa needs some time (a minute or so) to wake up.
Disclaimer: Nowadays pulseaudio is drop-in replaced by pipewire (jack is not) on my system. But i am pretty sure it worked that way before.

User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: How hard is life without PulseAudio?

Post by onefang »

Not sure why you would need to hack VLC, it has a menu that is full of every audio device and system you have.

Personally I do the "multiple audio devices" thing with ALSA and JACK, no PulseAudio installed. On the other hand my motherboard has two different audio devices, my graphics card has six, and I have an old USB sound device. I have no idea why the graphics card has six audio devices, since it only has four actual video output sockets.

JACK is not as hard as people make it out to be if you use something like QjackCtl.

I do use a2j_control, alsa_in, and alsa_out to feed all but one ALSA audio out device to JACK, then use QjackCtl to route things. The one ALSA audio out is the default one that things like Firefox and VLC use by default.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

User avatar
Linuxmusician01
Established Member
Posts: 1503
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 734 times
Been thanked: 130 times

Re: How hard is life without PulseAudio?

Post by Linuxmusician01 »

There's PipeWire now. Do browsers (like Firefox) work with PW yet? They used to be hardcoded to only work with PulseAudio.

User avatar
sysrqer
Established Member
Posts: 2516
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 147 times
Contact:

Re: How hard is life without PulseAudio?

Post by sysrqer »

Linuxmusician01 wrote: Sat Mar 25, 2023 10:03 am

There's PipeWire now. Do browsers (like Firefox) work with PW yet? They used to be hardcoded to only work with PulseAudio.

Yeah they work fine. As far as programs are concerned pulseaudio is still there (as far as I understand it), just behind the scenes it is going to pipewire instead.

User avatar
d.healey
Established Member
Posts: 608
Joined: Fri Sep 22, 2017 8:33 pm
Has thanked: 272 times
Been thanked: 100 times

Re: How hard is life without PulseAudio?

Post by d.healey »

I've been using pipewire for about 1.5 years now. Not had any issues with it.

David Healey
YouTube - Free HISE scripting and sample library dev tutorials
Libre Wave - Freedom respecting instruments and effects.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: How hard is life without PulseAudio?

Post by merlyn »

I can use Firefox with ALSA. Go to about:config, then create a preference

media.cubeb.backend

make it a string and give it the value alsa.

Believe it or not if JACK is running Firefox will use JACK. I think the Arch version of Firefox is different in that respect. It has been compiled with JACK (if running) as the default. Sounds great, Firefox using JACK, but sadly it's not so good. I get a stream of xruns at low latency, like a 64 sample buffer, which is what I use.

I have a hardware mixer and two soundcards. One for JACK, and one for ALSA. The ALSA card deals with browsers and media players, but also e.g. JJazzlab. I can then have one fader for my guitar (on JACK, using Guitarix) and one fader for the backing track from JJazzlab. The current trend is to do most things in-the-box, so my setup wouldn't suit everyone.

User avatar
GMaq
Established Member
Posts: 2768
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 518 times
Been thanked: 555 times

Re: How hard is life without PulseAudio?

Post by GMaq »

Linuxmusician01 wrote: Sat Mar 25, 2023 10:03 am

There's PipeWire now. Do browsers (like Firefox) work with PW yet? They used to be hardcoded to only work with PulseAudio.

The browser doesn't need to connect to PipeWire directly, that's what the PipeWire ALSA, JACK and PulseAudio modules that are part of PipeWire do. As an example I'm using the Enlightenment Desktop Environment and it doesn't know that PipeWire exists at all it just uses it's built in PulseAudio connections to hook into PipeWire's PulseAudio modules (or at least it has in tests). Let's hope and pray things stay this way, Desktop Environments, Media Players, NLEs, DAWs and Browsers should remain compatible with what may be on the system whether that is ALSA, JACK, PulseAudio or PipeWire. Applications should be as open and agnostic as possible to what Sound server they work with..

salve
Established Member
Posts: 7
Joined: Sun Jan 29, 2023 8:19 am
Been thanked: 1 time

Re: How hard is life without PulseAudio?

Post by salve »

merlyn wrote: Sat Mar 25, 2023 2:42 pm

...
Firefox using JACK, but sadly it's not so good. I get a stream of xruns at low latency, like a 64 sample buffer, which is what I use.

This is one of the things that Pipewire will help you with: give different clients (like Firefox and Guitarix) different and appropriate sample buffers: Firefox won't need 64, so Pipewire will use ... say 1024 for it, while Guitarix can run with 64 at the same time.

User avatar
erlkönig
Established Member
Posts: 194
Joined: Tue May 31, 2022 8:58 am
Has thanked: 38 times
Been thanked: 41 times

Re: How hard is life without PulseAudio?

Post by erlkönig »

salve wrote: Sat Mar 25, 2023 9:46 pm

This is one of the things that Pipewire will help you with: give different clients (like Firefox and Guitarix) different and appropriate sample buffers: Firefox won't need 64, so Pipewire will use ... say 1024 for it, while Guitarix can run with 64 at the same time.

That's interesting. On what base does PW handle this? Does this mean, if i use it for music-production with different applications, i have to take care, which program runs at a certain buffer?

Currently working with
https://www.honeysuckers.rocks/?lang=en
https://de-de.facebook.com/SatanicVoices2019
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.

salve
Established Member
Posts: 7
Joined: Sun Jan 29, 2023 8:19 am
Been thanked: 1 time

Re: How hard is life without PulseAudio?

Post by salve »

I'm not a Pipewire expert. I suggest you read https://pipewire.org/

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: How hard is life without PulseAudio?

Post by asbak »

erlkönig wrote: Sun Mar 26, 2023 5:04 am

That's interesting. On what base does PW handle this? Does this mean, if i use it for music-production with different applications, i have to take care, which program runs at a certain buffer?

There are all sorts of ways to accomplish this, one could use variables to launch applications (as some people were apparently doing?) or one could hard code some parameters in configuration files where appropriate.

I made a post in this section about how I set PW on my system. The general idea was that PW prioritised JACK processes and placed consumer audio (eg Pulse) at the back of the queue.

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
salve
Established Member
Posts: 7
Joined: Sun Jan 29, 2023 8:19 am
Been thanked: 1 time

Re: How hard is life without PulseAudio?

Post by salve »

I can't really say that I use my computer as a studio.
But say, if I want to play my guitar along with Youtube, I may start Guitarix from the command line with the following command:

PIPEWIRE_LATENCY=128/48000 pw-jack guitarix

and Pipewire will take proper care of Firefox without my interaction.

(I have not had to edit any configuration files on Debian Bookworm (currently "testing"). But it's preferable to add the user to the "pipewire" group.)

folderol
Established Member
Posts: 2066
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 223 times
Been thanked: 398 times
Contact:

Re: How hard is life without PulseAudio?

Post by folderol »

I've not tried pipewire yet - waiting for an actual release 1.x release.

The Yoshimi guy {apparently now an 'elderly'}
Post Reply