You are not logged in.

#1 2017-04-20 14:59:28

Aspr
Member
Registered: 2017-04-20
Posts: 5

[SOLVED] Trying bringing up ethernet interface results in disk sleep

Hello everyone,

After recent update (that happened after not updating for ~1 month and involved upgrading kernel from 4.8.13-1 to 4.10.8-1) Internet through Ethernet dongle stopped working. When I try to run

ip link set enp0s20u2 up

I get no response, can't terminate the process and in htop the corresponding process is written to be in disk sleep state. The disk sleep state then slowly propagates to the other internet-related processes (such as pidgin, chromium etc), so they become unresponsive as well. This problem, however, cannot be seen in either systemd journal or dmesg, and running strace with the process gives results that I can't make any sense of. These are systemd journal (is reversed and a bit long, shows the propagation of disk sleep. The interesting part is near the end, I denote the moment when I try bringing interface up manually) and strace log.
Not sure if that matters, but I use USB Ethernet dongle by Apple, have upgraded system since problem appeared several times (with no avail) and my laptop is Thinkpad Yoga 14 (model 20DM-003NRT).

[SOLVED]
Apparently, the update has turned usb autosuspend on (not sure why did it happen), and it somehow breaks usbcore and asix module. Anyway, setting usbcore.autosuspend=-1 in kernel boot parameters worked for me.

Last edited by Aspr (2017-04-23 14:19:48)

Offline

#2 2017-04-20 15:32:18

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

The system is waiting for an ioctl response (likely from your dongle) but that doesn't show up.

Your best guess is likely to modinfo the kernel module for the dongle and check for parameters regarding powersaving, quirks etcetc.
Also try with disabled usb autosuspend: https://wiki.archlinux.org/index.php/Po … utosuspend

Offline

#3 2017-04-20 16:09:56

Aspr
Member
Registered: 2017-04-20
Posts: 5

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

seth wrote:

Also try with disabled usb autosuspend:

I do not use usb autosuspend, so this probably can be ruled out.

seth wrote:

Your best guess is likely to modinfo the kernel module for the dongle and check for parameters regarding powersaving, quirks etcetc.

Related kernel module is asix, but modinfo output gives hardly anything useful:

filename:       /lib/modules/4.10.10-1-ARCH/kernel/drivers/net/usb/asix.ko.gz
license:        GPL
description:    ASIX AX8817X based USB 2.0 Ethernet Devices
version:        22-Dec-2011
author:         David Hollis
srcversion:     ADA8D2C387298F28E57774A
alias:          usb:v066Bp20F9d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B95p172Ad*dc*dsc*dp*ic*isc*ip*in*
---------(There are many other aliases that I did not copy here, they all look the same way)--------------
depends:        mii,libphy,usbnet,usbcore
intree:         Y
vermagic:       4.10.10-1-ARCH SMP preempt mod_unload modversions

Offline

#4 2017-04-20 18:26:15

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

:-(
Is the module loaded, the device listed in lsusb? Are there warnings/errors/any related messages in dmesg (before and while attempting to bring up the device)?

Offline

#5 2017-04-23 11:00:29

Aspr
Member
Registered: 2017-04-20
Posts: 5

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

Apparently the problem is related to asix module. It is loaded, but trying to remove it with modprobe -r results in disk sleep (which, as far as I understand, is not a normal behavior). Dmesg log for removing asix is here, it doesn't show any warnings or error messages for removing asix; systemd journal is similar.

The USB dongle is listed in the lsusb output.

Last edited by Aspr (2017-04-23 11:01:41)

Offline

#6 2017-04-23 12:18:17

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

systool -vm usbcore

There's a recursive resume call and it somewhat looks like being called around usb autosuspension ...

Offline

#7 2017-04-23 13:23:20

Aspr
Member
Registered: 2017-04-20
Posts: 5

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

I ran systool to get the following. Indeed the usb autosuspend was turned on for some strange reason.
I tried rebooting and then turning the autosuspend off (via echo "-1" > /sys/module/usbcore/parameters/autosuspend), but this doesn't help and removing asix (or trying to bring ethernet up) still results in the disk sleep. Dmesg output is very similar to the one there was before.

Offline

#8 2017-04-23 14:02:24

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

Try to set that as a kernel parameter at grub or /etc/modprobe.d
According to the doc, "present" devices remain unaffected by those changes and I don't know what that means in your context.

Offline

#9 2017-04-23 14:14:39

Aspr
Member
Registered: 2017-04-20
Posts: 5

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

Setting usbcore.autosuspend=-1 as a kernel parameter indeed helped, thank you very much!
It still remains a mystery for me why did autosuspend reappeared and why does it break asix and usbcore.

Offline

#10 2017-04-23 14:51:20

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Trying bringing up ethernet interface results in disk sleep

The asix driver is likely buggy (recursive resume() calls are claimed to be the common bug in this context) so you should file a bug report to get that fixed (warning: you'll be required to build kernels or at least the module - if you won't, don't bother asking)
This possible bug in the driver is (apparently) triggered by the autosuspend stack - usbcore is likely innocent itr.

You explicitly need to deactivate usb - "2" is the default value. It's not-so fine-grained config might have come with some power management/laptoptool package, see https://wiki.archlinux.org/index.php/Po … utosuspend on details.

Offline

Board footer

Powered by FluxBB