Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270476 - cannot submit datapipe for urb 0, error -28: not enough bandwidth when streaming 2 webcams through hub
Summary: cannot submit datapipe for urb 0, error -28: not enough bandwidth when stream...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.31
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 19:32 UTC by Martin Gerdzhev
Modified: 2011-06-30 15:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/log/messages with the error (messages,1.50 MB, text/plain)
2009-05-19 19:41 UTC, Martin Gerdzhev
Details
output of lsusb -v (lsusb,82.10 KB, text/plain)
2009-05-22 16:51 UTC, Martin Gerdzhev
Details
.config gentoo (.config,70.65 KB, text/plain)
2009-12-04 04:52 UTC, Martin Gerdzhev
Details
.config ubuntu (config-2.6.31-15-generic,108.76 KB, text/plain)
2009-12-07 18:51 UTC, Martin Gerdzhev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerdzhev 2009-05-19 19:32:28 UTC
When I try to stream 2 usb 1.1 webcams through a usb 2.0 hub I get this in /var/log/messages: 
ehci_hcd 0000:00:1d.7: iso sched full ffff8800bc4cd3c0 (now 2635 max 10827)
cannot submit datapipe for urb 0, error -28: not enough bandwidth

It happens within a couple of seconds when I try to do it. If I plug the cameras to different usb ports not through the hub it works just fine. I am using gstreamer to stream the cameras.

Reproducible: Always

Steps to Reproduce:
1.gst-launch-0.10 v4l2src device=/dev/video0 ! image/jpeg,width=320,height=240,framerate=15/1  ! jpegdec ! ffmpegcolorspace ! ximagesink &
2.gst-launch-0.10 v4l2src device=/dev/video1 ! image/jpeg,width=320,height=240,framerate=15/1  ! jpegdec ! ffmpegcolorspace ! ximagesink
3.check /var/log/messages

Actual Results:  
Gstreamer says /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Error starting streaming capture from device '/dev/video1'.
the logs show the bandwidth problems

Expected Results:  
Both cameras should start streaming without any errors.

If I try the same procedure through a usb 1.1 hub it works as expected. This is tested on 2.6.28-gentoo-r5 on x86_64 and on 2.6.28 and 2.6.29 on arm beagleboard. On the arm beagleboard it works ok through musb port but not through ehci usb port.
Output from emerge --info:
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.28-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-gentoo-2.0.0
Timestamp of tree: Tue, 19 May 2009 14:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2, 2.6.2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://gentoo.arcticnetwork.ca/source/ ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US ca en_CA bg"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt css cups dbus dri dvb dvd dvdr exif faac faad ffmpeg flac fortran gdbm gnome gnome-keyring gphoto2 gpm gstreamer gtk hal iconv ipv6 irda isdnlog java java6 jpeg lame laptop libnotify mad midi mmx mp3 mpeg mplayer mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl png policykit pppd pulseaudio python readline reflection samba session spl sse sse2 ssl sysfs syslog tcpd theora threads tiff truetype unicode usb v4l v4l2 vorbis wifi x264 xcomposite xinerama xorg xulrunner xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US ca en_CA bg" USERLAND="GNU" VIDEO_CARDS="vesa radeon radeonhd fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Martin Gerdzhev 2009-05-19 19:41:10 UTC
Created attachment 191825 [details]
/var/log/messages with the error
Comment 2 Mike Pagano gentoo-dev 2009-05-20 18:04:19 UTC
please attach the output of lsusb -v with hub and camera attached.



Comment 3 Martin Gerdzhev 2009-05-22 16:51:29 UTC
Created attachment 192135 [details]
output of lsusb -v

The cameras in question are the Logitech, Inc. QuickCam for Notebook Deluxe and the hub appears as NEC Corp. HighSpeed Hub
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2009-06-21 15:49:59 UTC
Let's move to filing this upstream.. Can you reproduce on the latest vanilla kernel release, currently v2.6.30?
Comment 5 Martin Gerdzhev 2009-06-22 21:08:44 UTC
With 2.6.30 vanilla sources I get only a couple of these:
 uhci_hcd 0000:00:1d.1: reserve dev 3 ep81-ISO, period 1, phase 0, 608 us
Jun 22 16:45:31 MARTO [ 1317.511268] uhci_hcd 0000:00:1d.1: bandwidth allocation failed: period 1, phase 0, 620 + 608 us
Jun 22 16:45:31 MARTO [ 1317.511271] gspca: usb_submit_urb [0] err -28
Jun 22 16:45:31 MARTO [ 1317.519905] uhci_hcd 0000:00:1d.1: reserve dev 3 ep83-ISO, period 1, phase 0, 34 us
Jun 22 16:45:32 MARTO [ 1319.149261] zc3xx: probe 2wr ov vga 0x0000
Jun 22 16:45:33 MARTO [ 1319.517249] uhci_hcd 0000:00:1d.1: bandwidth allocation failed: period 1, phase 0, 654 + 408 us
Jun 22 16:45:33 MARTO [ 1319.517252] gspca: usb_submit_urb [0] err -28

And then the streaming works. The interesting thing is that I managed to test this on Ubuntu with kernel 2.6.27 and it was working ok there as well.
I'll try this on the beagleboard as well and will report if it works with the 2.6.30.
Comment 6 Mike Pagano gentoo-dev 2009-08-09 23:28:44 UTC
Anything to report here?
Comment 7 Martin Gerdzhev 2009-12-03 20:01:19 UTC
I'm using 2.6.31-gentoo-r6 now and this still is a problem with gentoo sources. At the same time on a Ubuntu 9.10 with a 2.6.31-15-generic it works fine.
Plugging into 2 different usb ports not through the hub still works but with the hub I am still getting the errors.
Comment 8 Mike Pagano gentoo-dev 2009-12-03 21:03:36 UTC
Ubuntu disables/enables configuration options by default.

Can we get .config's for both gentoo and ubuntu's kernel.
Comment 9 Martin Gerdzhev 2009-12-04 04:52:00 UTC
Created attachment 211954 [details]
.config gentoo

This is my gentoo .config. I'll try and upload the ubuntu .config as soon as possible.
Comment 10 Martin Gerdzhev 2009-12-07 18:51:18 UTC
Created attachment 212378 [details]
.config ubuntu

Here's the ubuntu 2.6.31-15 .config
Comment 11 Mike Pagano gentoo-dev 2009-12-09 00:37:16 UTC
Have you tried compiling the gentoo kernel with the ubuntu config?
Comment 12 Ken Rushia 2009-12-11 03:13:05 UTC
I can confirm this bug. It will also happen when attempting to use a USB camera and USB headset at the same time.
Comment 13 George Kadianakis (RETIRED) gentoo-dev 2009-12-11 16:47:03 UTC
[1]: http://www.mail-archive.com/linux-usb@vger.kernel.org/msg00484.html

There are issues with scheduling multiple full-speed USB devices on high-speed USB buses (like your hub) [1].

One quick workaround would be to plug one of the two cameras directly into a full-speed root hub on your PC.
You could also buy a hub that supports a Transaction Translator (TT) for each port because your current one has a single one for the whole hub ("Single TT" line in your lsusb).
Finally, you can also try some software solutions like playing around with the following kernel options:
a) CONFIG_USB_EHCI_TT_NEWSCHED (check out the linux-usb linked thread)
b) CONFIG_USB_EHCI_SPLIT_ISO
Comment 14 Martin Gerdzhev 2010-01-26 17:20:39 UTC
With this option enabled I'm still getting the errors.
USB_EHCI_TT_NEWSCHED=y

[ 1943.423233] gspca: usb_submit_urb alt 2 err -28
Jan 26 12:10:20 MARTO kernel: [ 1944.922465] zc3xx: probe 2wr ov vga 0x0000
Jan 26 12:10:20 MARTO kernel: [ 1945.134479] ehci_hcd 0000:00:1d.7: iso sched full ffff8800bde4bc00 (now 3016 max 11208)
Jan 26 12:10:20 MARTO kernel: [ 1945.134485] gspca: usb_submit_urb alt 1 err -28
Jan 26 12:10:20 MARTO kernel: [ 1945.155101] gspca: no transfer endpoint found

And I couldn't find an option CONFIG_USB_EHCI_SPLIT_ISO in the menuconfig.



Comment 15 Mike Pagano gentoo-dev 2010-02-04 17:38:35 UTC
(In reply to comment #11)
> Have you tried compiling the gentoo kernel with the ubuntu config?
> 

Have you tried this?
Comment 16 Mike Pagano gentoo-dev 2010-02-19 23:11:33 UTC
I noticed in your Ubuntu config you have this set:
USB_EHCI_TT_NEWSCHED

But you don't in the gentoo one.  Can you build this into the kernel and then retest, please.

Symbol: USB_EHCI_TT_NEWSCHED                                                                                                     Prompt: Improved Transaction Translator scheduling (EXPERIMENTAL)                                                                        Depends on: USB_SUPPORT && USB_EHCI_HCD && EXPERIMENTAL                                                                                Location:                                                                                                                                -> Device Drivers                                                                                                                                
   -> USB support (USB_SUPPORT [=y])                                                                                                        
      -> Support for Host-side USB (USB [=y])                                                                      
         -> EHCI HCD (USB 2.0) support (USB_EHCI_HCD [=y])  

Comment 17 Martin Gerdzhev 2010-02-22 16:16:46 UTC
(In reply to comment #16)
> I noticed in your Ubuntu config you have this set:
> USB_EHCI_TT_NEWSCHED
> 
> But you don't in the gentoo one.  Can you build this into the kernel and then
> retest, please.
> 
> Symbol: USB_EHCI_TT_NEWSCHED                                                   
>                                                  Prompt: Improved Transaction
> Translator scheduling (EXPERIMENTAL)                                           
>                             Depends on: USB_SUPPORT && USB_EHCI_HCD &&
> EXPERIMENTAL                                                                   
>             Location:                                                          
>                                                                      -> Device
> Drivers                                                                         
>    -> USB support (USB_SUPPORT [=y])                                            
>       -> Support for Host-side USB (USB [=y])                                   
>          -> EHCI HCD (USB 2.0) support (USB_EHCI_HCD [=y])  
> 

I already tried that option. Still didn't work. See comment #14 for the output with the option enabled. I've tried it on linux-2.6.32 and doesn't work there either. 
Maybe the difference is that the ubuntu on my other machine is x86 not x86_64?
Comment 18 Mike Pagano gentoo-dev 2010-02-28 22:05:36 UTC
Can you compare the output of lsmod from the ubuntu kernel and the gentoo one?


Shot in the dark:

Can you build into the kernel:

USB_GADGET_SELECTED
USB_GADGET_DUMMMY_HCD
USB_GADGET_DUALSPEED
Comment 19 Alec Kloss 2010-12-04 15:48:26 UTC
I was experiencing the same issue on a ThinkPad W510 with a USB headset.  Adding USB_EHCI_TT_NEWSCHED appears to have fixed the problem for me.
Comment 20 John Doe 2011-06-30 15:13:19 UTC
I was working now for 2 day's on the problem:
"cannot submit datapipe for urb 0, error -28: not enough bandwidth".

finally - u cant imagine how simple it was - i found the reason and got my usb-sound back again.

the main reason was the "auto-mute feature" after changing audio source with pulse.

so try to go ahead.
 - open gnome-alsamixer or alsamixer
 - switch to tab USB Mixer
 - and increase master volume (Speaker) from zero to more...

here is the original source for this hint:
http://forum.ubuntuusers.de/topic/medusa-5-1-usb-headset/#post-2532118

looks like the errormessage above has nothing todo with missing sound.

hope this will help.

regards
ds