Linux Issues

Compiling Audacity
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. It's best to install native OSS drivers for your device rather than installing the OSS emulation modules for ALSA and choosing ALSA host.


 * 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. Latency is greater than when accessing the sound card directly through ALSA. Many Linux distributions that come with PulseAudio provide a default "pulse" device that is selectable in Audacity when ALSA host is chosen. PulseAudio will take exclusive control of the sound device.


 * 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'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.

Configuration errors
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:
 * delete the /lib-src/portaudio-v19/ directory
 * download pa_snapshot_v19.tar.gz from http://www.portaudio.com
 * untar into directory mentioned above
 * go back to the source tree 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.


 * 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.


 * 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 while 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 (playing and recording at the same time). For instructions on how to enable playback see this Frequently Asked Question: Can I play a track while recording a new one on top of it?.


 * Using ALSA's OSS emulation will cause low pitched poor quality recordings if recording a mono track while playing another track. If you don't have access to native OSS drivers, record in stereo, use the Track Drop-Down Menu to split to mono then delete one of the tracks.

USB microphones
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.

Another option is to use FST for which FeSTige provides a graphical front end. Reports of how well these methods work are welcomed.

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.

Project Rates

 * 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. In most cases this should work correctly.


 * When importing a first audio file Audacity will try to set the Project Rate to the rate of that imported file, even if that rate is unsupported by the audio hardware.

JACK
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 improved 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".

It is recommended to set the Default Sample Rate and Default Sample Format in Audacity's Quality Preferences to the same as used by JACK.

The following issues exist:
 * 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. To set up alternative routings in qjackctl you must "Pause" recording or playback, make connection changes in qjackctl then release Pause.
 * 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 v19
 * 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 in the Audacity Manual. 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.


 * For licensing reasons, some Linux distributions do not compile in MP3 export support in packaged versions of Audacity, so there is no "MP3 Files" option in the file export window. You can verify the position by clicking and looking at the "Build Information" tab. This is independent of whether LAME exists on the system. If you have installed an Audacity package compiled without MP3 support, look for an alternative package, or compile Audacity from our source code.