Using ALSA instead of Pulseaudio in Ubuntu 18.10

Hi, linux newcomer here.

I have been having audio issues on Ubuntu 18.10 like audio micro stutters when using the audio output of my mainboard (does not happen with cheapo external usb soundcard) and unbearable crackling in games like Into The Breach which runs using proton. Therefore I wanted to try using ALSA instead of pulseaudio but just cannot disable pulseaudio. Setting ‘autospawn = no’ in both /etc/pulse/client.conf and ~/.config/pulse/client.conf does nothing. It still restarts instantly after I kill it.
Does anyone how I can use ALSA or if it would even help?

1 Like

Well, one of the problems with this is that a lot of stuff expects and requires pulseaudio. Steam play (proton) being prime example, but I believe web browsers as well require it.

Fear not, there are things you can do to make pulse suck less and instead of removing you can make it not shit audio… But it does suck a lot.

Pop open the daemon.conf in your favorite text editor and change the lines

resample-method = speex-float-1
to
resample-method = src-sinc-best-quality

That’s a bigger hit to CPU load, but if you have a cpu in the last 6 or so years you’re probably well over the needed horse power.

and set

resample-method = speex-float-1 > resample-method = src-sinc-best-quality

default-sample-format = s16le > default-sample-rate = s32le

default-sample-rate = 44100 > default-sample-rate = 96000

stop the pulseaudio server and then start it again. If you’re still getting popping in your audio don’t forget to check alsamixer

user@machine:~/ alsamixer
and you get this

Select the right sound card and change the volume

I pretty much always get popping after it gets into the red at around 80.

I had neglected to do this on my most recent install, just did, audio is much better.

3 Likes

Thank you, the proton game sound is now working.

The mainboard line out still cuts out although that might not be related to pulseaudio. Some other people with a realtek ALC892 seem to have a similar issue. The AlsaMixer page for the ALC892 and the Line-out audio device in the gnome sound settings just flash sporadically in sync with the audio cutting out. And it is probably not a hardware issue since it works on my windows installation.

EDIT:
Did some more experimenting. Proton audio only works for me when timer-based audio scheduling is disabled. This is done in /etc/pulse/default.pa by appending tsched=0 to the line containing load-module module-udev-detect (from Archwiki).

It also still works when setting

resample-method = src-sinc-best-quality
default-sample-format = s16le
default-sample-rate = 48000

in daemon.conf but the default sample rate of 44100 seems to reintroduce the crackling.