|This page lists problems and behaviours commonly encountered with Audacity on Linux which are not bugs (or at least are not bugs directly under Audacity's control).
If you have issues trying to compile Audacity from source code, take a look at Developing On Linux and Compiling Audacity Step by Step Guide. The latter has some example straightforward steps for compilation on Ubuntu or Debian-based distributions.
Instead of compiling Audacity, you may prefer to use a pre-compiled package supplied by your distribution. A listing of these can be found on the Linux download page. On Ubuntu you can also try the daily PPA installation package for the current Audacity code, though this might have bugs which are yet to be fixed.
OSS, ALSA and other sound systems
Audio on Linux is complicated by the fact that there are a number of different audio systems:
- OSS (Open Sound System) has been around for a long time and is built-in to older Linux kernels. It works fine for 44100 Hz, stereo, 16-bit audio with ordinary sound cards and typical requirements. It's rather inadequate for low latency and multi-channel recording.
- ALSA (Advanced Linux Sound Architecture) is newer, and doesn't support quite as many older sound cards, but it supports many newer ones and supports many advanced and professional features. Very low latencies and multi-channel audio are possible. It is standard in the current 2.6 kernel, and used by many modern Linux distributions.
- PulseAudio is a software mixing and control system built on top of the sound card drivers so that many programs can share the same sound device. It does so at the cost of the low latency features of ALSA, and hides the features of a specific sound card behind a generic interface. This is the default audio system on Ubuntu and several other Linux distributions.
- JACK (Jack Audio Connection Kit) is a very low latency audio routing layer intended for not only accessing sound cards (including Firewire ones that can't be used any other way) but also piping audio between applications in real time (recording the output of one program in another and so on). It is aimed firmly at professional and home studio users, and rarely installed by default.
Audacity releases from 1.3.x onwards support ALSA, OSS and JACK to varying degrees. PulseAudio users have to rely on PulseAudio's emulation of ALSA to work, which can be problematic. Legacy Audacity 1.2.x only supports OSS.
Audacity's ALSA support is the default and considered stable. The correct device to use on out-of-the-box ALSA setups is "Default". This provides software mixing and resampling of multiple streams as found on other operating systems, and is a good alternative to a sound server. This is almost always the right sound device to use, and you can ignore the others.
OSS support in current Audacity should work but is not heavily tested because native OSS systems are now rare.
JACK support in current Audacity is still somewhat experimental but as of October 2011 essentially works with a few bugs or limitations.
If configure fails, with errors like:
- $ configure: warning: CC=gcc: invalid host type
- $ configure: error: can only configure for one host and one target at a time
- $ configure: error: /bin/sh './configure' failed for lib-src/portaudio-v19
then put "env -i" in front of the command to supress the CC and CXX environment variables.
- $ env -i ./configure --with-portaudio=v19 --without-portmixer
You may also need to make clean before re-compiling if you have already built audacity with different configure options.
- $ make clean
Portaudio v19 from repository
If you are having issues, try a newer Portaudio snapshot:
- clear audacity-src-1.2.x/lib-src/portaudio-v19/
- download pa_snapshot_v19.tar.gz from http://www.portaudio.com
- untar into directory mentioned above
- go back to audacity-src and run ./configure..., make, make install again
Please post your experiences with Audacity and PortAudio v19 directly to Audacity_PortAudio_v19. As noted there, known issues currently exist with v19 if playing audio with OSS emulation enabled under ALSA.
Error Initializing or Opening Sound Device
If you see the following error message while launching Audacity:
"Error Initializing Audio: There was an error initializing the audio i/o layer. You will not be able to play or record audio. Error: Host error."
then Audacity cannot access your sound card properly. There could be a number of reasons for this:
- Audacity cannot use the audio I/O layer when it is in use by another application. If you are running a sound server such as eSound (ESD) (often used with GNOME desktops) or aRts (often used with KDE), or some other player application is using the sound device, you will often have to disable it before using Audacity.
For users with OSS builds of Audacity and aRts, use the wrapper provided by aRts and run:
$ artsdsp audacity
to launch Audacity. If you use Ubuntu and the GNOME desktop and receive this error, navigate to . Click on the "Sounds" tab, uncheck "Enable software sound mixing (ESD)" and hit "Close".
If you have a recent version of ALSA that enables =Dmix, try setting the conflicting application to use the ALSA default device as well as Audacity. This may let Audacity share the device via dmix rather than you having to shut it down before using Audacity.
lsof | grep '/dev/snd/' # for devices using ALSAlsof | grep '/dev/dsp' # for devices using OSS
- On IBM ThinkPad there is a BIOS option to disable modem. If modem is disabled then Ubuntu 6.06 will give the same error message as above, and other applications also will have no sound. Uninstalling and reinstalling Audacity (using Synaptic) has also been found to fix this in two cases on Ubuntu laptops (Thinkpad T23 running GNOME, Compaq Evo N410c running KDE).
- Somehow, the link to /dev/dsp, or its permissions, were changed without your knowledge by an unknown process. What you should do (as root) is:
$ rm /dev/dsp;ln -s /dev/dsp0 /dev/dsp #also try /dev/dsp1,2,etc.
$ chmod 666 /dev/dsp0
$ chmod 666 /dev/dsp
If you are using udev in the 2.6 kernel then you may need to alter /etc/udev/rules.d/*.rules to set the correct permisions up permanently. Not to forget the obvious, some distributions (Debian, Gentoo, etc.) have an audio group that has the appropriate permissions. Make certain that Audacity users are members of this group.
- Another possibility is you are using the ALSA device with a version of Audacity built with PortAudio v18, but don't have the OSS emulation modules installed, which you will need to do. See OSS vs ALSA above.
- If you receive this error:
"Error opening sound device. Please check the input device settings and the Project Sample Rate" or "Please check the output device settings and the Project Sample Rate"
even when no other device is using the sound card, and your permissions are correct, it simply means there's a problem with your Audacity settings. You may have a sample rate selected that your sound card does not support. You can alter this by changing the Project Rate at the bottom left of the Audacity window. If you receive the "check the input device settings" message, try setting the "recording channels" in the Audio I/O tab of Preferences to mono or stereo, and if you are recording something playing on the computer, turn off "software playthrough".
Playing whilst recording
Playing the existing tracks in your project whilst recording new ones should work on any hardware that is supported by the Linux drivers, and is capable of full-duplex recording, i.e. playing back and and recording at the same time. For instructions on how to enable playback see the Audacity FAQ.
There is however a Linux-specific issue caused by the way audacity 1.2.x communicates with the sound card. This means that for recording in audacity 1.2.6, (or audacity 1.3.x using portaudio-v18) you have to set audacity to record in stereo, as mono recordings come out too low pitched and very poor quality. To do this see this FAQ. If you only want a mono track you can split the stereo track into two mono tracks and then delete one of them.
This problem only shows up when using the OSS emulation layer for ALSA, and trying to record with a different number of channels to the number being played back. So if you were to play back in mono, then you would be able to record in mono, but audacity doesn't support that. If you actually have native OSS drivers then this won't be a problem for you.
If you use audacity 1.3.2 or newer you are strongly recommended to compile using portaudio-v19 so you have native ALSA support, and use that in preference to the OSS option. Recording in mono then works normally.
If you have troubles with recording audio through your USB microphone, see USB mic on Linux.
VST plug-ins on Linux
For anyone that really wants to run VST effects in Audacity on Linux , the easiest way is to run Windows as a virtual machine. Virtualbox is available for most Linux distributions. Although the performance of Audacity may be a bit sluggish in a virtual machine it will probably be good enough to be usable. VST support in virtualised Windows should be the same as running on a real Windows machine.
The Windows version of Audacity will work in Wine, though some versions may give an R6034 error when run. A possible workaround is to use PlayOnLinux and install POL_Install_msvc90 and POL_Install_vcrun2008. (See this Audacity forum topic for more information). Several VST effects have been tested in Audacity under Wine and found to work, but searching Google suggests that not all VST effects are Wine-compatible. VST plug-ins that require a dongle do not work in Wine.
There are a variety of other methods of running VST plug-ins in Linux, including using Wineasio or use JACK to connect a native Linux build of Audacity to a Windows VST host (JACK is not currently supported by Wine so module-jack-source and module-jack-sink are required). Running VSTs on Linux is not without complications, so it may be worth investigating if alternative LADSPA or Nyquist plug-ins can provide the effect you're looking for.
- If the Audacity Project Rate is set to a sample rate that your sound card does not support, (including ones in the project rate list which might also be unsupported) Audacity will try to choose a supported sample rate for recording and playback, resampling on the fly. This does not always work correctly, though from 1.3.5 onwards this has been much improved and there should now rarely be problems with invalid rates.
- When importing a first audio file, 1.3.3 and later will try to set the Project Rate to the rate of that imported file, even if that rate is unsupported by the audio hardware. This does not always work, however.
JACK is a low-latency audio server, written for POSIX operating systems such as GNU/Linux and Apple's OS X. It can connect a number of different applications to an audio device, as well as allowing them to share audio between themselves. It's one way to get multichannel support in Linux and also a high performance, low latency sound server.
Current Audacity supports interfacing with JACK. It can be enabled (or disabled) by configuring PortAudio with JACK and ALSA, although in practice JACK gets enabled whenever the JACK headers are present on the build system. JACK has not been extensively tested, but Audacity's support for it has tended to improve over time, so it is strongly recommended to use the current release or HEAD version of Audacity.
Note that JACK takes exclusive control of the audio device. If the computer has only one sound card it is not possible to use Audacity with ALSA while JACK is running.
When using JACK, the audio system must be configured to use the device that you require, then JACK provides ports for inputs/outputs. The default ports that appear in Audacity's Device Toolbar are the "system" inputs and outputs. Audacity is allocated input and output ports on demand by JACK, as are other JACK-aware applications. For example, if you run a drum machine such as Hydrogen, JACK provides ports for Hydrogen, and the input device choices in Device Toolbar will then be "system" or "Hydrogen".
Issues fixed since Audacity 1.3.4 include:
- Crashes as soon as play or record is started if JACK device is selected in Audacity Preferences
- Crashes when recording against playback (overdub recording)
- Dropouts in playback and/or recording (raising the frame size to 4096 samples from the default 1024 was a known workaround)
- Audacity required the same sample rate as JACK.
The following behaviours were reported with Audacity 1.3.14 alpha at June 4 2011 SVN r11192 but were not found as at Oct 7 2011 r11272 (tested on Ubuntu 10.10 with Jack1 from the KXStudio-Team PPA and jackd2 1.9.5~dfsg-19ubuntu1 which is the standard Ubuntu 10.10 package).
- Opening Audacity for the first time when JACK is running may be very slow, as may changing the audio device Host from ALSA to JACK. Audacity may appear to freeze for a short while.
The following are still issues with Audacity 1.3.14 alpha at Oct 7 2011 r11272 on the same test rig, although only the first is a significant problem.
- Enabling the recording meter before any recording or playback has occurred is likely to cause Audacity to crash. Workaround: Before recording the first track in a session, click "Pause" then "Record" to enable the recording meter.
- Audacity does not respond to JACK patchbay in qjackctl.
- Audacity does not support JACK Transport Control protocol.
- When opening jackd and Audacity, the Audacity connections in qjackctl are not permanently available, only appearing when playback or recording is started, and disappearing when stopped.
- The ports for other JACK-aware applications will not automatically be available to Audacity unless the program was launched before Audacity.
MP3 Import and Export
- If you see the message "Audacity was compiled without MP3 support" when trying to import an MP3, this means you do not have libmad installed. To fix this, install libmad (including development packages) before compiling Audacity. Once libmad is installed, compile with libmad and you should see a message like this at the end of ./configure, indicating that libmad has been found and Audacity built with MP3 import support:
- Finished configure:
- with libresample
- with libid3tag
- with libmad <<<
- with LADSPA plug-ins
- with Nyquist plug-ins
- with vorbis
- with portmixer
- with portaudio v18
- with soundtouch
- with help
- MP3 export requires you to have the LAME package already installed. For help, see the Linux section of our LAME instructions. There is a known problem that when exporting MP3s, Audacity release builds look for "libmp3lame.so". However, the normal symlink is "libmp3lame.so.0". The "libmp3lame.so" target is only available if users install packages for software development or build LAME from source code. This is now fixed in our development source code. If you need to, simply rename "libmp3lame.so" to "libmp3lame.so.0" (that is, add a dot and a zero) to have Audacity accept it.
- A few users of Audacity 1.3 packages supplied by their distributions have reported that they don't have an MP3 option in the "Save as type" dropdown after clicking this thread on our Audacity forum. If this is the case, either the package has not been built correctly, or has been compiled with MP3 support disabled. A few distributions take this view for licensing reasons. You can verify the position by clicking and looking at the "Build Information" tab. This is independent of whether LAME exists on the system, and depends on the options when Audacity was compiled. If you have installed an Audacity package compiled without MP3 support, look for an alternative package, or compile Audacity from our source code. , or that the MP3 option is only available with Export Multiple. See