Hauppauge USB-Live2 fails on Haswell USB3 port

Bug #1412121 reported by Alistair Grant
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Hi,

I've been attempting to capture video using a Hauppauge USB-Live2. This works fine in Ubuntu 14.04 on an older laptop that only has USB2 ports, but fails on my Dell XPS13 which is USB3 with the Haswell chipset.

The information in this bug report is based on Ubuntu 14.10 / Kernel 3.16.0-29, however I have also tried it on a daily 15.04 image (3.18 kernel) and using the upstream 3.19-rc4 kernel without success (the error messages change, and it does seem to be improving, but still fails to operate correctly).

I'll attach an extract from /var/log/syslog that shows the following:

1. Plugging in the Live2 - from 09:30:48 to 09:30:56
2. Attempting to run mythffmpeg as shown below - at 09:31:33
3. Terminating mythffmpeg with Control-C - 09:31:43
4. Unplugging the Live2 - 09:32:47

The command line was: mythffmpeg -y -loglevel debug -f alsa -i plughw:1,0 -f v4l2 -s pal -pix_fmt yuyv422 -i /dev/video1 -b:v 2048k a.nut

Please let me know what other information you would like to see.

Thanks,
Alistair

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: linux-image-3.16.0-29-generic 3.16.0-29.39
ProcVersionSignature: Ubuntu 3.16.0-29.39-generic 3.16.7-ckt2
Uname: Linux 3.16.0-29-generic x86_64
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: alistair 3318 F.... pulseaudio
 /dev/snd/controlC0: alistair 3318 F.... pulseaudio
CurrentDesktop: Unity
Date: Sun Jan 18 09:34:55 2015
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=702aea9f-a502-441c-b933-e9c6a284ce3a
InstallationDate: Installed on 2013-12-25 (389 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20131224)
MachineType: Dell Inc. XPS13 9333
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-29-generic root=UUID=d63939df-e79f-4ea5-a068-c9bf2a928200 ro persistent quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.16.0-29-generic N/A
 linux-backports-modules-3.16.0-29-generic N/A
 linux-firmware 1.138.1
SourcePackage: linux
UpgradeStatus: Upgraded to utopic on 2014-12-10 (38 days ago)
dmi.bios.date: 11/11/2013
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A01
dmi.board.name: 099TN4
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA01:bd11/11/2013:svnDellInc.:pnXPS139333:pvr:rvnDellInc.:rn099TN4:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: XPS13 9333
dmi.sys.vendor: Dell Inc.

Revision history for this message
Alistair Grant (akgrant0710) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-input
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Does this also happen using the mainline built?
<https://wiki.ubuntu.com/Kernel/MainlineBuilds>

When answered, please set this bug status back to "confirmed". Thank you.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Alistair Grant (akgrant0710) wrote :

I tried 3.19.0-031900rc5-generic from the mainline builds. I'm able to get further this time in that I can record something, however you can see errors in syslog, attached below. I think the relevant events are at:

16:47:02 - system boot (I think)
16:48:16 - plug the Live2 in to the USB port
16:48:23 - ALSA reports an error (about the time I started recording)
16:50:14 - xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command

Unsurprisingly, after this the USB system stops responding, unplugging the Live2 and plugging in a mouse shows nothing in the log file, and the mouse doesn't work (the touchpad continues to operate correctly).

Thanks again,
Alistair

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alistair Grant (akgrant0710) wrote :

After a bit more testing, accidentally selecting the wrong video device and successfully recording video from the built-in webcam and audio from the Live2, I think it is reasonable to say that the ALSA errors in "syslog from mainline 3.19rc5" are due to problems between the Live2 drivers and the USB3 drivers.

Should I be reporting this to the linux-usb mailing list?

Thanks again,
Alistair

Revision history for this message
Chris J Arges (arges) wrote :

Alistair,
Yes please report this upstream to linux-usb and alsa-devel. Thanks!
We'd be more than happy to include and resulting fixes in Ubuntu.

Revision history for this message
Alistair Grant (akgrant0710) wrote :
Revision history for this message
Alistair Grant (akgrant0710) wrote :

Reported to alsa-devel: http://mailman.alsa-project.org/pipermail/alsa-devel/2015-January/086877.html

I've already received confirmation from the original author of the Hauppauge USB-Live2 USB driver that there are problems with the device on the xHCI stack, see: http://www.spinics.net/lists/linux-usb/msg120276.html

Thanks,
Alistair

Revision history for this message
Alistair Grant (akgrant0710) wrote :

Adding another syslog with additional logging enabled by:

echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control

requested by module maintainer.

Revision history for this message
Alistair Grant (akgrant0710) wrote :

Updated kernel applying https://github.com/OpenELEC/OpenELEC.tv/commit/b636927dec20652ff020e54ed7838a2e9be51e03

This kernel successfully records video and audio for the first time using the xhci stack, but usb locks up afterwards (lsusb never returns).

See attached syslog.

Revision history for this message
Alistair Grant (akgrant0710) wrote :

Another USB device crash, this time caused by try to format an external disk with gparted. Probably not the same bug, but I'm passing it on to the kernel maintainers.

penalvch (penalvch)
tags: added: bios-outdated-a06
tags: added: kernel-bug-exists-upstream-3.19-rc5 vivid
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Alistair Grant (akgrant0710) wrote :

Hi Christopher,

Would you please let me know why you added the "bios-outdated-a06" tag?

I updated the bios just before originally submitting this bug to confirm that it wasn't fixed by the BIOS. A06, dated 22 Dec 2014, is the latest offered by the Australian Dell website.

Thanks,
Alistair

penalvch (penalvch)
tags: added: latest-bios-a06
removed: bios-outdated-a06
Revision history for this message
Alistair Grant (akgrant0710) wrote :

> added: latest-bios-a06
> removed: bios-outdated-a06

Thanks for the udpate!

Revision history for this message
Alistair Grant (akgrant0710) wrote :

The attached syslog is the result of running 3.19.0 with a proposed xHCI patch:

* xhci: Allocate correct amount of scratchpad buffers

I'll notify the xhci kernel maintainer.

Revision history for this message
Alistair Grant (akgrant0710) wrote :

A kernel patch has been accepted that mostly resolves this issue:

http://www.gossamer-threads.com/lists/linux/kernel/2126922

This modifies the xHCI driver to apply a quirk (XHCI_AVOID_BEI) to all Intel xHCI host controllers (previously the quirk was only applied to one series of Intel controllers). The patch affects all isochronous USB devices, e.g. video and audio capture.

After applying the patch I'm able to record video as long as the Live2 is plugged in after the PC has booted. If the Live2 is present during boot, the failure is intermittent. Our latest hypothesis is that this is a bug in the cx231xx driver, not the xHCI driver. The current behaviour is still a big step forward, allowing reliable recording, and likely will resolve issues for a significant number of video and audio capture devices connected to Intel xHCI host controllers, thus for now I would mark this issue resolved and I'll submit another bug report if I'm able to narrow down the outstanding issue(s).

I've successfully tested the patch against the following kernels:

* Mainline 4.0-rc5
* Mainline 3.19.2
* Mainline 3.19.3
* Ubuntu 3.19.0-10-generic

It looks like it will be kernel 4.1 before the patch makes it to general availability.

Should I change the status from "Triaged" to "Fix Committed"?

Thanks,
Alistair

Revision history for this message
penalvch (penalvch) wrote :

Alistair Grant, Fix Committed for linux (Ubuntu) is reserved for when a patch is available in the Proposed repository, as outlined in https://wiki.ubuntu.com/Bugs/Status .

tags: added: cherry-pick
Revision history for this message
Alistair Grant (akgrant0710) wrote :

Hi Christopher,

Thanks for the clarification, I'm looking forward to when this works its' way through to the Ubuntu kernel.

Thanks again,
Alistair

Revision history for this message
Alistair Grant (akgrant0710) wrote :

Further information: The patch has been back-ported to mainline 3.19.5, and the mainline 3.19.6 kernel appears to have further improved the situation, so that booting with the Live2 plugged in also works. I can't be sure that the problem won't happen again, as it appears to be timing related, however it is certainly much better.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.