Difference between revisions of "Linux Issues"

From Audacity Wiki
Jump to: navigation, search
(OSS vs ALSA: mention install on Debian as well as Ubuntu)
Line 116: Line 116:
Instead of compiling Audacity from sources you may want to use precompiled packages:
Instead of compiling Audacity from sources you may want to use precompiled packages:
* for Ubuntu (Dapper and Breezy): {{external|http://ubuntu-debs.de/app/audacity/}}
* for Ubuntu (Dapper and Breezy): {{external|http://ubuntu-debs.de/app/audacity/}}

Revision as of 16:33, 6 October 2007


One issue with using Audacity on Linux is that there are two different audio systems:

  • OSS (Open Sound System) has been around for a long time and is built-in to most Linux kernels. It works fine for 44100 Hz, stereo, 16-bit audio with ordinary sound cards and typical requirements. It's rather inadequate for professional audio work*1. Audacity fully supports OSS by default.
  • 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*1. It is standard in the current 2.6 kernel. Audacity supports ALSA in two ways:
  • ALSA comes with an OSS emulation layer. This is what Audacity will use by default if you don't do anything special. Unfortunately the OSS emulation layer is buggy on some systems, and so performance will typically be worse than if you use ALSA or OSS natively. If your system doesn't load OSS emulation at boot-up, you may have to load it manaually by running audacity as
$ aoss audacity

Note:you can install aoss by installing alsa-oss package on Ubuntu (or Debian, if it is not already installed)

  • Audacity can use ALSA natively if you compile it to use PortAudio v19 instead of the default, v18. Note that v19 is still evolving and not as well tested, but it is the only way that Audacity supports ALSA. Many users have reported good experiences with it. To use it, reconfigure Audacity like this:
./configure --with-portaudio=v19 --without-portmixer

*1 - This is actually incorrect, ALSA does not provide support, yet, for highend professional audio cards that have both 4dB and 10dB stepping. ALSA only currently supports 10dB stepping, this is a well known ALSA mixer issue and frequently addressed on ALSA's forums. Search for envy24 or any of the M-audio cards)

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:

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

Compiling Audacity

There's a whole separate page on this: Developing On Linux.

A more basic approach to the compiling business can be found at CompilingAudacityForBeginners

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. Audacity cannot use the audio I/O layer when it is in use by another application. If you are using Gnome, KDE or another window manager, be sure to disable the system sounds before starting Audacity.

  • If you are running a sound server such as eSound (ESD)  (often used with GNOME), asd or aRts  (often used with KDE) you will have to disable it before using Audacity. For users with OSS builds of audacity and aRts, you can also use the wrapper provided by aRts and run:
       $   artsdsp audacity
to launch audacity.
  • If you use Audacity with Ubuntu 6.06 LTS "Dapper" (i.e. with the GNOME desktop) and you are greeted with this error message, try disabling the eSound (ESD) server in the Sound Preference Panel. Navigate to "System" > "Preferences" > "Sound". The Sound Preferences panel opens. Click on the "Sounds" tab. See if the box next to "Enable software sound mixing (ESD)" is checked. Uncheck it and click on the "Close" button. Audacity should now work.
    • On IBM ThinkPad there is a BIOS option to disable modem. If modem is disabled then Ubuntu 6.06 will give error message as above, and other apps also will have no sound.
    • Uninstalling and reinstalling Audacity (using Synaptic) has been found to work in two cases on Ubuntu laptops (Thinkpad T23 running GNOME, Compaq Evo N410c running KDE). Yes, it was the same version before and after.
  • Another possibility is that 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 below.
  • 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.

USB microphone

If you have troubles with recording audio through your USB-microphone, go here:

VST plugins in Linux

If you are really keen on trying VST plugins in Linux, you should check out this site:

Although it is a little outdated, perhaps it is possible to get something up and running.

Also check out http://www.joebutton.co.uk/fst/ .

Testing Audacity 1.3.0b or CVS Head

Audacity 1.3.0 beta is not a stable release. However, it contains a number of improvements, among others; native ALSA support using portaudio v.19. If you have issues trying to compile Audacity beta versions take a look at Audacity_1.3_beta_testing.

Instead of compiling Audacity from sources you may want to use precompiled packages: