mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.47k stars 1.27k forks source link

Sound engine-related hang on Ubuntu (Studio) 9.04 with ALSA back end #5182

Closed mixxxbot closed 2 years ago

mixxxbot commented 2 years ago

Reported by: Pegasus-RPG Date: 2009-06-04T01:41:34Z Status: Fix Released Importance: High Launchpad Issue: lp383431 Tags: freeze, hang, latency, soundmanager, studio, ubuntu Attachments: [Hang on close full log & back trace](https://bugs.launchpad.net/bugs/383431/+attachment/599489/+files/Hang on close full log & back trace), [Hang on latency change (from 16ms to 64 in this case)](https://bugs.launchpad.net/bugs/383431/+attachment/599490/+files/Hang on latency change (from 16ms to 64 in this case)), [Back trace with audio thread hung](https://bugs.launchpad.net/bugs/383431/+attachment/629157/+files/Back trace with audio thread hung), gdb_02122010_mixxx1.8~beta1.log


System: Compaq Presario R3000 series notebook: AMD Athlon XP-M 3000+ 1.6GHz single-core, 512MB RAM. Mixxx 1.7 branch.

Using the sound card directly, setting the latency to/from anything lower than about 16 causes the GUI to hang, either right away (with the console showing Debug: [Main]: request msec  ## or after clicking OK in the Prefs. Other times, the GUI will respond fine until you go to play a track and it will hang there. Or it won't hang but it won't play either, and when you try to close Mixxx, it hangs Debug: [Main]: close soundmanager and has to be killed.

Same things happen with or without the use of pasuspender and with the real-time kernel and a non-RT one.

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-04T01:41:34Z Attachments: [Hang on close full log & back trace](https://bugs.launchpad.net/mixxx/+bug/383431/+attachment/599489/+files/Hang on close full log & back trace)

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-04T01:42:13Z Attachments: [Hang on latency change (from 16ms to 64 in this case)](https://bugs.launchpad.net/mixxx/+bug/383431/+attachment/599490/+files/Hang on latency change (from 16ms to 64 in this case))

mixxxbot commented 2 years ago

Commented by: asantoni Date: 2009-06-04T01:46:32Z


How many soundcards were you using?

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-04T02:30:37Z


Uno, señor. The integrated nVidia nforce3 audio. (Which shows up as Realtek or something in Windows. Hmm.) It's using the Intel ICH driver (snd-intel8x0.)

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-04T02:34:32Z


This is interesting...if I pick the "default" sound card, it works fine down to 2ms. No hangs...

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-04T04:33:26Z


Scratch that. "default" has like a half-second buffer, so it's horrible. Using the sound card directly, I found that setting the sample rate to 48000 works much better with my (cheap) integrated card. After settling on a good latency value (11ms in my case,) the soundengine(s) will still spontaneously freeze, and that's not latency related since it happened even at 64ms!!

mixxxbot commented 2 years ago

Commented by: djomegarush Date: 2009-06-09T23:58:27Z


Hangs when changing latency. Sager Notebook. Sound Blaster Audigy2 Zs PCMCIA ALSA Intel (onBoard). Ubuntu 9.04

Have not tried to change the latency using the internal card, just the Audigy.

mixxxbot commented 2 years ago

Commented by: djomegarush Date: 2009-06-10T00:36:06Z


Changed API to OSS. Able to hit 96K w/ 0 Latency. Tried with 400ms and stepped down from there with oss (400ms, one less notch, click o.k. preference, one less notch, click o.k., ect). Went from 400ms to 0ms and still not 'gui lockups'.
Changed to ALSA @ 44.1K, 64ms. Stepped down (like with oss, but started with 64ms rather than 400ms) to 10ms. At 10ms, gui locks. On app lockup, app is stuck at 'request latency 10'. On startup, Latency still set at 10. Have to change to OSS to be able to modify settings. During a 'good' session with oss, after the 'request latency', there seems to be a soundManager() function. I think this is what's hanging up.

mixxxbot commented 2 years ago

Commented by: djomegarush Date: 2009-06-10T00:37:51Z


Also, though since we were dealing with latency and the ALSA driver, there might be a permission issue. Ran Mixxx as my normal user account and with sudo. Same result. Don't think it's a permission issue.

Beta 1.7?

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-06-11T12:57:40Z


I also experienced good performance using OSS (got about 4ms) with the internal card as well as an external Behringer UCA-202. So is this an Ubuntu problem?

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2009-06-26T09:26:54Z


Confirmed - I just tested Mixxx 1.6.1 on stock Ubuntu Jaunty, HP ze2000 laptop, on-board ATI IXP sound card. Choosing buffers below 16ms with ALSA does cause hangs. Using OSS I can get down to 2ms without problems.

However on Mixxx 1.6.1 on 64 Studio 3.0 beta 3, which is Ubuntu Hardy LTS based with our own kernel, I can get down to 2ms using ALSA with no problems (albeit on different hardware, with intel8x0 onboard sound). I will run further tests to narrow this down.

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-07-01T15:40:19Z


For the Ubuntu guys, also see our mailing list thread: http://thread.gmane.org/gmane.comp.multimedia.mixxx.devel/2334/focus=2337

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-07-14T21:27:12Z


This is still an issue with bug #⁠382228 fixed. Using hw:0,0. Tests fine with PortAudio SVN r1411 and fails with r1413. See http://music.columbia.edu/pipermail/portaudio/2009-July/009315.html

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-07-16T15:27:13Z Attachments: [Back trace with audio thread hung](https://bugs.launchpad.net/mixxx/+bug/383431/+attachment/629157/+files/Back trace with audio thread hung)


(That last comment was for the hang when changing latency.) With more testing, the random hang seems to be fixed in r1411 of PA as well. With latency at 5ms, I let Mixxx run for 5 hours (looping both decks) and the audio thread didn't hang. Testing with the version of PA that ships with Ubuntu and leaving Mixxx to run overnight (with latency at 36ms) resulted in the audio thread hanging such that when you close Mixxx, it hangs on "closing Soundmanager." Testing with PA r1413 with the same settings resulted in audio thread hangs within a minute after starting Mixxx (though with gdb running it took considerably longer, about 3 hours.)

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-07-16T17:31:04Z


Issue is with PortAudio

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2009-08-06T20:20:02Z


untargeting

mixxxbot commented 2 years ago

Commented by: s-holden1 Date: 2009-09-14T20:46:32Z


I appear to be experiencing the bug described above. I believe I may have found a workaround - I dont know if im missing something obvious. Previously I was running jack using qjackctrl, which does not appear to offer this option, but it seems that running jackd directly allows one to use the "nozombies" option which prevents jack kicking off clients which are too slow. this allows me to run at 11ms pretty happily (i have not tried lower yet).

I haven't seen this mentioned yet - this either means I am stating something useful and unnoticed, or something obvious and irrelevant! hope it helps if the former, apologies if its the latter.

Running jackd as: pasuspender -- jackd --nozombies --timeout 500 --realtime -P 89 -d alsa -p 256 --rate 44100 --softmode

details: ubuntu studio 9.04, 2.6.28-3-rt, mixxx 1.7, portaudio library: libportaudio2_19+svn20071207-0ubuntu3_i386.deb

mixxxbot commented 2 years ago

Commented by: gidskid Date: 2009-12-18T21:03:02Z


Ok so this won't be very helpful but at least some one might be able to help me. Basically i put two songs on and press play. The program freezes and then has to force quit. This is a massive problem for me can you help?

mixxxbot commented 2 years ago

Commented by: jcuello Date: 2010-02-12T16:17:40Z Attachments: gdb_02122010_mixxx1.8~beta1.log


Running Mixxx 1.8~beta1 on the following: Ubuntu 9.10 (Karmic Koala) 2.8Ghz AMD Phenom II X3 (Triple Core) 4GB RAM Sound: Creative SB Audigy 2 ZS

When I first launched Mixxx it was working correctly with the default settings at 92ms latency. I then went to the preferences to change my sound card and latency to 11ms, but then the following happened after I clicked on the OK button:

Step 1 Loaded a song to Deck 1 and waited for it to be fully analyzed.

Step 2 Tried to play song by clicking on the play button but it did not play (it simply toggled the pause button), and there were no messages on the console.

Step 3 Brang up the preferences dialog with Ctrl+P and changed my latency, and sound card. (For the second time)

Step 4 Clicked on the OK button. Mixxx freezes up and I'm forced to quit the application.

Mixxx works correctly if I don't put a latency lower than 46ms, the moment I do anything lower it will freeze up when I hit the OK button. I had to delete the .mixxx folder so it can forget the previous settings since every time I tried to change any settings it would freeze on me.

P.S.: I tried if the OSS API would work better than the ALSA but instead I got a Seg Fault when I hit the OK button. I'll go check if this bug is already posted.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2010-02-12T23:22:26Z


Hi Jose,

Are you using the version of PortAudio that we post on our website? The version in the Ubuntu repositories has this ALSA lockup bug that you are experiencing.

Thanks, RJ

mixxxbot commented 2 years ago

Commented by: jcuello Date: 2010-02-13T00:45:47Z


Hello RJ,

I was not using the PortAudio version that was posted on the website, I did download it and was able to build it and it runs okay so far. I also noticed that the OSS API gives me better performance by letting me set a lower latency. Unfortunately it won't let me use other channels, everything gets sent to all the channels even if I don't specify anything for my headphones.

On an unrelated subject, am I the only one experiencing this annoying bug that when I set a cue by pressing Shift+D it sets the cue twice, once when I press the key and again when I release it? Should I post this as a bug?

Thanks, Jose Cuello

On Fri, Feb 12, 2010 at 6:22 PM, RJ Ryan

Hi Jose,

Are you using the version of PortAudio that we post on our website? The version in the Ubuntu repositories has this ALSA lockup bug that you are experiencing.

Thanks, RJ

-- Sound engine-related hang on Ubuntu (Studio) 9.04 with ALSA back end https://bugs.launchpad.net/bugs/383431 You received this bug notification because you are a direct subscriber of the bug.

mixxxbot commented 2 years ago

Commented by: diwic Date: 2010-02-13T09:53:30Z


Could this be a duplicate of bug #⁠485488 ? Could you test alsa-plugins from my PPA and see if that fixes the problem?

@RJ Ryan: Where is your website, and do you have a link to the patch? I'm interested to see if the portaudio fix is into audacity's version of portaudio as well.

mixxxbot commented 2 years ago

Commented by: diwic Date: 2010-02-13T09:57:36Z


An additional note, #⁠485488 only applies if you use pulseaudio. If you bypass pulseaudio (as I guess many people looking for low latency do) #⁠485488 is irrelevant.

mixxxbot commented 2 years ago

Commented by: deftdawg Date: 2010-02-13T10:17:29Z


@David: our website download page (http://mixxx.org/download.php) advises Ubuntu users to downgrade portaudio to the version from Intrepid 8.10.

mixxxbot commented 2 years ago

Commented by: asantoni Date: 2010-06-24T18:24:50Z


This is finally fixed in PortAudio SVN...

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2010-08-26T10:38:17Z


Hi Ironstorm, Intrepid packages are no longer available from http://packages.ubuntu.com/ but have not yet been made available on http://old-releases.ubuntu.com/releases/

The PPA archive https://launchpad.net/~falk-t-j/+archive/lucid/+index?start=300&batch=75 contains a package for portaudio19 but it looks to be too old for this fix.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2010-10-13T19:38:49Z


Marking Fix Released because the portaudio package in Ubuntu 10.10 has the fix for this.

mixxxbot commented 2 years ago

Issue closed with status Fix Released.