Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to restart pulseaudio but keep applications connected?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

How to restart pulseaudio but keep applications connected?

#1 Post by kerryhall »

Every so often, I'll run into a problem with pulseaudio, where top shows it using 90% cpu usage and upwards of 1.6 gigs of RES ram. (Happens maybe once a month or so)

This problem is rectified by restarting pulseaudio, but all audio applications then lose connections to pulseaudio. This likely isn't a problem for most people, but due to workflow I usually have 20-30 audio applications open at once. So I am forced to kill all audio applications, restart pulseaudio, then restore those applications.

It's not only a matter of restoring each audio application, but timestamps within those applications, etc. It ends up costing me quite a bit of time when it happens.

Is there a way to restart pulseaudio but preserve the application connections? Or somehow restore the connections after a restart? Hopefully in a way that is application agnostic.

Thank you!

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: How to restart pulseaudio but keep applications connected?

#2 Post by sunrat »

Have you looked at journalctl or other logs to see if there are error messages?
Perhaps having 20-30 audio applications open at once is too much for your system? Or maybe one of them is glitching?
I don't know of a way to get Pulseaudio to restore connections like that, maybe you could script it.
For that complex a setup I would be using JACK. It has several session managers such as Agordejo and RaySession which are able to save and restore very complicated setups.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

Re: How to restart pulseaudio but keep applications connected?

#3 Post by kerryhall »

Thank you! Would you suggest replacing PA with JACK entirely, or would I be using PA alongside JACK?

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: How to restart pulseaudio but keep applications connected?

#4 Post by 4D696B65 »

PipeWire? Never used it but looks interesting.
https://wiki.debian.org/PipeWire

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: How to restart pulseaudio but keep applications connected?

#5 Post by sunrat »

kerryhall wrote: 2021-09-22 21:39 Thank you! Would you suggest replacing PA with JACK entirely, or would I be using PA alongside JACK?
It is possible to set up a PA > JACK bridge for those applications which don't sink to JACK directly. It's a bit more complicated to set up but it sounds like your setup is quite involved anyway so the ability to save and relaunch whole sessions would enable a more efficient workflow.
It takes a bit more setup and some learning though.
As 4D696B65 said, Pipewire is under development to eventually replace PA and JACK but is not ready for primetime yet, and doesn't have session managers available yet afaik.
There is a great distro which can be run live without installing which has JACK and PA set up out of the box - AVL-MXE (AVLinux-MX Edition) with which you could dip your feet into a proper audio production setup. Get it at http://www.bandshed.net/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply