Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB devices randomly disconnecting themselves every few seconds #677

Closed
qa-p-r opened this issue Aug 17, 2017 · 17 comments
Closed

USB devices randomly disconnecting themselves every few seconds #677

qa-p-r opened this issue Aug 17, 2017 · 17 comments

Comments

@qa-p-r
Copy link

qa-p-r commented Aug 17, 2017

What is the issue or idea you have?
USB devices randomly disconnecting themselves

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.
No matter the devices, it was working well on 3-4 devices, then suddenly when I plugged two more it started to constantly restart - even unplugging the other ones does not fix the issue

Please provide the steps to reproduce the issue.

  1. Plug 3-4 devices
  2. Start STF
  3. Plug two more

What is the expected behavior?
They should work

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.
https://pastebin.com/fj02PxEy

Please run stf doctor and paste the output here.
N/A, using docker, and while doing that it throws errors that are unrelated (like "adb is missing" while I'm able to fully use the devices)

chrome_2017-08-17_13-02-20
chrome_2017-08-17_13-02-09

@qa-p-r qa-p-r changed the title USB devices randomly disconnecting themselves USB devices randomly disconnecting themselves every few seconds Aug 17, 2017
@sorccu
Copy link
Member

sorccu commented Aug 17, 2017 via email

@qa-p-r
Copy link
Author

qa-p-r commented Aug 17, 2017

I bought hardware specifically following the README. G4560 (so newest gen CPU) and B250M motherboard, along with SSD and 8gb of rams. Also top-end usb hubs, active, powered from power outlet.

@sorccu
Copy link
Member

sorccu commented Aug 17, 2017 via email

@qa-p-r
Copy link
Author

qa-p-r commented Aug 17, 2017

http://www.tp-link.com.pl/products/details/cat-5688_UH700.html - UH700 TP Link, you can't even get a more expensive one in here. Also, I've been playing with STF a year or two ago, and it worked up to 10 devices on mac (!), so should work here too I guess?

One more thing - I'm still waiting for the StarTech usb controller, but I think 6 devices should not restart themselves

@sorccu
Copy link
Member

sorccu commented Aug 17, 2017 via email

@qa-p-r
Copy link
Author

qa-p-r commented Aug 17, 2017

@sorccu big thanks for this support that you didn't even had to provide - I have a few of those hubs already unfortunately (they did work with mac up to 12 devices), so for now I'll just plug less devices per hub and then import the pluggable from US.

Thanks!

@qa-p-r qa-p-r closed this as completed Aug 17, 2017
@sorccu
Copy link
Member

sorccu commented Aug 17, 2017

That's the thing with USB hardware issues - sometimes things work for a while but aren't stable long term. I'm not sure where you're located but you should have other options than buying from the US, see http://plugable.com/products/usb2-hub7bc/. Also, it doesn't have to be that exact hub, but it needs to have similar specs.

Do note that you could also have issues with your other components. Right now the hub is the only component that's obviously bad but who knows? Having the latest and greatest isn't necessarily a guarantee of anything either - older Intel processors used to have enough resources to support 50+ phones connected simultaneously, but now you're limited to 8-12 without a PCIE card. It's a huge pain honestly as soon as you try to connect more devices than an average consumer would.

Your motherboard could also have a USB chipset that has quirks in Linux. That's why it would be best to get the PCIE card to minimize the variables. And again, note that there are differences between PCIE cards, you have to choose one with the right specs.

@qa-p-r
Copy link
Author

qa-p-r commented Aug 17, 2017

Sure, but who has the resources to test out all the USB Hubs and usb extension cards out there? ;) You guys (or just you?) did a great job handpicking two best options for both hubs and extension cards.

My StarTech PCIe card should arrive next week, and I just ordered the pluggable usb 2.0 hub, so hopefully it'll sort out at least those problems I face now.

Thanks!

@qa-p-r
Copy link
Author

qa-p-r commented Aug 19, 2017

Just in case someone has similiar issue - I was making a research what's wrong with UH700/720. Turns out, for some reason, in some cases, it tends to restart every 30 seconds (rough estimate of how often my devices were kicked off stf):

https://ubuntuforums.org/showthread.php?t=2201564

Removing extension cord should help. Also, it's basically 4 port device with... another hub plugged into one of its ports. Nice engineering TP-Link ;)

One more thing: It fixed itself (disconnecting) when I connected the hub to 2.0 port in front of the PC panel rather than 3.0 port.

@qa-p-r
Copy link
Author

qa-p-r commented Aug 20, 2017

One (really) last tip, that could help someone - I wasn't able to fix the 3.0 ports, BUT, after turning off ALL USB options in bios and, using powertop, in tunables, selecting autosupsend as "bad" resolved the issue completely. Even with the mentioned hubs, I was able to connect 24 devices (3x7 + 3 ports) and everything is super stable.
I have no idea how I managed to get to this point, because no one mentioned fiddling with that option, but it helped me.
2017-08-21_00-49-53

@sorccu
Copy link
Member

sorccu commented Aug 21, 2017 via email

@qa-p-r
Copy link
Author

qa-p-r commented Aug 21, 2017

@sorccu sure, that's why I'm setting up the proper USB controller and using the pluggable hub, which is much more capable, for more power consuming devices (like tablets and bigger phones). I've left this info here also in case someone will have similiar problem - so you can always reroute him (or he can find this in google or STF issues listing)

@sorccu
Copy link
Member

sorccu commented Aug 21, 2017

Yes, thank you :)

@entomber
Copy link

Thank you @Rabusek. I had a somewhat similar issue with the Plugable USB3-HUB7BC. All connected devices would disconnect and reconnect every few minutes. Disabling autosuspend resolved it for me.

@direc85
Copy link

direc85 commented Feb 9, 2021

One (really) last tip, that could help someone - I wasn't able to fix the 3.0 ports, BUT, after (...) using powertop, in tunables, selecting autosupsend as "bad" resolved the issue completely.

Thank you so much!

I'm trying to flash my Sony Xperia XA2 Ultra and having used powertop the device does not disconnect after I run flashboot devices. I'm going to spread this tip, thanks again!

@qa-p-r
Copy link
Author

qa-p-r commented Feb 10, 2021

Glad it still helps someone after 3 years! That reminds me i need to set my STF up again after i moved out 2 times since 2017.

@Wokir
Copy link

Wokir commented Oct 26, 2021

Hello everyone. I have 2 questions about connecting multiple android devices to a PC at the same time.

  1. Can 20, 30 or more devices be connected to a PC via Wi-Fi and identified by adb? If so, please tell me the way.
  2. If the wireless connection does not work out how to solve the problem for me using USB hubs. What active USB hubs will solve the problem of unstable connection of devices to a PC?
    If I need to configure the system, please explain me how to do it. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants