ubuntu22 usb 网卡拔插才能识别问题 解决
方案一 手工切换:
sudo usb_modeswitch -KW -v 0e8d -p 2870
方案二 修改 /etc/usb_modeswitch.conf
% sudo vi /etc/usb_modeswitch.conf
# What it all means (command line flags appended):
#
# * DefaultVendor -v <hex number>
# * DefaultProduct -p <hex number>
#
# This is the ID the USB device shows after having been plugged in.
# The tool looks for this; if not found -> no action.
#
# * TargetVendor -V <hex number>
# * TargetProduct -P <hex number>
#
DefaultVendor=0x0e8d
DefaultProduct=0x2870
TargetVendor=0x0e8d
TargetProduct=0x7612
方法三:编辑 /lib/udev/rules.d/40-usb_modeswitch.rules
% sudo vi /lib/udev/rules.d/40-usb_modeswitch.rules
ATTR{idVendor}=="0e8d", ATTR{idProduct}=="2870", RUN+="usb_modeswitch -KW -v 0e8d -p 2870"