禁用 PCI 网络设备并使用 USB Ubuntu 20.04

禁用 PCI 网络设备并使用 USB Ubuntu 20.04

我正在尝试在 Ubuntu 上通过板载 WiFi 使用 TP-Link AC600 USB 加密狗。

我已经安装了驱动程序并且设备正在被识别。

在 UI 中,如果我尝试通过 PCI 断开 USB Wifi,它们都会断开。如果我用来rfkill阻止其中一个设备,我会失去连接。

以下是一些系统信息:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

iwconfig

wlp10s0   IEEE 802.11  ESSID:"TechnoCore"  
          Mode:Managed  Frequency:5.24 GHz  Access Point: 00:AB:48:6D:BA:66   
          Bit Rate=43.3 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=51/70  Signal level=-59 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:32   Missed beacon:0

lo        no wireless extensions.

wlx9848276c5c24  IEEE 802.11AC  ESSID:"TechnoCore"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:5.24 GHz  Access Point: 00:AB:48:6D:BA:66   
          Bit Rate:434 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=56/100  Signal level=-29 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sudo lshw -C network

  *-network                 
       description: Ethernet interface
       product: Killer E220x Gigabit Ethernet Controller
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: enp9s0
       version: 10
       serial: 40:8d:5c:5a:fa:0c
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=alx latency=0 link=no multicast=yes port=twisted pair
       resources: irq:16 memory:df200000-df23ffff ioport:d000(size=128)
  *-network
       description: Wireless interface
       product: Wireless 8260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:0a:00.0
       logical name: wlp10s0
       version: 3a
       serial: a4:34:d9:08:0c:50
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.4.0-48-generic firmware=36.77d01142.0 ip=192.168.4.25 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:136 memory:df100000-df101fff
  *-network:0
       description: Ethernet interface
       physical id: 2
       logical name: docker0
       serial: 02:42:ec:85:f2:52
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes
  *-network:1
       description: Wireless interface
       physical id: 3
       bus info: usb@1:1
       logical name: wlx9848276c5c24
       serial: 98:48:27:6c:5c:24
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl88XXau multicast=yes wireless=unassociated
  *-network:2
       description: Ethernet interface
       physical id: 4
       logical name: br-dc3fe4c5db4a
       serial: 02:42:f3:29:84:36
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.18.0.1 link=no multicast=yes

rfkill list

0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: phy1: Wireless LAN
        Soft blocked: no
        Hard blocked: no

显示两个设备的用户界面

答案1

我建议您将内部设备的驱动程序列入黑名单。从终端:

sudo -i
modprobe -r iwlwifi
echo "blacklist iwlwifi"  >>  /etc/modprobe.d/blacklist.conf
exit

一切已准备就绪。

相关内容