You are not logged in.
Hello,
I use internet via USB-to-Ethernet adapter due to lack of ethernet port in my laptop.
It works fine for some time. Sometimes 30mins, sometimes hours.
Then it just abruptly stops working and I lose connection and there seem no way to get it back.
Unplugging and plugging in does not work.
Would there be any way somehow to reset it without rebooting the whole system?
After the reboot I plug in the adapter and it reports like this in dmesg:
[ 95.547749] usb 2-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 95.564706] usb 2-2: New USB device found, idVendor=13b1, idProduct=0041, bcdDevice=30.00
[ 95.564725] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[ 95.564734] usb 2-2: Product: Linksys USB3GIGV1
[ 95.564740] usb 2-2: Manufacturer: Linksys
[ 95.564747] usb 2-2: SerialNumber: 000001000000
[ 95.691663] usb 2-2: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 95.734424] r8152 2-2:1.0: load rtl8153a-3 v2 02/07/20 successfully
[ 95.761844] r8152 2-2:1.0 eth0: v1.11.11
[ 96.399969] r8152 2-2:1.0 enp0s20f0u2: renamed from eth0
[ 98.683789] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s20f0u2: link becomes ready
[ 98.687189] r8152 2-2:1.0 enp0s20f0u2: carrier onHowever I've noticed when it suddenly stops working unplugging and plugging the adapter reports nothing in dmesg.
Last edited by amatika (2021-05-12 17:37:58)
Offline
The trigger is probably https://wiki.archlinux.org/title/Power_ … utosuspend
nb. that you'll have to configure that in TLP and other userspace power mangement tools, so they don't override your settings at runtime.
For a quick test, you can boot w/ "usbcore.autosuspend=-1" which disables it.
Offline
Thank you seth for a suggestion.
I disabled the autosuspend and verified it's disabled
$ cat /sys/module/usbcore/parameters/autosuspend
-1and been testing this for couple of days whether this had an effect on abrupt disconnections.
Indeed random disconnections occurs now less often, however they're not completely gone, sometimes when I close the lid, come back later just to notice I have lost the connection. Then nothing helps but reboot.
Interesting observation is also that after disconnection happens then the reboot always just hangs up and I have to forcefully shutdown the computer by long pressing the power button.
Also I've noticed if I unplug the adapter connection is lost and it cannot be set up again by plugging it back. Nothing just happens. Dmesg doesn't report anything.
Just thinking would there be a some way, as a workaround, while I am trying to solve the root cause, to somehow reset the adapter/usb to avoid restarting the whole system?
Last edited by amatika (2021-05-15 18:58:14)
Offline
sometimes when I close the lid, come back later just to notice I have lost the connection.
Does the system S3 in those cases?
You can trigger USB re-scans (but you're replugging the key anyway) and also reload the kernel module (which however most likely also happens anyway when you re-plug it)
My best guess for the moment would be to disconnect and unplug the key before your S3 the system, then re-plug and reconnect after waking it.
Offline
One option may be to reset the complete usb subsystem by rebinding the usb controller drivers: http://billauer.co.il/blog/2013/02/usb- … hci-linux/
Since unplug/plug fails for you, these twio will probably not help: uhubctl and usbreset (both in the AUR).
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Online