USB 转以太网设备不工作

USB 转以太网设备不工作

我有USB 3.0 转千兆以太网适配器。我正在尝试在 Ubuntu 18.04 上工作

$ lsusb 
Bus 002 Device 002: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0eef:c0aa D-WAV Scientific Co., Ltd 
Bus 001 Device 003: ID 8087:0a2a Intel Corp. 
Bus 001 Device 002: ID 0bda:58c6 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hu

$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1904  bytes 206432 (206.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1904  bytes 206432 (206.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.126  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::5b52:8606:7116:4b51  prefixlen 64  scopeid 0x20<link>
        ether 70:1c:e7:75:7e:cf  txqueuelen 1000  (Ethernet)
        RX packets 12058  bytes 10801854 (10.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8521  bytes 1601052 (1.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

$ lsmod
Module                  Size  Used by
rfcomm                 77824  4
ccm                    20480  6
pci_stub               16384  1
vboxpci                24576  0
vboxnetadp             28672  0
vboxnetflt             28672  0
vboxdrv               471040  3 vboxnetadp,vboxnetflt,vboxpci
bnep                   20480  2
binfmt_misc            20480  1
nls_iso8859_1          16384  1
snd_hda_codec_hdmi     49152  1
snd_soc_skl            90112  0
snd_soc_skl_ipc        65536  1 snd_soc_skl
snd_hda_ext_core       24576  1 snd_soc_skl
snd_soc_sst_dsp        32768  1 snd_soc_skl_ipc
snd_soc_sst_ipc        16384  1 snd_soc_skl_ipc
snd_soc_acpi           16384  1 snd_soc_skl
snd_hda_codec_realtek   106496  1
snd_hda_codec_generic    73728  1 snd_hda_codec_realtek
snd_soc_core          241664  1 snd_soc_skl
snd_compress           20480  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_intel          40960  6
snd_hda_codec         126976  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
arc4                   16384  2
dell_laptop            20480  1
dell_smbios_smm        16384  0
dcdbas                 16384  1 dell_smbios_smm
snd_hda_core           81920  7 snd_hda_intel,snd_hda_codec,snd_hda_ext_core,snd_soc_skl,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
dell_smm_hwmon         16384  0
snd_hwdep              20480  1 snd_hda_codec
intel_rapl             20480  0
btusb                  45056  0
x86_pkg_temp_thermal    16384  0
btrtl                  16384  1 btusb
intel_powerclamp       16384  0
btbcm                  16384  1 btusb
coretemp               16384  0
uvcvideo               86016  0
snd_pcm                98304  8 snd_hda_intel,snd_hda_codec,snd_pcm_dmaengine,snd_hda_ext_core,snd_hda_core,snd_soc_skl,snd_hda_codec_hdmi,snd_soc_core
btintel                16384  1 btusb
bluetooth             548864  33 btrtl,btintel,bnep,btbcm,rfcomm,btusb
videobuf2_vmalloc      16384  1 uvcvideo
kvm_intel             212992  0
videobuf2_memops       16384  1 videobuf2_vmalloc
ax88179_178a           24576  0
iwlmvm                364544  0
videobuf2_v4l2         24576  1 uvcvideo
snd_seq_midi           16384  0
videobuf2_core         40960  2 uvcvideo,videobuf2_v4l2
usbnet                 45056  1 ax88179_178a
snd_seq_midi_event     16384  1 snd_seq_midi
mii                    16384  2 usbnet,ax88179_178a
hid_multitouch         20480  0
kvm                   598016  1 kvm_intel
ecdh_generic           24576  1 bluetooth
videodev              184320  3 uvcvideo,videobuf2_core,videobuf2_v4l2
mac80211              778240  1 iwlmvm
media                  40960  2 uvcvideo,videodev
snd_rawmidi            32768  1 snd_seq_midi
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
irqbypass              16384  1 kvm
intel_cstate           20480  0
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_seq,snd_pcm
iwlwifi               282624  1 iwlmvm
intel_rapl_perf        16384  0
dell_smbios_wmi        16384  0
dell_wmi               16384  0
snd                    81920  25 snd_compress,snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_soc_core,snd_pcm
input_leds             16384  0
joydev                 24576  0
dell_smbios            16384  4 dell_wmi,dell_laptop,dell_smbios_wmi,dell_smbios_smm
cfg80211              622592  3 iwlmvm,iwlwifi,mac80211
wmi_bmof               16384  0
dell_wmi_descriptor    16384  2 dell_wmi,dell_smbios_wmi
hid_sensor_incl_3d     16384  0
serio_raw              16384  0
soundcore              16384  1 snd
hid_sensor_gyro_3d     16384  0
hid_sensor_rotation    16384  0
hid_sensor_magn_3d     16384  1
hid_sensor_accel_3d    16384  1
hid_sensor_trigger     16384  11 hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_rotation
industrialio_triggered_buffer    16384  5 hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_rotation
kfifo_buf              16384  1 industrialio_triggered_buffer
hid_sensor_iio_common    16384  6 hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_trigger,hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_rotation
industrialio           69632  10 hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_trigger,hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_rotation,industrialio_triggered_buffer,kfifo_buf
idma64                 20480  0
virt_dma               16384  1 idma64
intel_vbtn             16384  0
soc_button_array       16384  0
int3403_thermal        16384  0
processor_thermal_device    16384  0
intel_lpss_pci         20480  0
mei_me                 40960  0
int3402_thermal        16384  0
mei                    90112  1 mei_me
int340x_thermal_zone    16384  3 int3402_thermal,int3403_thermal,processor_thermal_device
shpchp                 36864  0
intel_pch_thermal      16384  0
intel_soc_dts_iosf     16384  1 processor_thermal_device
intel_lpss             16384  1 intel_lpss_pci
intel_hid              16384  0
sparse_keymap          16384  3 dell_wmi,intel_hid,intel_vbtn
int3400_thermal        16384  0
acpi_thermal_rel       16384  1 int3400_thermal
acpi_pad              180224  0
mac_hid                16384  0
sch_fq_codel           20480  5
parport_pc             36864  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
ip_tables              28672  0
x_tables               40960  1 ip_tables
autofs4                40960  2
algif_skcipher         16384  0
af_alg                 24576  1 algif_skcipher
dm_crypt               40960  2
hid_sensor_custom      20480  0
hid_sensor_hub         20480  8 hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_iio_common,hid_sensor_trigger,hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_rotation,hid_sensor_custom
intel_ishtp_hid        20480  0
usbhid                 49152  0
crct10dif_pclmul       16384  0
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
pcbc                   16384  0
i915                 1617920  29
i2c_algo_bit           16384  1 i915
drm_kms_helper        172032  1 i915
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
aesni_intel           188416  8
intel_ish_ipc          20480  0
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
glue_helper            16384  1 aesni_intel
ahci                   36864  3
cryptd                 24576  5 crypto_simd,ghash_clmulni_intel,aesni_intel
psmouse               147456  0
intel_ishtp            40960  2 intel_ishtp_hid,intel_ish_ipc
drm                   401408  16 i915,drm_kms_helper
libahci                32768  1 ahci
i2c_hid                20480  0
wmi                    24576  4 dell_wmi,wmi_bmof,dell_wmi_descriptor,dell_smbios_wmi
hid                   118784  5 hid_sensor_hub,i2c_hid,usbhid,hid_multitouch,intel_ishtp_hid
video                  45056  3 dell_wmi,dell_laptop,i915
pinctrl_sunrisepoint    28672  0

有什么建议吗?顺便说一下,我的 wifi 工作正常。

答案1

很抱歉,但您的设备的驱动程序似乎已经纳入 Linux 内核

在我的带有 4.15 内核的 Ubuntu 18.04.1 LTS 上,我有以下输出modinfo ax88179_178a

$ modinfo ax88179_178a
filename:       /lib/modules/4.15.0-33-generic/kernel/drivers/net/usb/ax88179_178a.ko
license:        GPL
description:    ASIX AX88179/178A based USB 3.0/2.0 Gigabit Ethernet Devices
srcversion:     5198353D2D0B5A7C431BB10
alias:          usb:v050Dp0128d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v17EFp304Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v04E8pA100d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0DF6p0072d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p4A00d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v04B4p3610d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B95p178Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B95p1790d*dc*dsc*dp*ic*isc*ip*in* <--- yours VID and PID!
depends:        usbnet,mii
retpoline:      Y
intree:         Y
name:           ax88179_178a
vermagic:       4.15.0-33-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4

驱动程序可能安装有

sudo apt-get install linux-modules-extra-$(uname -r)

如果您愿意,您可以使用 Trendnet 提供的驱动程序:

cd ~/Downloads
wget http://downloads.trendnet.com/tu3-etg/utilities/linux_tu3-etg.zip
unzip linux_tu3-etg.zip
make
sudo make install
sudo modprobe usbnet
sudo insmod ax88179_178a.ko

如果此方法无效,请使用以下命令删除 Trendnet 驱动程序:

sudo rm /lib/modules/$(uname -r)/kernel/drivers/net/usb/ax88179_178a.ko
sudo /sbin/depmod -a

并使用以下方法从存储库重新安装内核模块包

sudo apt-get install linux-modules-extra-$(uname -r) --reinstall

注意:刚刚测试了 D-Link DUB-1312 (2001:4a00),即使在使用预安装的内核模块的 Linux 4.4 的 Ubuntu 16.04 LTS 上,它也可以正常运行ax88179_178a

$ cat /var/log/syslog | grep kernel
Sep 21 22:07:46 hostname kernel: [  767.258696] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
Sep 21 22:07:46 hostname kernel: [  767.281700] usb 4-1: New USB device found, idVendor=2001, idProduct=4a00
Sep 21 22:07:46 hostname kernel: [  767.281707] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 21 22:07:46 hostname kernel: [  767.281712] usb 4-1: Product: D-Link DUB-1312
Sep 21 22:07:46 hostname kernel: [  767.281716] usb 4-1: Manufacturer: D-Link Elec. Corp.
Sep 21 22:07:46 hostname kernel: [  767.281719] usb 4-1: SerialNumber: 000000000015B6
Sep 21 22:07:47 hostname kernel: [  767.608195] ax88179_178a 4-1:1.0 eth0: register 'ax88179_178a' at usb-0000:00:14.0-1, D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter, 18:0f:76:xx:xx:xx

$ lsusb -d 2001:4a00
Bus 004 Device 003: ID 2001:4a00 D-Link Corp.

$ lsmod | grep ax88179_178a
ax88179_178a           24576  0
usbnet                 45056  1 ax88179_178a
mii                    16384  2 usbnet,ax88179_178a

答案2

我和楼主的笔记本电脑一模一样,都是 Ubuntu 18.04,问题也一样。对我来说,解决方法是拔下/重新插入 USB 以太网适配器,而无需将以太网电缆插入适配器。之后,lsusb我的设备显示为:

Bus 002 Device 025: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 002 Device 024: ID 05e3:0616 Genesys Logic, Inc. hub

此后,可以重新插入以太网电缆。我已经在路由器端准备好了 dhcp,因此此时以太网已启动并正确连接(使用“ip address show”检查)。

注意:我的以太网 USB 加密狗硬件可能与 OP 不同,但该解决方法值得一试。

如果在插入设备的 USB 端之前先插入以太网电缆,USB 以太网设备将无法正常启动,这是一个错误吗?在我看来,这似乎是不正确的行为。

相关内容