Turn off pulseaudio and use only ALSA in Ubuntu 11.04

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by DjBR » Mon Dec 05, 2011 1:29 am

We have set up this recording workstation, which is doing fine recording speeches.
Today I've got the first Audacity crash. I was able to recover the project.
Looking at .xsession-errors, there were erros with pulse-audio libraries.

Any hint on how disable pulseaudio (without installing ESound) and turning everything to pure Alsa?
Or is it better to run JACK and use this one?

Thanks a lot!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by Gale Andrews » Mon Dec 05, 2011 11:22 pm

DjBR wrote:We have set up this recording workstation, which is doing fine recording speeches.
Today I've got the first Audacity crash. I was able to recover the project.
Looking at .xsession-errors, there were erros with pulse-audio libraries.

Any hint on how disable pulseaudio (without installing ESound) and turning everything to pure Alsa?
Launch Audacity from the console with

Code: Select all

pasuspender -- audacity 
Or install the PulseAudio volume control applet (pavucontrol) and click on the "Configuration" tab to set the profile to "Off" for your sound card.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by DjBR » Mon Dec 05, 2011 11:56 pm

Ok Gale,

I am going to try that!
Thanks for the info !!!

steve
Site Admin
Posts: 81652
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by steve » Tue Dec 06, 2011 12:12 am

If all you want to do is to not use PulseAudio with Audacity, all you probably need to do is to set the recording and playback devices to your actual hardware (for example "hw:0,0") rather than setting them to "default" or "pulse". You should be able to set this in the Device Toolbar.

Usually I find that PulseAudio works fine, but I do find that setting the devices to not use Pulse provides better stability.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by DjBR » Tue Dec 06, 2011 12:19 am

I will try the simplest thing.
If it ever crashes again, then I will employ the first solution disabling it.

Thanks steve!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by Gale Andrews » Tue Dec 06, 2011 12:25 am

You can still find if you use the (hw) devices with pulse running that there will be a long hang after you press Play or Record while pulse temporarily suspends itself - this may even lead to a glitch at the start if you are recording something.

For general purposes I guess most users would want pulse so it's awkward to keep disabling it for recording, but if you essentially only record on that machine it may be OK.

Pulse will behave better without software playthrough on, so check that isn't on in Audacity's Transport Menu.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81652
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by steve » Tue Dec 06, 2011 12:36 am

Gale Andrews wrote:You can still find if you use the (hw) devices with pulse running that there will be a long hang after you press Play or Record while pulse temporarily suspends itself
I wasn't aware of that issue as I've never experienced that myself, but if that's the case then it would obviously be a good idea to test the system thoroughly before continuing with important recording projects.

The main advantage for me for keeping PulseAudio enabled on the system is that it is the easiest way that I can record sounds that are playing on the computer.
Gale Andrews wrote:Pulse will behave better without software playthrough on,
Software Playthrough is commonly reported to cause problems when using Pulse (or Jack) and it certainly causes problems on my machine, but I don't think that Software Playthrough is ever actually needed when using PulseAudio as routing can be done through PulseAudio.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by Gale Andrews » Tue Dec 06, 2011 12:52 am

steve wrote:Software Playthrough is commonly reported to cause problems when using Pulse (or Jack) and it certainly causes problems on my machine, but I don't think that Software Playthrough is ever actually needed when using PulseAudio as routing can be done through PulseAudio.
Given Audacity sets Audio to Buffer so low on Linux when Software Playthrough is on (ignoring its own Preferences), most people probably shouldn't use it with pulse.

Is the "routing" solution documented or answered in a Forum topic, or is it essentially the same principle as in Stereo Mix with Ubuntu 10 ?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81652
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by steve » Tue Dec 06, 2011 1:14 am

Gale Andrews wrote: Is the "routing" solution documented or answered in a Forum topic
I think I've mentioned it a couple of times on the forum.

Basically it's just:

Alt + F2 to open a command line, then:

Code: Select all

pactl load-module module-loopback
you should now have playback of the audio input through PulseAudio.
DON'T TRY THIS ON A LAPTOP UNLESS YOU HAVE HEADPHONES PLUGGED IN (instant feedback between the internal speakers and internal microphone).

To switch off (unload) the loopback module:
Open a terminal window and type:

Code: Select all

pactl list short
look at the output to find the module number for "module-loopback"
for example, if there is a line:

Code: Select all

25	module-loopback
then the module number is "25"

You can now unload the loopback module with:

Code: Select all

pactl unload-module 25
Details of this and other options are in the PulseAudio documentation:
http://www.pulseaudio.org/wiki/Modules
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Turn off pulseaudio and use only ALSA in Ubuntu 11.04

Post by Gale Andrews » Tue Dec 06, 2011 1:24 am

Thanks, Steve.

And I think there is Alsa-Utils in Ubuntu 11.x as well which has an "alsaloop" module for hardware playthrough? Is that preferable/has less latency than pulse loopback?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked