Please Help: Xruns Insane

Hello,

I installed all of the Ubuntu Studio packages. I try to start Jack using the Ubuntu Studio settings, and it stops after two seconds. I unchecked the realtime option, and it seems to work, but generating at least 150 xruns every second. I have only been running it for a few minutes, and already my xrun count is at 40,000. Now, I have not compiled my own kernal, but it should not be that bad, should it? I have decent hardware, actually pretty nice (XPS M1710), and I expected better from JACK.

Can anyone point me in the direction of something that may be wrong. The following may help:

lspci:
Code:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03) 00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01) 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 01) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01) 01:00.0 VGA compatible controller: nVidia Corporation Unknown device 0298 (rev a1) 03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd Unknown device 0832 03:01.1 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19) 03:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01) 03:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a) 03:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05) 09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02) 0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

Anyone have any suggestions?

Here’s the two most common reasons for xruns like this:

  1. Your period size and/or number of periods is just too small for your system to keep up with. You can fix this by either increasing the period size / number of periods or you can apply the realtime patch to the kernel to help it keep up. If your latency is lower than 20ms on an unpatched kernel then this is probably your problem.

  2. If your sound device has digital IO and jack is set to use that device, but it isn’t connected to anything then that can cause alot of xruns. The digital device is trying to get a sync signal but isn’t finding anything because it is not connected, and as a result causes a lot of xruns. Either connect to another digital device or set jack to use an analog device / sub-device.

Having to uncheck the “realtime” option when starting JACK from qjackctl is a bad sign. It means your system is not configured to allow regular (non-administrative) users to run programs in “realtime” mode. The xrun level you see is still rather high, but it would be much more useful to see the behaviour when you JACK in “realtime” mode.

Could you please re-enable “realtime” and paste the errors that show up in qjackctl’s “Messages” window when you try to start JACK?

Run jackd by qjackctl. Then go to console and type:

ps -C jackd -cmL

This returns something like this when jackd is NOT realtime:

PID LWP CLS PRI TTY TIME CMD
14469 - - - pts/3 00:00:00 jackd
- 14469 TS 21 - 00:00:00 -
- 14470 TS 21 - 00:00:00 -
- 14471 TS 20 - 00:00:00 -
- 14472 TS 24 - 00:00:00 -

and when jackd IS realtime something like this: (hence the FF)

PID LWP CLS PRI TTY TIME CMD
14510 - - - pts/3 00:00:00 jackd
- 14510 TS 20 - 00:00:00 -
- 14511 TS 20 - 00:00:00 -
- 14512 TS 19 - 00:00:00 -
- 14513 FF 60 - 00:00:00 -
- 14514 FF 50 - 00:00:00 -

If you cannot start jackd in realtime mode by qjackctl then open another console and start jackd like this (adjust hw:0 to your recordingsoundcard)

jackd -R -d alsa -d hw:0

Again typ the “ps”-command and look if it’s realtime. If not then you miss the privileges. Either you have an old jackd (get the version with “jackd --version”) or you miss the privileges.

Look in “/etc/security/limits.conf” for the following lines:

@audio - rtprio 99
@audio - nice -20
@audio - memlock 4000000

If nothing similar is there then you should add them.

After that check if your user is in the “audio” group with the command “id” in console.

If you have added the lines in “limits.conf” and your user is in the audio group and your’re not root, reboot and recheck if jackd can be started in realtime mode.