...Optimise use of an M-Audio Delta 1010LT?

24 replies [Last post]
GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hi

I finally got my long awaited M-Audio Delta 1010LT, moved from a laptop to a full blown HP workstation, with a quad Intel processor and 6 GB of RAM... I got it all working now, but the system seems less stable, I can't seem to get the most of the 1010, and when I try, I get X-runs everywhere.

So far I can only run it at 512 frames/period and 2 periods/buffer. If I try anything below that I get Xruns all over the place. In fact, even with this setup (which seems a bit to conservative to me considering the hardware upgrade) it behaves really strange!... I get Xruns from nowhere, just as I am typing these lines, with no interaction with Ardour or Hydrogen, Jackd keeps getting Xruns every now and then.

In fact, when using this setup, which is brand new in all senses (new Ubuntu installation, new hardware, new Ardour 2.8, etc) I can still reproduce the same issue I got on my laptop, as Ardour crashes when scrolling left and right if running less than 512 frames/period.

Is there anything I have to do on Envy24 which may be causing this issue? Any way I can improve my setup to get rid of Xruns completely?... To be quite honest, I am very disappointed as I spent quite some money in this new setup hopping everything would be smooth, but so far it is almost as bad as my laptop setup with an onboard chip. ;-(

Any help appreciated.

paul
paul's picture
User offline. Last seen 3 hours 3 min ago. Offline
Joined: 2006-03-16
Posts:

Your situation is another great example of how the way in which the kind of system performance required for realtime low latency audio is not really very highly linked with processor speed or memory size. You can record 24 tracks simultaneously (and play them back) on a 400MHz Pentium 4, for example. Your new faster system doesn't help the realtime low latency aspects at all - it just gives you more CPU cycles for plugins etc.

There is a lot of information online about tuning a linux system for the best possible realtime audio performance. Google is your friend. There are, unfortunately, so many potential factors that can affect performance that to try to give specific hints here maybe a little pointless. Certainly the Delta 1010 has almost nothing whatsoever to do with it. Moreover this is the kind of of issue that requires rapid turnaround in communication time in order to provide effective help. A forum is almost certainly the wrong place - IRC is almost certainly better, if people are around who can help.

Regarding the scrolling crash, what is the mantis bug number for this? See http://ardour.org/how_to_report_a_bug

thorgal
User offline. Last seen 2 years 3 days ago. Offline
Joined: 2007-08-03
Posts:

ciao,

You have to check a few things. So in order to help, you'll have to report the output of the following commands (copy paste to terminal is preferable):

uname -r

grep CONFIG_PREEMPT /boot/config-`uname -r`

lspci | grep -i audio

cat /proc/asound/cards

cat /proc/interrupts

ps -Leo class,comm,rtprio | grep IRQ

ps -Leo class,comm,rtprio | grep timer

When jackd is running (whether you start it with qjackctl or from the terminal), I would like the output of this terminal command:

ps xa | grep jackd

ps -Leo class,comm,rtprio | grep jackd

That's a lot and maybe you won't understand what all this is about. Just ask if you want to know. These commands are useful to determine whether your system is set up correctly for realtime audio.

pleasebeus
pleasebeus's picture
User offline. Last seen 2 years 46 weeks ago. Offline
Joined: 2008-11-28
Posts:

Are you running a real time kernel? I was getting xruns on a new install like yours and the kernel was the problem.

Is your fresh install Ubuntu or Ubuntu Studio? Ubuntu Studio 8.10 (Intrepid) is the latest but doesn't have the rt kernel out of the box. I had to install it separately.

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hey,

Thanks all for your comments!

Thorgal, please find my results below:

uname -r

2.6.27-11-server

grep CONFIG_PREEMPT /boot/config-`uname -r`

# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set

lspci | grep -i audio

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
07:04.0 Multimedia audio controller: VIA Technologies Inc. ICE1712 [Envy24] PCI Multi-Channel I/O Controller (rev 02)

cat /proc/asound/cards

0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xf01a0000 irq 21
1 [M1010LT ]: ICE1712 - M Audio Delta 1010LT
M Audio Delta 1010LT at 0x1140, irq 20

cat /proc/asound/interrupts

CPU0 CPU1 CPU2 CPU3
0: 57 2 5 4 IO-APIC-edge timer
1: 141 151 149 162 IO-APIC-edge i8042
4: 1 1 1 1 IO-APIC-edge
7: 0 0 0 0 IO-APIC-edge parport0
8: 27 26 27 25 IO-APIC-edge rtc0
9: 0 0 0 0 IO-APIC-fasteoi acpi
12: 21869 22009 22021 22123 IO-APIC-edge i8042
14: 8783 8922 8803 8762 IO-APIC-edge ata_piix
15: 9309 9234 9241 9233 IO-APIC-edge ata_piix
16: 224315 224096 224521 224321 IO-APIC-fasteoi heci, i915@pci:0000:00:02.0
17: 0 0 1 0 IO-APIC-fasteoi
18: 9257 9350 9229 9201 IO-APIC-fasteoi ata_piix
20: 308271 307789 307835 308323 IO-APIC-fasteoi uhci_hcd:usb1, uhci_hcd:usb4, ehci_hcd:usb7, ICE1712
21: 33495 33865 33644 33354 IO-APIC-fasteoi uhci_hcd:usb2, uhci_hcd:usb5, ath, HDA Intel
22: 2 2 3 3 IO-APIC-fasteoi ehci_hcd:usb3, uhci_hcd:usb6
221: 453 483 447 412 PCI-MSI-edge eth0
NMI: 0 0 0 0 Non-maskable interrupts
LOC: 193808 190257 188678 112991 Local timer interrupts
RES: 40796 28020 51055 11999 Rescheduling interrupts
CAL: 31336 31299 757 31486 function call interrupts
TLB: 1051 1738 1790 2218 TLB shootdowns
SPU: 0 0 0 0 Spurious interrupts
ERR: 0
MIS: 0

ps -Leo class,comm,rtprio | grep IRQ

returns nothing

ps -Leo class,comm,rtprio | grep timer

returns nothing

ps xa | grep jackd

6502 ? SLsl 0:27 /usr/bin/jackd -R -P80 -dalsa -dhw:1 -r48000 -p256 -n3
6761 pts/0 S+ 0:00 grep jackd

ps -Leo class,comm,rtprio | grep jackd

TS jackd -
TS jackd -
TS jackd -
FF jackd 90
FF jackd 80

As always, thanks a lot for your help!!... I knew some of these commands, but this is really helpful information. I understand some of it, but not so much that I would know what exactly I need to change. Hope you do!!! ;-)

Take care

thorgal
User offline. Last seen 2 years 3 days ago. Offline
Joined: 2007-08-03
Posts:

I forgot to ask a few more things:

1- you got 6GB of RAM and 32bit CPU ? you will need HIGHMEM enabled in your kernel or you will be stuck with 4GB max (and 1GB reserved for kernel). So grep for it to see if your kernel is PAE enabled :

grep HIGHMEM /boot/config-`uname -r`

check how much RAM your system "sees" :

cat /proc/meminfo

2- high resolution timer:

grep CONFIG_HZ /boot/config-`uname -r`

3- audio group and PAM security:

id | grep audio

cat /etc/security/limits.conf

(optional 4- choose the performance governor for your CPU as I am sure it is speedstep enabled for power usage but this is up to you)

Anyway, from your previous output, it is clear that your system is not really tuned for real time operations.

You'll need a real time kernel (complete preemption patch, high res timer, high mem - aka PAE enabled) and tune the IRQ thread prio with a script called rtirq (you may find it or not in your package manager, 64studio has it I think), and I strongly suggest you switch the PCI slot for your M-Audio card so it gets another IRQ (non shared would be cool). Right now, it shares the IRQ with some USB stuff and that's not good. Does your BIOS allow IRQ reassignment ?

So, in order:
1- get your card on a non shared IRQ
2- get a real time kernel. 2.6.29 with the RT patch is really great! and configure it as I said above
3- tune your IRQ thread priority with rtirq
4- make sure you belong to the audio group and that this group has real time privileges
5- check jackd again.

It is tedious and you will have some hard time in some of the steps, but when you get the hang of it, it is no big deal and your knowledge of your system will have improved :)

Most of all: it is really worth it.

EDIT: I saw in the other thread that you used Ubuntu Intrepid ... I can't say it's a wise choice, the UbuntuStudio that derived from it ships a real time kernel that is borked (2.6.27-x). Well, time to learn how to compile your own ... :)

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hey, Thorgal

Thanks for all your help again, but I think I am gonna pass. To be quite honest, as much as I enjoy Linux and Ardour, I am a musician, and I find it quite ridiculous that after spending some money into upgrading my equipment, I still have to spend several days tweaking my PC, running into tons of frustration, getting rid of the distro I like, all just to get an application to do what it is supposed to do!... I guess Linux is still far from maturity in this regard.

In my case, I need to concentrate on the music, and all these technicalities don't really help.

If I understood you correctly on some of your other posts realtime and low latency are required only for certain activities, and I don't think they apply to me. Therefore I would appreciate if you could give me some advice to optimise things under my current setup (some you have already) and I will have to live with Xruns, I suppose.

Thanks again

thorgal
User offline. Last seen 2 years 3 days ago. Offline
Joined: 2007-08-03
Posts:

I understand the frustration with all these technicalities. I knew nothing about all this stuff myself at the beginning. But I had a goal, and I didn't care if I had to invest time into this. I am a musician-composer-producer myself and I like to know the strengths and weaknesses of my tools. Believe me, this is not ridiculous, as you put it. Running all this demands a lot from your system (not necessarily in terms of CPU) and having the best system setup out-of-the-box is not something I expected a distro would give me right after install.

Let's be pragmatical in your case: if you don't mind running at high latency, then I suggest you increase your number of frames per period to 1024 or even 2048. But trust me on that, get a real time kernel, and possibly from the 2.6.29 serie. I saw that your present kernel is meant for servers. Usually, server kernels were configured with a lower system timer frequency (250Hz) and you want a higher one (1000Hz). Some people say they do fine at such low frequency so YMMV :)

Don't be overwhelmed by all this crap. You got a new desktop for a specific goal so it would be best if you could devote a few days to optimize it.

pleasebeus
pleasebeus's picture
User offline. Last seen 2 years 46 weeks ago. Offline
Joined: 2008-11-28
Posts:

Installing the real time kernel is very simple:

sudo apt-get install linux-rt

I have a 1010LT; I was getting xruns even with light usage. Low latency and realtime are pretty much mandatory IMO.

peder
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 2007-05-08
Posts:

GodLikeCreature,
trying to run a server distribution as a low latency music workstation isn't the best way to get a hassle free ride, so just blaming linux seems a bit unfair.

I'd suggest you try a distro targeted at music, like GMaqs A/V (http://www.bandshed.net/AVLinux.html) which btw is developed with a Delta 1010LT and has the latest music software (http://ardour.org/node/2331, http://ardour.org/node/2408,http://ardour.org/node/2560), Ubuntu Studio (http://ubuntustudio.org/downloads) or 64studio (http://download.linuxaudio.org/64studio/).

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hi!

Thorgal,

Thanks for the encouraging words. I understand where you are coming from, and I agree, in a perfect world, I would love to spend many hours playing around with my computer and learning my tools inside out. Having said so, If I recall correctly, you did so when you were not working. I wish I had that option, but I don't. In my case, if I am to run into what you are talking about, given that I can use 2-3 hours a day at best, I may end up this set up work 2 or 3 weeks from now. It would also mean that I would spend all that time almost not touching a guitar, and I don't really think that's my goal.

I may continue investigating with time, but I can't afford it now.

I did try some of your recommendations:

- Changing the PCI card to a different slot didn't change much. It now shares the IRQ with another USB port. In fact, I checked in the BIOS and changing the IRQ number would automatically change that of some USB ports, so I guess it is built in stuff.

- I didn't mention, but I have all the audio/limits.conf deal done, based on your recommendations from previous threads.

Pleasebeus,

As far as the official communication from Ubuntu goes, my release (8.10 Intrepid) does not support an RT kernel.

"No real-time kernel variant is available for the Linux 2.6.27 kernel included with Ubuntu 8.10. Users of UbuntuStudio 8.04 who need real-time kernel support are advised not to upgrade to UbuntuStudio 8.10."

I will give a try to your suggestion, tho. Since the machine I am using is a fairly new installation, I guess I could live with rebuilding it.

In any case, from what I am reading so far from reviewers, it seems real time kernel is still buggy in Ubuntu 9.04. What would you recommend as the best distro for realtime (out of the famous ones, don't want something too obscure!) ;-)

Thanks again

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hey Peder,

Thanks for the comments.

I see what you are saying, but when I mean mature I mean something that does not require reading all documentation available in the world to get it right quickly and in one go. I can't see the owner of a professional studio paying me money to set up a professional station while I fail time after time for days until eventually finding someone like you who provides the right piece of information.

A mature environment like Mac OS would probably save 80% of the hassle. In fact, I am pretty sure I would be able to get a propietary DAW running successfully in one evening. Then the learning curve on tweaking the DAW would be similar to that of Ardour, but the setup work would be clear, even for non-experts.

In short, based on what I am seeing, one requires quite a big amount of knowledge and experience to get a Linux audio setup right, and I don't consider that a mature environment.

Btw, I installed the server kernel in order to get the 6 GB recognised. I found this information in another forum, and yes, it probably was the wrong call, but it just goes to stress the point I am making.

peder
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 2007-05-08
Posts:

As I said, I'd start by trying GMaqs A/V. It's based on Ubuntu 7.04 but all the music software are the latest (in some cases from SVN/CVS). Or you could try Ubuntu Studio 8.04.

peder
User offline. Last seen 1 year 28 weeks ago. Offline
Joined: 2007-05-08
Posts:

And, fwiw, if you're charging someone for your services (like setting up a studio for someone) you'd better have something besides a crash course in it. Part of what he's paying for is your expertise, right?

Plus there's always a trade-off; what you gain in not having to buy an expensive Mac and ProTools you lose in having to invest a bit more time selecting the right distro and configging it

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hi again,

Pleasebeus,

After completing the instruction you provided, it seems nothing happened:

uname -r still returns "2.6.27-11-server" after reboot.

After doing some more checking, I am finding many forums which recommend using the server kernel in Ubuntu in order to enable PAE... So maybe I wasn't so far off after all! ;-)

thorgal
User offline. Last seen 2 years 3 days ago. Offline
Joined: 2007-08-03
Posts:

by the way, the A/V distro that GMaq put up together is not a bad idea since he also built up a realtime kernel based on 2.6.29. If you don't mind the reinstalling part, I would give it a serious try. But if I were you, I would also ask him to build an RT kernel with PAE enabled. I am sure he would do that. We're a community, aren't we ? :D

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hey, Peder,

Sorry, I didn't mean to sound like I was challenging you.

You are right to a certain extent, IMHO. Say in a couple of years from now Ubuntu, for example, works around its RT kernel issues and it works perfect vanilla. If that was the case, we would probably not be having this conversation. When that happens, and I am sure it will, Linux will still be open source and free, but more mature... ;-)

I remember just a few years ago, when USB was a pain in the ass, when simply trying to get a CD device to work properly took lots of effort, when a network card was hard to set up... Back then, Linux was not mature enough to be used by corporations, and it's not by chance that many are thinking of leaving MS now... It comes as a result of it maturing for office and standard use.

I think Audio is the same deal, only more specific. However, I guess you will agree with me that Linux needs to become as easy to use as Windows if it is to have a real chance to beat it... And I think most distros realise that and work towards that goal.

Oh, and btw, I did spend a lot of money on my workstation and my new hardware...!! ;-) I am only saving the money I would have spent in ProTools.

pleasebeus
pleasebeus's picture
User offline. Last seen 2 years 46 weeks ago. Offline
Joined: 2008-11-28
Posts:

I'm running Ubuntu Studio 8.10, with a 1010LT, with a real time kernel. It works beautifully.

If you installed the kernel, you should then select it at the boot screen.

See Ubuntu help for details about Grub (the boot system)

Don't worry about it not being included in the distro package. It works fine.

paul
paul's picture
User offline. Last seen 3 hours 3 min ago. Offline
Joined: 2006-03-16
Posts:

GodLikeCreature: let me tell you a story about ProTools on Windows.

When Digidesign first released this (it wasn't actually that long ago) they officially supported it on only one piece of hardware (a PC that you had to buy from IBM). You could choose to try to run it on another system, but they would not provide any support.

When I read this at the time, I thought it was ridiculous. Years later, I now see the wisdom of their decision (they have subsequently carefully and slowly expanded it to include specific configurations that they know work). Every day we deal with people who are using what essentially amounts to a random hardware configuration and attempting to get good low latency realtime performance out of it. Making matters worse are the many Linux users, new and old alike, who do not realize that not all Linux distributions are created equal when it comes to running audio/music creation software. Its a really, really hard situation for us to support. Things are compounded by the fact the even the distributions that are focused on this niche change over time - when UbuntuStudio started, it was on of the best of the bunch, but its much harder to recommend it now.

I don't know what we can do to improve this situation. We can make the documentation about these issues more visible, but people notoriously do not read this kind of documentation. There is a high expectation among many new users of audio/music creation software that it will work flawlessly on any computer (and/or the idea that if it doesn't work, a faster processor or more memory is the answer). A quick survey of the many windows-centric forums related to proprietary DAWs will reveal that neither of these ideas is correct, whether you are running Linux or Windows.

What can we do to improve your situation?

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hi Paul

Thanks a lot for your comments.

I understand your view, and how hard it must be to support so many users and their many configurations. I agree with you that the situation is not good in that regard. I am only saying that I believe that it will improve as Linux distros continue to do so.

Just to be clear, I didn't get rid of my previous Windows setup, using Sonar and Battery for nothing. I believe in open source applications, I love the Linux world, even if it is not perfect (nothing is). When I found about Ardour, I didn't hesitate and jumped into the cold waters of the unknown (to me anyways) and I can't say I regret it. So please don't take my words as bad criticism, it is very much the opposite.

On the other hand, I didn't think that getting a more powerful machine would be the "be all-end all solution". My main target was to improve my setup to something that made more sense in a semi professional environment, specially dedicated to Audio recording. A proper sound card (not a crappy onboard chip) as well as better buses, better hard drive speed, and yes, more memory and CPU power are great ways of doing so, I think. They are not THE solution, of course, but much better than my 3 year old laptop... If this was not the case, why would professional studios spend thousands of dollars in Powerful Power Mac workstations? Are they all missing the point? I don't think so.

In my opinion, a good and powerful machine is a good foundation, then a lot of things go on top, of course.

Thanks all for the great support and comments. They do help a lot, even if I am a bit in a crappy mood today! ;-)

paul
paul's picture
User offline. Last seen 3 hours 3 min ago. Offline
Joined: 2006-03-16
Posts:

The extra CPU cycles from a faster processor(s) allow you to get more plugin processing done, not run with better latency. The extra memory helps with track count (a little - most of that comes down to the disk subsystem). And buying all the right components doesn't help if when installed on the motherboard, they end up sharing a single interrupt. So there is quite a bit of subtlety to getting things to work right. There are a couple of companies that are thinking of making turnkey Linux DAW systems, where you don't have to think about any of this. My feeling right now is that interest would be limited, but hey, what do I know?

rozea
User offline. Last seen 47 weeks 6 days ago. Offline
Joined: 2008-09-23
Posts:

For more resources for help, not distro specific check out the LAU mailinglist of linuxaudio.org

If you prefer an forum board, you can get a lot of help on www.linuxmusicians.com .
Check also the wiki: www.wiki.linuxmusicians.com

I recommend you to use 64Studio 3.0 (beta now). It has the best audio configuration AFAIK and it's based on Ubuntu LTS, that mean an stable system with up to date audio packages!

www.64studio.com

GodLikeCreature
GodLikeCreature's picture
User offline. Last seen 4 years 16 weeks ago. Offline
Joined: 2009-01-26
Posts:

Hey,

Pleasebeus, I followed your recommendation and things improved GREATLY!!!... Running Jackd now on 128/2 and getting very few, if any Xruns. It definitely is more than OK for me now, running almost 0 latency and with the test I just did, I got one X run only when recording 17 tracks simultaneously all the way through a 6 minute song... So pretty sweet!!

Given that things seem to work now with my current installation, I think I will keep it the way it is.

Once again, thanks all for all your help and time, very much appreciated!

PS: Paul, the way you make it sound, I would have been better off buying a 286 machine!!! ;-)... Just kidding!

paul
paul's picture
User offline. Last seen 3 hours 3 min ago. Offline
Joined: 2006-03-16
Posts:

Actually, even though you are just kidding, on an old machine with an ISA bus instead of (or as well as) PCI, its possible to get single-sample latency (i.e. process samples one at a time)! You don't tend to have much left over for DSP though :)

12string
User offline. Last seen 3 years 49 weeks ago. Offline
Joined: 2010-04-29
Posts:

I dropped by looking for some info and noticed that GodLikeCreature's xrun problem might be that he hasn't disabled on onboard audio board
lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
07:04.0 Multimedia audio controller: VIA Technologies Inc. ICE1712 [Envy24] PCI Multi-Channel I/O Controller (rev 02)

I hope that's the problem because it is a pretty easy fix. I'm running most of what he is with an Audiophile 2496 and have no such problem.