# Recorded sound is 11X too fast and underruns

**URL:** <https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286>\
**Category:** GNU/Linux\
**Created:** [May 29, 2018, 11:10pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286 "2018-05-29T23:10:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cloud](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cloud](https://forum.audacityteam.org/u/cloud)\
**Post date:** [May 29, 2018, 11:10pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/1 "2018-05-29T23:10:43Z")

</div>

I am running Audacity 2.1.2 installed via apt on a new Ubuntu 16.04 box. The project sample rate is 44.1kHz. Software playthrough is disabled. Audacity is having 2 problems with recording:

1. The recorded sound is 11X to fast (i.e., it is sampling at around 4kHz) and thus very short. Eventually there are underruns too.
2. Immediately after I launch Audacity (recording or not) it causes other programs to have a similar problem. For example, the browser will record with the pitch 11X too high – though it will insert skips while Audacity does not. The problem is not resolved until I reboot the computer.

The forums suggest checking the sound driver and reinstalling Audacity. I am using built-in motherboard sound. My motherboard is an ASRock X299 OC Formula and the realtek driver is installed. After reboot, before I run Audacity, sound is working. I can record and playback in a web browser and in ardour4. I can also record a sound with:

```plaintext
arecord -r44100 -fS16_LE /tmp/file.wav
aplay /tmp/file.wav

```

Repeated recording and playback work just fine (in the browser, with arecord, or ardour4) so long as I don’t start Audacity. So it appears that the driver is working for most programs. In all cases I am using the “default” device which is Line In on the motherboard.

As suggested on the forums, I tried removing the audacity config file from ~/.audacity-data and reinstalling using

```plaintext
apt-get remove audacity
apt-get install audacity

```

but alas the recording problem remains.  
I do notice the following messages when I start Audacity. I don’t know if they’re relevant.

```plaintext
ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4611
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4611
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4611

```

Also when I’m recording I can see Audacity showing up in pavucontrol (pulse audio) as

```plaintext
ALSA plug-in [audacity]

```

and actually it fails in a few seconds as Audacity prints:

```plaintext
1: »0⋅1/1⋅1/1⋅1/1
1: »0⋅1/1⋅1/1⋅1/1
ALSA lib pcm.c:7963:(snd_pcm_recover) underrun occurred

```

Occasionally there’s a more interesting one:

```plaintext
Expression 'err' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3355
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3881
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4253

```

I also tried to compile the latest Audacity code (2.2.2) but this appears it will take some more effort, as I get “Audacity requires expat to be enabled.” despite expat being installed actually. In any case, it seems unlikely that Audacity 2.1.2 wouldn’t work on such a stable OS/mobo combination.

I also tried uncommenting this line in /etc/pulse/daemon.conf:

```plaintext
; default-sample-rate = 44100

```

and restarted pulseaudio as suggested on other forums, but it did not restore recording function (until reboot).

I would really like to use Audacity for recording on Linux. But I have tried many suggestions (check sound driver, reinstall audacity, remove config, change pulse config) and nothing seems to fix this problem of losing 91% of the samples.

Are there any other suggestions?

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [May 30, 2018, 8:18am UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/2 "2018-05-30T08:18:52Z")

</div>

This is puzzling. I also have Ubuntu 16.04, and the repo version of Audacity works fine with my on-board sound card (ALC269VC Analog).

When you say that it plays 11x too fast, is it also playing very high pitched, or just very fast at normal pitch?

---

<div class="post-metadata">

**Author:** ![cloud](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cloud](https://forum.audacityteam.org/u/cloud)\
**Post date:** [May 30, 2018, 3:14pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/3 "2018-05-30T15:14:17Z")

</div>

> [@steve](#):
>
> When you say that it plays 11x too fast, is it also playing very high pitched, or just very fast at normal pitch?

It is playing back very high pitched.  
If I apply a 0.09X speed adjustment to the result, it has the correct pitch and is intelligible (but missing the highs of course).

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [May 30, 2018, 4:39pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/4 "2018-05-30T16:39:42Z")

</div>

In the Audacity Help menu, find the “Audio Device Info” and click on it. When the window appears, click “Save” and save the info file somewhere convenient, then attach it to your reply.

---

<div class="post-metadata">

**Author:** ![cloud](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cloud](https://forum.audacityteam.org/u/cloud)\
**Post date:** [May 30, 2018, 6:27pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/5 "2018-05-30T18:27:04Z")

</div>

> [@steve](#):
>
> In the Audacity Help menu, find the “Audio Device Info” and click on it. When the window appears, click “Save” and save the info file somewhere convenient, then attach it to your reply.

[audio\_devices.txt](https://forum.audacityteam.org/uploads/short-url/lfNaq90WcdYVy7wCsTohK3FppvZ.txt) (3.36 KB)

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [May 30, 2018, 7:19pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/6 "2018-05-30T19:19:05Z")

</div>

OK, there’s something strange there: There’s no “hw:0,0” device.

Try rebooting your computer and do not launch any audio capable applications. If you have Jack installed, ensure that it does not automatically start on log-in.  
Then launch Audacity and get the Audio Device Info again.  
Is the info the same?  
Is there a “hw:0,0” device listed?

Side issues that may or may not be related:  
How did you install Ardour 4? (the Ubuntu 16.04 repo version is Ardour 3)  
How are you “recording in a web browser”?

---

<div class="post-metadata">

**Author:** ![cloud](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cloud](https://forum.audacityteam.org/u/cloud)\
**Post date:** [May 31, 2018, 6:46pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/7 "2018-05-31T18:46:47Z")

</div>

> [@steve](#):
>
> Try rebooting your computer and do not launch any audio capable applications. If you have Jack installed, ensure that it does not automatically start on log-in.  
> Then launch Audacity and get the Audio Device Info again.  
> Is the info the same?  
> Is there a “hw:0,0” device listed?

I rebooted; jack is not running (or at least there is no process with “jack” in the name). And so then I went straight to Audacity. The info is identical to what I already uploaded. There is no “hw:0,0”.

Interestingly, Audacity prints the following messages (repeated many times) while generating the info.

```plaintext
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( outputParameters, hostApi, StreamDirection_Out )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1846

```

There is no corresponding error for StreamDirection\_In. But sometimes there is this when generating the info:

```plaintext
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1768
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave

```

Also the next time I start Audacity it generates some errors I didn’t see before:

```plaintext
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2840

```

Also interestingly, if I plug in a USB recording device (Alesis io2),  
the info reported by Audacity is also the same (there is no io2) yet  
the io2 appears in the output of “aplay -lL” and “arecord -lL”.  
[aplay.txt](https://forum.audacityteam.org/uploads/short-url/mx0yduZRVU5BG0YK2HWPlef1M6V.txt) (4.28 KB)  
[aplay1.txt](https://forum.audacityteam.org/uploads/short-url/pFTFr01IvRShFL49eKtczpMvgHm.txt) (4.28 KB)  
[arecord.txt](https://forum.audacityteam.org/uploads/short-url/iIBZ7aca9GW3QxcmfegwX7XIoKL.txt) (3.17 KB)  
I don’t know why Subdevices on 3 of the devices changed from 0/1 to 1/1 the second time I ran “aplay” (nor have I researched that). Anyways, the problem is with recording, not playback.

> [@steve](#):
>
> How did you install Ardour 4? (the Ubuntu 16.04 repo version is Ardour 3)

```plaintext
apt-get install ardour

```

> [@steve](#):
>
> How are you “recording in a web browser”?

[https://online-voice-recorder.com/](https://online-voice-recorder.com/)

No plug-ins needed… apparently JavaScript must support it. It’s probably going through the default pulseaudio device, since I don’t see a way to select the device outside of pavucontrol.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [June 1, 2018, 9:18am UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/8 "2018-06-01T09:18:27Z")

</div>

> [@cloud](#):
>
> Also interestingly, if I plug in a USB recording device (Alesis io2),  
> the info reported by Audacity is also the same (there is no io2)

Audacity only looks for devices on start-up, and when you explicitly tell it to (Transport menu \> Rescan Audio Devices).  
If you plug in a USB device while Audacity is running, Audacity won’t see it.  
If you plug in the device first and then start Audacity, Audacity should see it. Does it?

---

<div class="post-metadata">

**Author:** ![cloud](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cloud](https://forum.audacityteam.org/u/cloud)\
**Post date:** [June 1, 2018, 9:32pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/9 "2018-06-01T21:32:57Z")

</div>

> If you plug in the device first and then start Audacity, Audacity should see it. Does it?

Yes, how about that!  
Indeed, sometimes Audacity does see the io2 if I already had it plugged in, and hadn’t run Audacity before (since reboot).  
In that case the device info reported is as follows.  
[audio\_devices4.txt](https://forum.audacityteam.org/uploads/short-url/aaNfMXqhl4V0skrGVgfBbkhQGSo.txt) (7.52 KB)  
When I try recording with the io2, it seems to play back at a _lower_ pitch. This is the case when I select either “io2: Front Mic:0” or “io|2: USB Audio (hw:2,0): Front Mic:0” as the input. It appears that it is recording at 48kHz even though my project rate (and track rate) are 44.1kHz. (If I change the track rate to 48kHz after recording, the pitch is corrected). This is puzzling because the “io2” and “io|2” devices both support 44.1kHz (as well as 48kHz). Though the 44.1 vs 48 problem seems more common:

> **[Alesis iO2 Express sample rate](https://homerecording.com/bbs/threads/alesis-io2-express-sample-rate.373020/)**
>
> I'm thinking of buying the iO2 Express but there's one thing I'm not sure of. The web site says, "Record up to 24-bit, 48 kHz audio into virtually any software". But I've heard that it does 48 kHz only, and not 44.1 kHz. Is this correct?

> [@recording at wrong sample rate but correct pitch and speed](https://forum.audacityteam.org/t/recording-at-wrong-sample-rate-but-correct-pitch-and-speed/43501/1):
>
> For some reason audacity wants to record at 48khz even when I have it set at 44khz in both the software and my audio card. Even when I set it to record at 48khz it still sounds fine as I’m recording but when I export it still sounds bit crushed. Even when it’s exported at 48khz. As you see here everything is set correctly: [http://i.imgur.com/oGMbPDO.jpg](http://i.imgur.com/oGMbPDO.jpg) It was recording fine until I accidentally left another audio program (sample librarian) open when I wanted to record. Now I get bit crushing …

and perhaps more work-aroundable (I might consider changing my project to 48kHz… but not 4kHz).  
  
  
Do any of these observations shed any light on the issue I was having with sound input from the built-in device?

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [June 2, 2018, 1:19pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/10 "2018-06-02T13:19:41Z")

</div>

> [@cloud](#):
>
> audio\_devices4.txt

In this one, you have:

```plaintext
Device name: HDA Intel PCH: ALC1220 Analog (hw:0,0)

```

This suggests that when you previously tried, some other application had grabbed exclusive access to the hw:0,0 device, so it was not available for Audacity.  
All other “hw:0,x” devices are physically part of the same device, so it is not surprising that the sound system gets messed up when Audacity tries to access a sub-device when another application has grabbed exclusive access to the first sub-device.

Try selecting hw:0,0 as the recording and playback device (now that it is available).

There’s something not quite right about your sound system - quite possibly due to the on-board sound card not being fully supported on Linux. If we can achieve a reasonable workaround, then that may be the best we can achieve.

---

<div class="post-metadata">

**Author:** ![chorca](https://forum.audacityteam.org/user_avatar/forum.audacityteam.org/chorca/32/32960_2.png) [@chorca](https://forum.audacityteam.org/u/chorca)\
**Post date:** [June 24, 2018, 4:54am UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/11 "2018-06-24T04:54:33Z")

</div>

I’m having the exact same issue here, and it’s been driving me crazy.

Recording from the microphone input (tried default and specifying the source manually) records _way_ too fast… the line creeps across the screen, and when I do play it back, it’s just unintelligibly fast.  
Changing the project rate to 384,000 Hz helps a little, but it’s still much too fast.

This is using Audacity 2.2.2 from the [https://launchpad.net/~ubuntuhandbook1/+archive/ubuntu/audacity](https://launchpad.net/~ubuntuhandbook1/+archive/ubuntu/audacity) repo.

I’ve attached my audio diagnostic output as well, this is on Xubuntu Artful (17.10) on an MSI X370 AMD motherboard. I’ve also added some info from lspci and dmesg on startup.  
I also went ahead and booted into a live USB of 18.04 to validate if it was still an issue, and the same thing happened using the same version of Audacity within the live distro.  
[lspci-dmesg.txt](https://forum.audacityteam.org/uploads/short-url/gMxYYzYMAgxrNZSHNsS7Ygvu0Pv.txt) (2.16 KB)  
[diaginfo.txt](https://forum.audacityteam.org/uploads/short-url/aODNPcdtEvtdKetgPAnYvVn6q52.txt) (7 KB)

---

<div class="post-metadata">

**Author:** ![Sarmatian](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/59ef9b/32.png) [@Sarmatian](https://forum.audacityteam.org/u/Sarmatian)\
**Post date:** [May 22, 2019, 11:48pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/12 "2019-05-22T23:48:42Z")

</div>

Hi!

Little history first.

Over 10 years ago I bought cheap headset with mic. It’s old but it still works. It plugs into USB. Pulse audio always disabled it on hello. In past my solution was to rip the pulse audio out of Xubuntu and depend entirely on alsa. However, when I got to play with gui sound recorder audacity it just slow recorded everything, so I heard instead of my voice, some chipmunk. So until now, I was opting to never use audacity.

What I did to change that after a decade on this 18.04?

Well, first I picked slow and bad fight with Pulse Audio to make the mic work. I was just messing with setting. Switching things off and on. Googling for any edits to /etc/modprobe.d/xxx.conf and /etc/pulse/xxx.conf files, which i run with pulseaudio -k & pulseaudio --start. I was installing different alsa mixers to make it break in. **I killed all boost to mic and I think this was a major thing for mic to react to my voice.** However all other sounds, which worked just fine were going to hell. Furthermore mic sounds were not ending into any system sounds or recordings. Nothing helped. Then in the end all sounds went off. So, I had to remove all changes to all those xxx.conf files in hope to get them back. Nothing helped. So out of desperation I pressed few times too many “amixer sset Master unmute” and “amixer -D pulse sset Master toggle” and in the end I got a surprise. I got all sounds back plus as the bonus… the mic. Yay! I still am not sure, what was exactly broken with pulseaudio or mic or how I finally fixed it. It is a miracle. I am in settings for pulseaudio exactly there where I was, when I discovered this issue with my mic. Then it came time for trying audacity out. I got chipmunks again. Decade passing by and… still chipmunks. Depressing. The “play-at-speed” feature set at 0,1 played it somehow naturally. However arecord and aplay were recording and playing everything just fine. After my traumatic experiences with getting mic to work, I just refused to do anything with sound settings in pulseaudio. Audacity broke it, then audacity fix it, right?

My workaround for the chipmunks in audacity.

**Instead of “pulse” I set playback “iec958” and correct mic recording device, which in my case is “HDA intel PCH:ALC1220 altAnalog (hw:0,2):line1”. Then I record for a moment. Though there is no sound in recording, the speed of recording suddenly goes at 1sec per 1sec. After undo-record, I reset “pulse” back for playback and “pulse:front mic1” for recording. I record again. This time audacity records from my mic at normal speed and then plays it at normal speed. No chipmunk there no more and no other sound artifacts either.**  
My sound cards are (command\> inxi -Fxz):  
Card-1 Intel 200 Series PCH HD Audio driver: snd\_hda\_intel bus-ID: 00:1f.3  
Card-2 NVIDIA GP104 High Definition Audio Controller driver: snd\_hda\_intel bus-ID: 01:00.1  
Sound: Advanced Linux Sound Architecture v: k4.15.0-45-generic

List of my capture devices is (command\> arecord -l):  
card 0: PCH [HDA Intel PCH], device 0: ALC1220 Analog [ALC1220 Analog]  
Subdevices: 1/1  
Subdevice #0: subdevice #0  
card 0: PCH [HDA Intel PCH], device 2: ALC1220 Alt Analog [ALC1220 Alt Analog]  
Subdevices: 1/1  
Subdevice #0: subdevice #0

My Audacity is version 2.2.1 from Xubuntu 18.04.01’s depo.

My hope is, that my workaround will work for other sad Ubuntu users, who are hitting this chipmunk issue with Audacity.

This gives this application a second chance. **Just this workaround needs to be done, after each time Audacity is started.** The correct recording and playing pattern for some reason is not kept by audacity permanently around. Little annoying tbh. My guess is the issue is that mic uses max 48000, while default in pulse and in audacity are 44100 and while my sound card has settings, which goes even up to 384000 Hz. I was messing recordings with setting different Hz, without “record undo” and once, though not repeatably I succeeded to get audacity to record at normal speed when recording at 192000Hz. This had a strange visual effect though. The wave seemed to slowly stretch out from its compressed state into full length. This took like 1-2 seconds, so it was quite noticeable, as I was not using any effects or such. It was just weird. I played this part of recording and it was the only place in recording, where among chipmunks a normal human voice was appearing for a while. Just a one time weird thing.

Good luck! …and sorry for my broken English. 🙂

---

<div class="post-metadata">

**Author:** ![Albex](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/a/e19b73/32.png) [@Albex](https://forum.audacityteam.org/u/Albex)\
**Post date:** [April 7, 2025, 3:20pm UTC](https://forum.audacityteam.org/t/recorded-sound-is-11x-too-fast-and-underruns/49286/13 "2025-04-07T15:20:12Z")

</div>

Hey everyone,

I encountered the same issue and managed to resolve it by checking which app had exclusive access to `hw:0,0` using the command

**lsof /dev/snd/** \*

It turned out that pipewire was occupying the device. In your case it can be pulseaudio or something else. I stopped pipewire with the following command:

systemctl --user stop pipewire

After doing this and restarting audacity, everything worked as expected. This problem can be quite frustrating, so I hope this solution helps someone else!
