* High-Impact: xhci_hid - "Not enough bandwidth for new device state" @ 2019-07-23 12:31 Frank Bergmann 2019-07-23 12:44 ` Greg KH 0 siblings, 1 reply; 6+ messages in thread From: Frank Bergmann @ 2019-07-23 12:31 UTC (permalink / raw) To: linux-usb Dear Linux-USB, https://bugzilla.redhat.com/show_bug.cgi?id=1411604 - This bug is around since 5 years. - Severity: High - "It's not Fedora specific, it's linux in general" There are 671 results in Google for 'USB "Not enough bandwidth for new device state"'. Why does nobody take this on? I offer to send you or whoever a Logitech C922 WebCam if it accelerates the process :-) The bug basically keeps people from using a USB 3.0 WebCam in parallel to some virtual machine Audio. This means it will affect any "professional" users who need to do GoToMeeting or WebEx together with running a Windows VM. I've posted in AskUbuntu.com: https://askubuntu.com/questions/1149160/what-to-do-with-usb-webcam-not-enough-bandwidth-for-new-device-state-issue Thanks Frank Frank Bergmann Dipl.-Ing., MBA Founder ]project-open[ Tel: +34 932 202 088 (Spain) Tel: +1 415 429 5995 (USA) Cell: +34 609 953 751 Fax: +34 932 890 729 mailto:frank.bergmann@project-open.com http://www.project-open.com http://www.twitter.com/projop http://www.facebook.com/projectopen.org http://www.linkedin.com/in/fraber http://www.xing.com/profile/Frank_Bergmann23 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: High-Impact: xhci_hid - "Not enough bandwidth for new device state" 2019-07-23 12:31 High-Impact: xhci_hid - "Not enough bandwidth for new device state" Frank Bergmann @ 2019-07-23 12:44 ` Greg KH [not found] ` <41433e67-2496-97a5-a233-8026f13dfaba@project-open.com> 0 siblings, 1 reply; 6+ messages in thread From: Greg KH @ 2019-07-23 12:44 UTC (permalink / raw) To: Frank Bergmann; +Cc: linux-usb On Tue, Jul 23, 2019 at 02:31:18PM +0200, Frank Bergmann wrote: > Dear Linux-USB, > > > https://bugzilla.redhat.com/show_bug.cgi?id=1411604 > > - This bug is around since 5 years. > > - Severity: High > > - "It's not Fedora specific, it's linux in general" > > > There are 671 results in Google for 'USB "Not enough bandwidth for new > device state"'. Why does nobody take this on? Because there's not much to be done here. You are trying to add a device to the USB bus that is asking for more bandwidth than the bus currently can provide. So we fail the device addition. What are we supposed to do instead? > > > I offer to send you or whoever a Logitech C922 WebCam if it accelerates the > process :-) > > > The bug basically keeps people from using a USB 3.0 WebCam in parallel to > some virtual machine Audio. This means it will affect any "professional" > users who need to do GoToMeeting or WebEx together with running a Windows > VM. Why do you say that? Many people have that configuration working just fine. Personally I have a ton of USB devices all plugged into one USB 3 port running at the same time (webcam, audio devices, keyboard, mouse) and video conferences work just fine with that. Try plugging the device into a separate USB root hub and you should be fine, as we can't do the impossible here (get extra bandwidth than what is present on the system). thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <41433e67-2496-97a5-a233-8026f13dfaba@project-open.com>]
* Re: High-Impact: xhci_hid - "Not enough bandwidth for new device state" [not found] ` <41433e67-2496-97a5-a233-8026f13dfaba@project-open.com> @ 2019-07-23 13:24 ` Greg KH 2019-07-23 14:27 ` Frank Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Greg KH @ 2019-07-23 13:24 UTC (permalink / raw) To: Frank Bergmann; +Cc: linux-usb On Tue, Jul 23, 2019 at 03:12:53PM +0200, Frank Bergmann wrote: > Hi Greg, > > > Thank you for answering! You are my hero. > > > > not much to be done [...] bandwidth > > [...] we can't do the impossible here > > > It is not the bandwidth! That would be easy... > > > 1. USB 3.0 on my Dell XPS 15 9370 has 10GB/s, that's enough for a Webcam > (USB 2.0) plus some audio... Are you sure? It all depends on what that devices are asking for. Remember USB 2 devices suck the bandwidth of a USB connection like a starving sponge. > 2. It works after a reboot for a while, if I first add the Webcam and > then(!) start the VM (VMware Player or Workstation 15) It depends on the order in which you ask for resources. I have no idea what vmware does, and how it is faking all of this out by possibly using kernel drivers or userspace interactions. So I wouldn't use that as an example of anything working well :) > 3. It worked in Windows 7 and Windows 10 (WebCam plus audio from VMware > Player (Windows versions)) before I switched to Ubuntu 18.04. Windows 7, like older versions of Linux, would not try to calculate the bandwidth requirements ahead of time, and would just try to work. That causes problems with dropped packets and other fun issues. Linux solved this in newer releases by doing the calculations "up front" and you are seeing the result. You always were going over the max limit, but when using the device, "getting lucky". I think Windows 10 also does what Windows 7 did, but am not quite sure. Try asking on a Windows list... > 4. RedHad guys acknowledged the bug: > https://bugzilla.redhat.com/show_bug.cgi?id=1411604 > > > > Many people have that configuration > > > Please search Google for 'USB "Not enough bandwidth for new device state"'. > You will find 650 results with quite specific and similar error > descriptions. It all comes down to the configuration of your devices and root hubs and controller. Yes, lots of people can duplicate this issue, but then again, that's why we put the check in there, to give people a chance to understand why things would later stop working. > The bug seems to occur in the isochronic transmission part of USB 3.0. > Somebody suspected it occurs if there are two devices trying to transmit at > the same time (WebCam + VM audio). Probably. > > separate USB hub > > > Already tried that and zillions of other combinations. In particular I tried > with no USB hub at all, just WebCam + VM and no other hardware. Root hub. The device that connects the PCI device to the USB bus. On some laptops there is one root hub per USB port, on others, only 1 root hub for all plugs together. It depends on your system. If you have a desktop system, try plugging in a new PCI USB controller, that is a root hub device. > After downgrading to USB 2.0 via BIOS it worked, though... But that's not > possible for other reasons. Yes, that is a normal solution as then your USB 3 devices do not ask for "too much" bandwidth. There's also issues with having to reserve ahead of time the max bandwidth possible for a 2.0 device on a 3.0 bus that causes problems as you can see. It's not a simple problem and is always easier to just get a different USB controller as you will end up having issues on other operating systems as well, if they don't try to do the reservations ahead of time, it's just harder to notice. sorry, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: High-Impact: xhci_hid - "Not enough bandwidth for new device state" 2019-07-23 13:24 ` Greg KH @ 2019-07-23 14:27 ` Frank Bergmann 2019-07-23 15:25 ` Alan Stern 2019-07-24 6:32 ` Greg KH 0 siblings, 2 replies; 6+ messages in thread From: Frank Bergmann @ 2019-07-23 14:27 UTC (permalink / raw) To: Greg KH; +Cc: linux-usb Hi! I just want to make the case that this is quite an important issue. I was very surprised to hear from the CIO of one of our customers that they had the same issue. This kept them from offering Ubuntu and an option for their Dell laptops. Like myself, these guys need to run GoToMeeting/WebEx together with a Windows VM for business. I understand this is probably a difficult bug and that it is difficult to reproduce. However, this combination of WebCam + VM is required by everybody except for a very few privileged "Linux only" developers. > It all depends on what that devices are asking for The Logitech C922 has a H.264 compression on the chip. The "bandwidth calculator" (https://www.google.es/search?q=H.264+bandwidth) says it needs 1024kBps for 1080p @ 30fps. Not sure if this is true, and I'm not sure what the devices actually does, though... > Linux solved Ok, so you have a clear idea what part of the driver causes the error, that's a step forward. But I can't imagine it's "real" bandwidth. USB 3.1 can handle two full-HD screens plus a Gigabit Ethernet on the same 5GBit lanes... A few megabit for compressed vido plus a few _kilo_ bits/s for audio... => Is there a way to debug these bandwidth requests for me? Maybe you want to include bandwidth requests in the kernel logs in the future if these issues are so wide spread? => Maybe you can recommend me a WebCam with tripod option that is known to work well with Linux? => From what I understand I should now test with VirtualBox and KVM/QEMU and check if the same issue appears. I will do this and let you know about the results. > configuration of your devices and root hubs I've got a brand new Dell XPX 15 9370 Laptop. No other USB hubs, devices, no change to any configuration. I chose the model because it is supposed to be the same that Linus Torvalds uses (well, XPS 13...) I can offer OpenVPN access to my laptop for reproducing the issues. I also offer to buy a Logitech C922 WebCam if somebody wants to get seriously down to this issue. Best Regards, Frank --- Frank Bergmann Dipl.-Ing., MBA Founder ]project-open[ Tel: +34 932 202 088 (Spain) Cell: +34 609 953 751 Fax: +34 932 890 729 mailto:frank.bergmann@project-open.com http://www.project-open.com http://www.twitter.com/projop http://www.facebook.com/projectopen.org http://www.linkedin.com/in/fraber http://www.xing.com/profile/Frank_Bergmann23 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: High-Impact: xhci_hid - "Not enough bandwidth for new device state" 2019-07-23 14:27 ` Frank Bergmann @ 2019-07-23 15:25 ` Alan Stern 2019-07-24 6:32 ` Greg KH 1 sibling, 0 replies; 6+ messages in thread From: Alan Stern @ 2019-07-23 15:25 UTC (permalink / raw) To: Frank Bergmann, Mathias Nyman; +Cc: Greg KH, USB list On Tue, 23 Jul 2019, Frank Bergmann wrote: > Hi! > > > I just want to make the case that this is quite an important issue. I > was very surprised to hear from the CIO of one of our customers that > they had the same issue. This kept them from offering Ubuntu and an > option for their Dell laptops. Like myself, these guys need to run > GoToMeeting/WebEx together with a Windows VM for business. > > > I understand this is probably a difficult bug and that it is difficult > to reproduce. However, this combination of WebCam + VM is required by > everybody except for a very few privileged "Linux only" developers. > > > > > It all depends on what that devices are asking for > > > The Logitech C922 has a H.264 compression on the chip. The "bandwidth > calculator" (https://www.google.es/search?q=H.264+bandwidth) says it > needs 1024kBps for 1080p @ 30fps. > > Not sure if this is true, and I'm not sure what the devices actually > does, though... > > > > Linux solved > > > Ok, so you have a clear idea what part of the driver causes the error, > that's a step forward. The situation is not as simple as you think. You're probably not aware of this, but with xHCI USB-3 controllers, bandwidth decisions are made by the hardware/firmware, not by the software. In particular, these decisions are not made by the kernel driver; they are made by the xHCI controller itself. Therefore changes to the kernel driver most likely cannot fix the problem. You would need to augment or replace your computer's xHCI USB-3 controller hardware. > But I can't imagine it's "real" bandwidth. USB 3.1 can handle two > full-HD screens plus a Gigabit Ethernet on the same 5GBit lanes... A few > megabit for compressed vido plus a few _kilo_ bits/s for audio... > > => Is there a way to debug these bandwidth requests for me? Maybe you > want to include bandwidth requests in the kernel logs in the future if > these issues are so wide spread? Here are some things you can do to provide more detailed debugging information. Unplug the webcam's USB cable, and then (as root) do: dmesg -C mount -t debugfs none /sys/kernel/debug echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable Plug in and try (and fail!) to use the webcam. Send output of dmesg Send contents of /sys/kernel/debug/usb/devices Send contents of /sys/kernel/debug/tracing/trace I won't be able to interpret all the results for you, but Mathias (the xhci-hcd maintainer) should be able to. However, you ought to realize in advance that the results are likely to show only that the hardware refused to allocate the necessary bandwidth and did not provide any explanation for its refusal. > => Maybe you can recommend me a WebCam with tripod option that is known > to work well with Linux? The issue may depend more on the type of xHCI controller than on the type of webcam. Alan Stern > => From what I understand I should now test with VirtualBox and KVM/QEMU > and check if the same issue appears. I will do this and let you know > about the results. > > > > configuration of your devices and root hubs > > > I've got a brand new Dell XPX 15 9370 Laptop. No other USB hubs, > devices, no change to any configuration. I chose the model because it is > supposed to be the same that Linus Torvalds uses (well, XPS 13...) > > > > I can offer OpenVPN access to my laptop for reproducing the issues. I > also offer to buy a Logitech C922 WebCam if somebody wants to get > seriously down to this issue. > > > Best Regards, > Frank > > --- > Frank Bergmann > Dipl.-Ing., MBA > Founder ]project-open[ > Tel: +34 932 202 088 (Spain) > Cell: +34 609 953 751 > Fax: +34 932 890 729 > > mailto:frank.bergmann@project-open.com > http://www.project-open.com > http://www.twitter.com/projop > http://www.facebook.com/projectopen.org > http://www.linkedin.com/in/fraber > http://www.xing.com/profile/Frank_Bergmann23 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: High-Impact: xhci_hid - "Not enough bandwidth for new device state" 2019-07-23 14:27 ` Frank Bergmann 2019-07-23 15:25 ` Alan Stern @ 2019-07-24 6:32 ` Greg KH 1 sibling, 0 replies; 6+ messages in thread From: Greg KH @ 2019-07-24 6:32 UTC (permalink / raw) To: Frank Bergmann; +Cc: linux-usb On Tue, Jul 23, 2019 at 04:27:51PM +0200, Frank Bergmann wrote: > > configuration of your devices and root hubs > > > I've got a brand new Dell XPX 15 9370 Laptop. No other USB hubs, devices, no > change to any configuration. I chose the model because it is supposed to be > the same that Linus Torvalds uses (well, XPS 13...) I too have the XPS 13, and it is very different from the XPX 15 last I looked, so I do not think you can compare the two, sorry. The debugging information that Alan asked for should help here. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-24 6:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-23 12:31 High-Impact: xhci_hid - "Not enough bandwidth for new device state" Frank Bergmann 2019-07-23 12:44 ` Greg KH [not found] ` <41433e67-2496-97a5-a233-8026f13dfaba@project-open.com> 2019-07-23 13:24 ` Greg KH 2019-07-23 14:27 ` Frank Bergmann 2019-07-23 15:25 ` Alan Stern 2019-07-24 6:32 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).