|This page lists problems and behaviors commonly encountered with Audacity on Linux which are not bugs (or are not bugs wholly under Audacity's control).
- 1 Compiling Audacity
- 2 ALSA and other sound systems
- 3 Error Initializing or Opening Sound Device
- 4 Playing while recording
- 5 Playing Note tracks - MIDI and Allegro playback
- 6 USB microphones
- 7 VST plug-ins on Linux
- 8 Project Rates
- 9 JACK
- 10 MP3 Import and Export
- 11 Hi-DPI
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.
ALSA and other sound systems
Audio on Linux is provided by a number of different audio systems:
- ALSA (Advanced Linux Sound Architecture) provides drivers for a vast range of soundcards and is the base system for most Linux PCs. Very low latencies and multi-channel audio are possible. Device sharing is limited and possibly complex, unless hardware mixing is available. It is standard in the Linux 2.6 and later kernel.
- PulseAudio is a software mixing and control system built on top of the soundcard drivers so that many applications can share the same sound device. Many Linux distributions provide a default "pulse" device that is selectable in Audacity when ALSA host is chosen. PulseAudio takes exclusive control of the sound device and manages the connection between software and the device drivers. It can support multiple soundcards simultaneously. Latency may be greater than when accessing the soundcard directly through ALSA. It is highly recommended to use the "Pulse Audio Volume Control" (pavucontrol) device control interface when using Audacity with PulseAudio.
- JACK (Jack Audio Connection Kit) is a very low latency audio routing layer intended for not only accessing soundcards (including Firewire devices that may not be usable any other way) but also piping audio between applications in real time (recording the output of one application in another and so on). It is aimed firmly at professional and home studio users, and rarely installed by default.
- OSS (Open Sound System) was the original sound system for Linux and although superseded by ALSA, remains an option in many distributions. It works fine for 44100 Hz, stereo, 16-bit audio with ordinary soundcards and typical requirements. It's rather inadequate for low latency and multi-channel recording but may be required for ancient soundcards. The project was revived in 2002 under the name of OSS4 by "4Front Technologies" as proprietary software, including closed source drivers for some soundcards. In 2007, parts of OSS4 were released under an open source license (GPL).
ALSA: 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. "Default" is the same as "pulse" on systems where PulseAudio is default sound system.
PulseAudio: Audacity's PulseAudio support generally works well. PulseAudio doesn't support ALSA's mixer interface so Audacity's Mixer Toolbar input slider is disabled under PulseAudio. Audacity can freeze using PulseAudio if playback or recording are started or stopped very rapidly or frequently. Playback can also occasionally be distorted or excessively fast. Patches are welcomed to improve our PulseAudio support. Meantime a reported workaround for freezes or glitched or skipped playback is to launch Audacity from the terminal with the following command:
|env PULSE_LATENCY_MSEC=30 audacity|
If you get underruns noted in the terminal or if playback does not start immediately, try a higher number with the PULSE_LATENCY_MSEC command. If the problem is unchanged, try a lower number.
To avoid opening the terminal each time, it may (depending on the distribution) be possible to add the required latency command directly to the application launcher. If not, you can (with root permissions) edit /usr/share/applications/audacity.desktop and insert the pulse latency command directly after "Exec=", for example:
|Exec=env PULSE_LATENCY_MSEC=30 audacity %F|
If you compile Audacity from source code you can instead edit the file /src/audacity.desktop.in.
Note that your current settings at "Audio to buffer" in Audacity's Recording Preferences and the existing "default-fragments" and "default-fragment-size-msec" settings in /etc/pulse.conf will also affect the behaviour of PULSE_LATENCY_MSEC.
If you are on Fedora using pulse you may also have to turn off Fedora's timer-based scheduling.
JACK: JACK support in current Audacity is still somewhat experimental but as of August 2014 essentially works with a few bugs or limitations.
OSS: OSS support in current Audacity should work but is not heavily tested because native OSS systems are now rare.
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 soundcard 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.
- 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 soundcard, 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 soundcard 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 Dropdown Menu to split to mono then delete one of the tracks.
Playing Note tracks - MIDI and Allegro playback
Note tracks containing MIDI data (or Allegro data) can now be played in Audacity. Loop Play and Play Cut Preview also work with Note tracks. But note that there will no use of the Playback meter while Note tracks are played.
In order to achieve MIDI playback on Linux you will need to install, and run, additional software, a software synthesizer
Please see this page in the Audacity Wiki for details: Enabling Note Track playback on Linux.
If you have troubles with recording audio through your USB microphone, see USB mic on Linux.
VST plug-ins on Linux
Audacity supports VST effect plug-ins on Linux but only a small number of native Linux VST's exist. If a specific VST effect is required on Linux, it may be necessary to employ workarounds such as those mentioned below, or to investigate if alternative LV2, LADSPA or Nyquist plug-ins can provide the effect you're looking for.
If the VST you require is not supplied for Linux, the easiest solution is to run that plug-in in Windows running in 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 otherwise 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.
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).
- If the Audacity Project Rate is set to a sample rate that your soundcard 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 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 soundcard 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 application was launched before Audacity.
MP3 Import and Export
- If you see the message "Audacity was compiled without MP3 files support" when trying to import an MP3, this means you do not have libmad installed. To fix this, check if your distribution's repositories have an alternative less restricted build of Audacity, such as the audacity-freeworld package for Fedora.
Alternatively, install libmad (including development packages) and recompile Audacity with libmad. You should then 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
On Fedora, here are some alternative instructions to rebuild Fedora's Audacity RPM with libmad support.
- 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.
- 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.
On high resolution screens, Audacity as shipped by distributions or as default-compiled is likely to have very small toolbars and graphical elements but excessively large text - see Linux HiDPI Support. It is possible to work around this by compiling wxWidgets --with-gtk=3 then recompiling Audacity, or by setting a change of monitor resolution when launching Audacity.
No detailed testing has been done yet on Audacity built against GTK3-enabled wxWidgets.