3.8.x low latency kernels poor performance with usb

Bug #1185563 reported by James Stone on 2013-05-29
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux-lowlatency (Ubuntu)
Undecided
Unassigned

Bug Description

(this is being re-reported with ubuntu-bug as requested by Kaj Ailomaa).

I cannot use any of the 3.8.x series of low latency kernels for audio
use with my usb Focusrite Scarlett 2i4 (I have tried the last 2
releases). The lowest latency I can get in qjackctl is 512 (it won't
start jackd with lower), and performance is seriously degraded, with
multiple xruns. The system runs fine with a 3.5.x kernel (I can start
jackd with a latency of 64 samples in qjackctl, and with much greater
system stability).

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: linux-lowlatency 3.8.0.22.11
ProcVersionSignature: Ubuntu 3.5.0-28.32-lowlatency 3.5.7.9
Uname: Linux 3.5.0-28-lowlatency x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Wed May 29 20:29:23 2013
InstallationDate: Installed on 2013-02-06 (112 days ago)
InstallationMedia: Ubuntu-Studio 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MarkForUpload: True
SourcePackage: linux-meta-lowlatency
UpgradeStatus: Upgraded to raring on 2013-05-05 (24 days ago)

James Stone (jamesmstone) wrote :
Kaj Ailomaa (zequence) on 2013-05-29
affects: linux-meta-lowlatency (Ubuntu) → linux-lowlatency (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-lowlatency (Ubuntu):
status: New → Confirmed
James Stone (jamesmstone) wrote :

This is the patch to fix this:

http://git.kernel.org/linus/e194401783

Kaj Ailomaa (zequence) wrote :

The patch was included in one of the recent updates of the kernel. Did it fix the problem?

James Stone (jamesmstone) wrote :

Ah - I didn't realise - but no - I am running 3.8.0-25-lowlatency and it still shows the same problems.

James Stone (jamesmstone) wrote :

I've just checked the 3.8.0-25 source (not lowlatency I assume) and there is no evidence of this patch having been applied.

Kaj Ailomaa (zequence) wrote :

On Tue, Jun 18, 2013, at 04:08 PM, James Stone wrote:
> I've just checked the 3.8.0-25 source (not lowlatency I assume) and
> there is no evidence of this patch having been applied.

You're right. Let's make that happen. I'll get a kernel built with the
patch shortly.

On Tue, Jun 18, 2013, at 04:45 PM, Kaj Ailomaa wrote:
>
>
> On Tue, Jun 18, 2013, at 04:08 PM, James Stone wrote:
> > I've just checked the 3.8.0-25 source (not lowlatency I assume) and
> > there is no evidence of this patch having been applied.
>
> You're right. Let's make that happen. I'll get a kernel built with the
> patch shortly.

no, sorry. It is included in the yet not released kernel update.

I'll let you know when there's a kernel to test.

Kaj Ailomaa (zequence) wrote :

There's a new linux-lowlatency now in the proposed pocket with the mentioned commit added.
In order to try it out, you'll need to enable proposed in /etc/apt/sources.list, or by using software-sources-gtk.

James Stone (jamesmstone) wrote :

Unfortunately this doesn't fix it., so the patch must not be enough.

I noticed I get the following error message while jackd is failing to start:

cannot submit urb (err = -18)

And I think this bug is probably related to:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1191603

James

Jori Niemi (yfkar) wrote :

I'm affected by what's very likely to be the same issue. This doesn't seem to affect all hardware configurations. My laptop can handle jackd with a latency of 32 samples on my Focusrite Scarlett 2i2 and 3.8.0-25 lowlatency kernel. On my desktop jackd won't even start with a latency of less than 512 samples using the same kernel and same USB audio device.

No help from the proposed 3.8.0-26, so I'll continue using 3.5.x kernels on my desktop.

James Stone (jamesmstone) wrote :

Jori - what is the difference between your laptop and desktop in terms of USB hardware? Maybe that might be the cause??

James Stone (jamesmstone) wrote :

Just discovered this bug actually appears between 3.6.11 and 3.7.0, so I don't think it is related to the change in usb-ehci code.

James Stone (jamesmstone) wrote :

Here are some patches that fix/work around this bug:

http://<email address hidden>/msg23832.html

(to work around a bug in the focusrite 2i4 reporting the wrong wMaxPacketSize)

http://www.spinics.net/lists/linux-usb/msg90457.html

(to allow startup of jackd at lower latencies in kernels 3.7.0+ on this device)

and:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1191603/+attachment/3761476/+files/ehci-iso-accept

(to fix the related bug #1191603)

It would be great if these could be included in the lowlatency kernel releases.

Kaj Ailomaa (zequence) wrote :

Have you tried these patches yourself?

I'll investigate them during the end of this week and build a kernel for testing.

James Stone (jamesmstone) wrote :

Yes. I have tested all of them. I am not certain the authors of the patches agree they are the definitive solution tho. I will try to find out their opinion on including them in a release. J

James Stone (jamesmstone) wrote :

Hi Kaj,

Just done some more testing and only 2 of the 3 patches are needed:

http://<email address hidden>/msg23832.html

and:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1191603/+attachment/3761476/+files/ehci-iso-accept

If these 2 are applied, the other patch is not needed.

As I understand it, these 2 patches are queued for inclusion in the kernel, so I don't think there should be any issues with including them in the lowlatency kernel.

See: https://lkml.org/lkml/2013/8/13/101 and http://<email address hidden>/msg26333.html

James Stone (jamesmstone) wrote :

Just wanted to say this is fixed now. I am running 3.11.0-14-lowlatency and the bug is gone.

Changed in linux-lowlatency (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers