Bug 1217503 - Ethernet to USB ASIX AX88179A chip connects only when opening network configuration module of Yast2
Summary: Ethernet to USB ASIX AX88179A chip connects only when opening network configu...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-26 20:31 UTC by Keks Dose
Modified: 2023-12-04 13:50 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
hwinfo (524.92 KB, application/gzip)
2023-11-29 20:09 UTC, Keks Dose
Details
lsmod when connections works (12.24 KB, text/plain)
2023-11-29 20:12 UTC, Keks Dose
Details
lsmod when connection doesn't work (11.68 KB, text/plain)
2023-11-29 20:13 UTC, Keks Dose
Details
sudo save_y2logs ./231129-yes.tgz (19.46 MB, application/x-compressed-tar)
2023-11-29 20:15 UTC, Keks Dose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keks Dose 2023-11-26 20:31:43 UTC
RJ45 to USB-A adapter, plugged in, no connection. 

lsusb:
Bus 004 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

dmesg:
[  107.818614] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[  108.102996] usb 4-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00
[  108.103009] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  108.103013] usb 4-1: Product: AX88179A
[  108.103016] usb 4-1: Manufacturer: ASIX
[  108.103019] usb 4-1: SerialNumber: 00869C05
[  108.331973] cdc_ncm 4-1:2.0: MAC-Address: f8:e4:3b:86:9c:05
[  108.331983] cdc_ncm 4-1:2.0: setting rx_max = 16384
[  108.343259] cdc_ncm 4-1:2.0: setting tx_max = 16384
[  108.362878] cdc_ncm 4-1:2.0 eth0: register 'cdc_ncm' at usb-0000:00:14.0-1, CDC NCM (NO ZLP), f8:e4:3b:86:9c:05
[  108.981604] cdc_ncm 4-1:2.0 enp0s20f0u1c2: renamed from eth0

But when I open Yast2 and then the module network configuration, the connection suddenly works. So there is a workaround, as long as KDE works. 

It would be good to get it working without GUI, of course.
Comment 1 Takashi Iwai 2023-11-27 16:42:43 UTC
The eth device seems already present, so it's likely a matter of network configuration -- which apparently YaST2 network module does.

That being said, this doesn't look like a kernel issue.
Comment 2 Stefan Hundhammer 2023-11-29 08:10:17 UTC
Please attach y2logs generated with the supplied 'save_y2logs' script, the output of 'hwinfo'.

Please also attach the output of 'lsmod' when it doesn't work (before launching the YaST network module) and when it does (after launching the module).

See also 

https://en.opensuse.org/openSUSE:Report_a_YaST_bug#I_reported_a_YaST2_bug,_and_now_I_am_asked_to_"attach_y2logs"_(for_package_installation_also_"libzypp_logging")._What_does_that_mean,_and_how_do_I_do_that?
Comment 3 Stefan Hundhammer 2023-11-29 08:58:52 UTC
This is the hardware, right?

https://www.asix.com.tw/en/product/USBEthernet/Super-Speed_USB_Ethernet/AX88179


A wired-Ethernet-to-USB adapter like those:

https://www.amazon.de/Ax88179/s?k=Ax88179


This might be missing an UDEV rule to load the kernel module and activate the network when plugged in or during boot time.

And it looks like some Ubuntu users had the same problem not too long ago:

https://askubuntu.com/questions/1414192/driver-for-ax88179-gigabit-ethernet
Comment 4 Stefan Hundhammer 2023-11-29 08:59:45 UTC
See also

http://linux-hardware.org/?id=usb:0b95-1790
Comment 5 Stefan Hundhammer 2023-11-29 09:00:55 UTC
See also

https://bugzilla.kernel.org/show_bug.cgi?id=212731
Comment 6 Stefan Hundhammer 2023-11-29 09:08:29 UTC
The YaST network module doesn't do any magic; it uses libhd, the SUSE hardware detection lib, part of the 'hwinfo' package; the 'hwinfo' command is a very thin wrapper around it) to probe the hardware, look up the hardware ID (PCI ID) and the corresponding kernel module and loads it with 'modprobe'.

Most likely it was an initialization problem at boot time, e.g. network hardware activated before USB hardware; and when you use the YaST network module, it simply does it again, but then the USB hardware is already initialized, so that Ethernet-to-USB adapter is actually detected and the kernel module loaded.

You can check that with 

    sudo hwinfo --netcard

those lines tell you what kernel driver / module to use:

  Driver Info #0:
    Driver Status: r8169 is active
    Driver Activation Cmd: "modprobe r8169"

I bet when you do

   sudo modprobe <my-kernel-module>

it works right away.
Comment 7 Keks Dose 2023-11-29 19:58:09 UTC
(In reply to Stefan Hundhammer from comment #3)
> This is the hardware, right?
> 
> https://www.asix.com.tw/en/product/USBEthernet/Super-Speed_USB_Ethernet/
> AX88179
> 
> 
> A wired-Ethernet-to-USB adapter like those:
> 
> https://www.amazon.de/Ax88179/s?k=Ax88179
> 
> 
> This might be missing an UDEV rule to load the kernel module and activate
> the network when plugged in or during boot time.
> 
> And it looks like some Ubuntu users had the same problem not too long ago:
> 
> https://askubuntu.com/questions/1414192/driver-for-ax88179-gigabit-ethernet

Difficult to confirm. I bought this device:
https://www.mediamarkt.de/de/product/_isy-iad-1010-a-usb-adapter-silber-2737566.html

No data sheet available.

I found many reports about difficulties with that chip and tried some of the suggested solutions.
Comment 8 Keks Dose 2023-11-29 20:09:27 UTC
Created attachment 871066 [details]
hwinfo
Comment 9 Keks Dose 2023-11-29 20:11:10 UTC
(In reply to Stefan Hundhammer from comment #2)
> Please attach y2logs generated with the supplied 'save_y2logs' script, the
> output of 'hwinfo'.
> 
> Please also attach the output of 'lsmod' when it doesn't work (before
> launching the YaST network module) and when it does (after launching the
> module).
> 
> See also 
> 
> https://en.opensuse.org/openSUSE:Report_a_YaST_bug#I_reported_a_YaST2_bug,
> _and_now_I_am_asked_to_"attach_y2logs"_(for_package_installation_also_"libzyp
> p_logging")._What_does_that_mean,_and_how_do_I_do_that?

'hwinfo' starts the connection, 'hwinfo --netcard' as well. So the attachment hwinfo.txt.gz is a snapshot probably with the chip.

hwinfo | grep "AX88179"
    product = "AX88179A"
    product = "AX88179A"
  E: ID_MODEL=AX88179A
  E: ID_MODEL_ENC=AX88179A
  E: ID_SERIAL=ASIX_AX88179A_00869C05
  E: ID_USB_MODEL=AX88179A
  E: ID_USB_MODEL_ENC=AX88179A
  E: ID_USB_SERIAL=ASIX_AX88179A_00869C05
  E: ID_MODEL_FROM_DATABASE=AX88179 Gigabit Ethernet
  E: ID_MODEL_FROM_DATABASE=AX88179 Gigabit Ethernet
  E: ID_MODEL=AX88179A
  E: ID_MODEL_ENC=AX88179A
  E: ID_SERIAL=ASIX_AX88179A_00869C05
  E: ID_USB_MODEL=AX88179A
  E: ID_USB_MODEL_ENC=AX88179A
  E: ID_USB_SERIAL=ASIX_AX88179A_00869C05
  E: ID_MODEL_FROM_DATABASE=AX88179 Gigabit Ethernet
  E: ID_MODEL_FROM_DATABASE=AX88179 Gigabit Ethernet
  <6>[    2.868101] usb 4-1: Product: AX88179
  <6>[    7.195857] ax88179_178a 4-1:1.0 eth0: register 'ax88179_178a' at usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:0a:cd:3d:93:4f
  <6>[39667.653320][T10771] ax88179_178a 4-1:1.0 enp0s20f0u1: unregister 'ax88179_178a' usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
  <6>[40315.723348][T13522] usb 4-1: Product: AX88179A
  <6>[40564.482713][T13522] usb 4-1: Product: AX88179A
  Model: "ASIX Electronics AX88179 Gigabit Ethernet"
  Device: usb 0x1790 "AX88179 Gigabit Ethernet"

The file lsmod-no is a snapshot of a moment without working ethernet via the adapter. The file lsmod-yes when it works.
Comment 10 Keks Dose 2023-11-29 20:12:25 UTC
Created attachment 871067 [details]
lsmod when connections works
Comment 11 Keks Dose 2023-11-29 20:13:06 UTC
Created attachment 871068 [details]
lsmod when connection doesn't work
Comment 12 Keks Dose 2023-11-29 20:15:58 UTC
Created attachment 871069 [details]
sudo save_y2logs ./231129-yes.tgz
Comment 13 Keks Dose 2023-11-29 20:36:49 UTC
I uninstalled powertop to line out the possibility it could be the cause of the issue. 

So right now the best workaround is sudo hwinfo --netcard .
Comment 14 Lukas Ocilka 2023-11-30 09:06:20 UTC
IMO better workaround is to add a file to /etc/modules-load.d/
That should load the module you need.

See `man modules-load.d`
Comment 15 Stefan Hundhammer 2023-11-30 09:35:56 UTC
Okay; this also solves the mystery why the YaST network module makes this work: It also probes the hardware with 'hwinfo' or with its library counterpart from 'libhd'.

So the problem is definitely not YaST; to the contrary, it works better with YaST. ;-)

So please try what Lukas suggested in comment #14 and explicitly load that kernel module. In most cases, the needed modules are automatically loaded when needed; but that combination of USB device and network adapter might make automatic discovery difficult for the kernel, so it probably needs a little help by explicitly telling it to load that module that you know you need.

Please reopen if that doesn't help, and then we'll reassign this back to component kernel where it really belongs to.
Comment 16 Keks Dose 2023-11-30 20:52:25 UTC
(In reply to Stefan Hundhammer from comment #15)
> Okay; this also solves the mystery why the YaST network module makes this
> work: It also probes the hardware with 'hwinfo' or with its library
> counterpart from 'libhd'.
> 
> So the problem is definitely not YaST; to the contrary, it works better with
> YaST. ;-)
> 
> So please try what Lukas suggested in comment #14 and explicitly load that
> kernel module. In most cases, the needed modules are automatically loaded
> when needed; but that combination of USB device and network adapter might
> make automatic discovery difficult for the kernel, so it probably needs a
> little help by explicitly telling it to load that module that you know you
> need.
> 
> Please reopen if that doesn't help, and then we'll reassign this back to
> component kernel where it really belongs to.

Doesn't work: made a file /etc/modules-load./cdc_ncm.conf with the lines

# some explanation
cdc_ncm

Restarted computer. Plugged in USB-Adapter. No ethernet.

Or do I have to load another kernel module? Which?
Comment 17 Stefan Hundhammer 2023-12-01 14:50:30 UTC
The one that 'hwinfo --netcard' tells you to use; see comment #6.
Comment 18 Keks Dose 2023-12-01 21:00:16 UTC
(In reply to Stefan Hundhammer from comment #17)
> The one that 'hwinfo --netcard' tells you to use; see comment #6.

No, doesn't work:

hwinfo --netcard
14: PCI 14.3: 0282 WLAN controller                              
  [Created at pci.386]
  Unique ID: Dhtl.qVqUKmQ3GD6
  SysFS ID: /devices/pci0000:00/0000:00:14.3
  SysFS BusID: 0000:00:14.3
  Hardware Class: network
  Model: "Intel Wi-Fi 6 AX201"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0xa0f0 "Wi-Fi 6 AX201"
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x0070 
  Revision: 0x20
  Driver: "iwlwifi"
  Driver Modules: "iwlwifi"
  Device File: wlp0s20f3
  Features: WLAN
  Memory Range: 0x603d1dc000-0x603d1dffff (rw,non-prefetchable)
  IRQ: 16 (321 events)
  HW Address: 08:6a:c5:4a:8f:99
  Permanent HW Address: 08:6a:c5:4a:8f:99
  Link detected: yes
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 5.18 5.2 5.22 5.24 5.26 5.28 5.3 5.32 5.5 5.52 5.54 5.56 5.58 5.6 5.62 5.64 5.66 5.68 5.7
  WLAN encryption modes: WEP40 WEP104 TKIP CCMP
  WLAN authentication modes: open sharedkey wpa-psk wpa-eap
  Module Alias: "pci:v00008086d0000A0F0sv00008086sd00000070bc02sc80i00"
  Driver Info #0:
    Driver Status: iwlwifi is active
    Driver Activation Cmd: "modprobe iwlwifi"
  Config Status: cfg=no, avail=yes, need=no, active=unknown

38: USB 00.0: 0200 Ethernet controller
  [Created at usb.122]
  Unique ID: Gtr0._FrTcilDi4C
  Parent ID: zPk0.xYNhIwdOaa6
  SysFS ID: /devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:2.0
  SysFS BusID: 4-1:2.0
  Hardware Class: network
  Model: "ASIX Electronics AX88179 Gigabit Ethernet"
  Hotplug: USB
  Vendor: usb 0x0b95 "ASIX Electronics Corp."
  Device: usb 0x1790 "AX88179 Gigabit Ethernet"
  Revision: "2.00"
  Serial ID: "00869C05"
  Driver: "cdc_ncm"
  Driver Modules: "cdc_ncm"
  Device File: enp0s20f0u1c2
  HW Address: f8:e4:3b:86:9c:05
  Permanent HW Address: f8:e4:3b:86:9c:05
  Link detected: no
  Module Alias: "usb:v0B95p1790d0200dc00dsc00dp00ic02isc0Dip00in00"
  Driver Info #0:
    Driver Status: cdc_ncm is active
    Driver Activation Cmd: "modprobe cdc_ncm"
  Driver Info #1:
    Driver Status: cdc_mbim is active
    Driver Activation Cmd: "modprobe cdc_mbim"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #39 (Hub)

And this does not activate ethernet: 
localhost:/home/AW # modprobe cdc_mbim

(as root)

I'll write a second file to modules-load.d "cdc_mbim.config" and reboot, but I don't expect success.
Comment 19 Keks Dose 2023-12-01 21:11:44 UTC
OK, tried, wrote "cdc_mbim.conf" into /etc/modules-load.d with just one line cdc_mbim, restarted, no.

I'm not sure it is worth time and effort to hunt this bug while there is an easy workaround. On the other hand we'll have more and more of those adapters, because more and more notebooks come without ethernet socket and people will buy usb2ethnert adapters. Should work on linux™.

Close as wontfix?
Comment 20 Takashi Iwai 2023-12-04 13:50:45 UTC
(In reply to Keks Dose from comment #18)
> 38: USB 00.0: 0200 Ethernet controller
>   [Created at usb.122]
>   Unique ID: Gtr0._FrTcilDi4C
>   Parent ID: zPk0.xYNhIwdOaa6
>   SysFS ID: /devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:2.0
>   SysFS BusID: 4-1:2.0
>   Hardware Class: network
>   Model: "ASIX Electronics AX88179 Gigabit Ethernet"
>   Hotplug: USB
>   Vendor: usb 0x0b95 "ASIX Electronics Corp."
>   Device: usb 0x1790 "AX88179 Gigabit Ethernet"
....
>   Module Alias: "usb:v0B95p1790d0200dc00dsc00dp00ic02isc0Dip00in00"
>   Driver Info #0:
>     Driver Status: cdc_ncm is active
>     Driver Activation Cmd: "modprobe cdc_ncm"
>   Driver Info #1:
>     Driver Status: cdc_mbim is active
>     Driver Activation Cmd: "modprobe cdc_mbim"

The device has two interfaces, and only the first one is loaded while you need the second one.  That's the problem.

A workaround is like what you did: just let the latter driver module loaded.

You can set up a softdep instead of always loading, but I guess it doesn't matter much in either way.

As you already found out a workaround, I close the bug now.