68

I am trying to utilize my monitor's ability to switch video input and USB source (much like a KVM switch) with a USB hub. Previously I had all of the devices plugged directly into USB ports on the monitor. I could switch video input on the monitor to the Surface via its dock or the desktop (both machines are running Windows 10) and USB switched along with the video.

Since introducing the USB hub the Surface dock no longer works with USB, but the desktop does. If I bypass the dock and plug a USB cable directly into the Surface it too works. When connected through the Surface dock I receive the error:

Too many USB hubs are connected together. A USB hub will not function when it's connected more than 5 hubs away from the root port.

The desktop is a generic PC but since the Surface is having issues I've specifically called it out in the list of devices in my configuration:

If I read the error explicitly I can only count 4 USB hubs: Surface Book, Surface Dock, Monitor, and USB hub. To explain how I have things hooked up I've put together this diagram:

Diagram of configuration

Until this error I was under the impression that powered USB allowed for 127 devices to be daisy chained. Is this impression incorrect or is something wrong with my configuration?

Additional info based on responses:

My USB Hub chain as viewed with USB Tree Viewer when connected to my Surface Book via the Surface Dock:

USB Tree Viewer screenshot of Surface Dock hub connections

From this I definitely see that there are more than 5 hubs from the root port to the devices at the end. It seems that a "single layer" hub at the end would solve the issue. According to Ali Chen's comment "finding this information in marketing documents" would be unlikely.

14
  • 28
    Are you plugged into the front or the back of your computer? I'm asking this because some computers are built that the front USB ports are actually not primary ports, but rather "hubbed" from the back ports. May 3, 2017 at 16:59
  • 1
    Is there a reason the monitor has to be in the mix?
    – LPChip
    May 3, 2017 at 17:05
  • 3
    @LPChip (I'm a team member of ahsteele's) the monitor acts as a KVM switch for us, by switching between video signals the USB travels alongside as well. This allows us to carry over keyboards, mice, and other USB peripherals between the surface and the desktop.
    – rheone
    May 3, 2017 at 17:15
  • 1
    @IronWilliamCash, the monitor has a built in KVM, there is no KVM beyond that
    – rheone
    May 3, 2017 at 18:15
  • 14
    Use Device Manager. Menu->View->Devices By Connection. You can then see the hubs chained from each other. This will tell you whether there are hidden hubs where a single hub is really two internally, or hubs on the motherboard.
    – Ben
    May 4, 2017 at 11:54

3 Answers 3

54

When counting hubs, you assume that every individual box/device has only one hub. This assumption is likely untrue.

To begin, the 10-port "amazon hub" definitely has at least two hubs in chain, because single hubs are not manufactured with 10 ports, 7-port maximum [see this explanation].

Then the Dell monitor has also some special design - it has TWO UPSTREAM ports. What is its internal architecture, who knows.

The "surface dock" is also a suspect for having more than one USB hub in the chain. And I don't know if the "surface" uses extra internal hub for whatever reason.

To get the actual idea how many hubs are there in the chain and what/how all things are connected, use USBTreeView.exe on the Surface side. I am sure the Surface got the chain right, and you do have more than 5 hubs in the chain.

Addition: USB standard allows for 127 devices per one root controller, it doesn't mean that they are "daisy chained", just total of 127. In fact, if we discount hubs as functional USB devices, the total number of useful devices comes down to 102, since you would need 17 7-port hubs to accommodate the devices, in three-tier configuration, and each hub will take one address out of available space.

9
  • 1
    Damn, beat me to it. :D Well, here’s some pictures to illustrate this: Device Manager, PCB.
    – Daniel B
    May 3, 2017 at 18:22
  • 5
    I would guess that the 10-port "amazon hub" has three 4-port chips in a cascade 1->2. The first (upstream) has two ports connected to two other chips, and 2 ports are free. So you have 4+4+2 port hub. These to ports should still work. May 3, 2017 at 18:28
  • 1
    @ahsteele, there are single-chip 7-port USB 3.0/3.1 hubs, USB5807 for example. But I would guess that the "7-port amazon hub" has two 4-port ICs. The uppper level IC has 3 user-accessible ports, and one port is used to connect the second 4-port IC, making 3+4=7 downstream ports total. AFAIK, the same box also comes as 4-port design. I would guess that one PCB can accommodate all three options, 4, 7, and 10, with BOM change. But why are you asking? What Device Manager or USBTreeView show? You should have these results ready, do you? May 5, 2017 at 6:17
  • 1
    @ahsteele, yes, just as I guessed, the last hub (4-port IC from the 10-port anazon hub) has two ports to user connectors (should be usable), and the other two ports go to the next level of hubs (as I guessed, 2 x 4 port), which exceed the USB requirement. They are 6-th in the chain, and labelled with yellow marks. You need to get a "single layer" hub. Any 4-port hub should work just fine, or a seven-port but the one with a single hub controller IC. May 5, 2017 at 17:54
  • 2
    @ahsteele, I don't think you will find this information in marketing documents. One way is to get a sample and plug it into a host with USBTreeView, and look. The other way is to open the plastic up and take a look inside. Or maybe you can find a tear-up review of the device, but again, manufacturers can make substitutions in internal circuitry, so you never know. Sorry. Keep in mind that some keyboards may have a built-in hub, so they would fail to function even if you have the last hub correctly. May 5, 2017 at 18:02
74

Your 10 port USB hub (and other devices) may actually contain multiple USB hubs in series internally.

USB hub - Wikipedia

USB hubs are often built into equipment such as computers, keyboards, monitors, or printers. When such a device has many USB ports, they all usually stem from one or two internal USB hubs rather than each port having independent USB circuitry.


As stated, the USB spec allows 127 devices to be connected through a single port. However, the USB spec only allows hubs five levels deep, or seven if including both the end device and the root device (the onboard controller itself).

A Technical Introduction to USB 2.0 - USB.org (PDF)

A newly attached hub will be assigned its unique address, and hubs may be cascaded up to five levels deep.

Interoperability Testing with USB Type C - USB.org (PDF)

"Contains devices behind 5 levels of nested hubs – the maximum allowed"

4
  • That is terrible design. Why shouldn't we be allowed to chain as many hubs as we like? It seems pretty easy to hit that limit of 5, as OP's setup doesn't even appear to be that complicated. May 5, 2017 at 0:46
  • 9
    Steven, you are confusing the number of "tiers" (connections) with the number of hubs. The number of hubs is limited due to timing constraint imposed on turn-around of ACK/NAK/whatever. It is stated in Section 4.1.1 of USB 2.0 Specifications. The response time must be limited in half-duplex network topology. For explanation of the reasoning behind this limit, see superuser.com/a/1105099/620011 May 5, 2017 at 2:54
  • 4
    @JamEngulfer, yes, the USB is not the best implementation of the network paradigm. But it wasn't supposed to cover wide area of devices, it was meant to be cheap. So the cost limitation has driven the solution to be half-duplex. As such, the protocol response can't be deferred, and time-out limit is short, dictating limitations on total turn-around time, with hub repeaters eating most of it. So here the limit comes. May 5, 2017 at 3:03
  • It's really not so bad, 1 hub 4 devices, 2 hub levels (5 hubs but only in 2 levels) 16 devices, 3 hub levels (21 hubs) 64 devices, 4 hub levels (85 hubs) 256 devices, this is now more than what is imposed by other limits on USB (127 device limit).
    – ttbek
    May 5, 2017 at 22:00
20

To add some experimental data to the other answers, your problem is specifically with Surface Book exactly because Surface Dock has two USB hubs. I, too, have a Surface Dock with a Surface Book and that's what I see in the Device Manager when I connect a mouse to the dock:

enter image description here

The highlighted hubs belong to the Surface Dock, I verified it by connecting the mouse directly to one of the ports in the Surface Base.

Thus you have:

  1. Surface Dock - 2 hubs
  2. Monitor - at least 1 hub
  3. 10-port USB Hub - at least 2 hubs, since, as mentioned in other answers, one hub can have maximum 7 ports

So at the very minimum you have 5 hubs. Probably the monitor has more than one hub, and that's why you are getting the error.

4
  • The one hub that you're missing is the first hub that's built into the computer itself, the "root hub".
    – Agent_L
    May 4, 2017 at 14:44
  • 5
    @Agent_L the root hub doesn't count towards the 5 hub limit
    – Spc_555
    May 4, 2017 at 14:47
  • @VasilyAlexeev Unless you're using a panel on front, which sometimes actually does add one. Not always though May 5, 2017 at 10:36
  • 5
    @MathijsSegers then, by definition, it's not a root hub, but a normal hub built in the computer case
    – Spc_555
    May 5, 2017 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .