I haven't touched any alsa stuff in a long time. Pulse is the interface to be used on Ubuntu for about the last 5 yrs. Alsa is still there, but controlled by Pulse now. Pulse-Audio can be run in either system-mode or user-mode. User-mode is the default. It requires a user session to work, however and it is somehow tied to the GUI session. About once every week or two, my pulseaudio daemon crashes. That has been common the last 5 yrs. The solution, in user-mode, is to
Code:
/usr/bin/pulseaudio --kill # kill it, if it is still running
/usr/bin/pulseaudio --start # start it in daemon-ized mode
You can place a script file (be certain it is marked with execute permissions) into your session startup programs. No sudo needed.
From the pulseaudio manpage:
Code:
--start
Start PulseAudio if it is not running yet. This is different
from starting PulseAudio without --start which would fail if PA
is already running. PulseAudio is guaranteed to be fully ini‐
tialized when this call returns. Implies --daemonize.
-k | --kill
Kill an already running PulseAudio daemon of the calling user
(Equivalent to sending a SIGTERM).
Firefox only works with pulseaudio on Ubuntu from the repos. Before that change, I was fighting pulseaudio completely.
Using pulseaudio in system-mode brings some challenges and isn't recommended by the pulse audio team. There is some information about this mode at the FreeDesktop website where the Pulse project is. They certainly do write a bunch of documentation. Pulse is a complex system that can do 100 things, 90 of which most end users don't care.
The only tweak I needed which changed the pulseaudio crashes from once every 2 hrs to about once each week or two was in the ~/.config/pulse/client.conf file - added this:
Code:
enable-shm = no
shm-size-bytes = 0
For me, that changed stability. If there are multiple users, there is a system-wide client.conf file in /etc/ somewhere.
Because I reboot after a new kernel is installed (eventually), I haven't noticed pulse audio crashing nearly as much since moving my desktop to 18.04 from 16.04. There are many more kernel updates with newer releases.
Not that this matters, but Fedora is looking to replace PulseAudio with some new-fangled sound system soon. I don't know anything about it. https://en.wikipedia.org/wiki/PipeWire is the wikipedia article. Looks like it was needed to support restrictions in flatpaks and Wayland. Of course, the people who love it are all in on Wayland.
Bookmarks