How to switch between wifi adapters? (internal and external)

hello there, i’ve connected an external usb wifi adapter to my manjaro laptop.
but it seems that i do not know how to enable the external one and disable the internal one and vice versa.

(n.b.: i’ve connected it to another windows laptop and it was just plug and play there, but not in manjaro)
adapter model: Realtek RTL8188EUS

  Host: system Kernel: 5.7.9-1-MANJARO x86_64 bits: 64 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.7-x86_64 
  root=UUID=97fdd153-9839-4383-a792-0cd6da7fefe7 rw quiet apparmor=1 security=apparmor 
  Desktop: KDE Plasma 5.19.3 Distro: Manjaro Linux 
  Type: Laptop System: Acer product: TravelMate P449-G2-M v: V1.09 serial: <filter> 
  Mobo: Acer model: Pavo_Grus_SK v: V1.09 serial: <filter> UEFI [Legacy]: Insyde 
  v: 1.09 date: 01/29/2018 
  ID-1: BAT0 charge: 42.1 Wh condition: 44.5/48.3 Wh (92%) 
  Topology: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP family: 6 
  model-id: 8E (142) stepping: 9 microcode: D6 L2 cache: 3072 KiB 
  Speed: 799 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 799 2: 800 3: 799 4: 800 
  Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, 
  STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
  Device-1: Intel HD Graphics 620 driver: i915 v: kernel 
  Display: x11 server: X.Org 1.20.8 driver: intel unloaded: modesetting,vesa 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.1.3 
  Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.7.9-1-MANJARO 
  Device-1: Intel Ethernet I219-LM driver: e1000e 
  IF: enp0s31f6 state: down mac: <filter> 
  Device-2: Intel Wireless 7265 driver: iwlwifi 
  IF: wlp1s0 state: up mac: <filter> 
  Local Storage: total: 238.47 GiB used: 196.14 GiB (82.2%) 
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKW256G7 size: 238.47 GiB block size: 
  physical: 512 B logical: 512 B 
  ID-1: / raw size: 50.51 GiB size: 49.47 GiB (97.94%) used: 26.17 GiB (52.9%) fs: ext4 
  dev: /dev/nvme0n1p1 
  ID-2: /home raw size: 22.46 GiB size: 21.98 GiB (97.87%) used: 15.14 GiB (68.9%) 
  fs: ext4 dev: /dev/nvme0n1p2 
  System Temperatures: cpu: 45.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
  Processes: 239 Uptime: 5h 50m Memory: 7.63 GiB used: 3.06 GiB (40.1%) Shell: bash 
  inxi: 3.0.37

$ lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 006: ID 04f2:b577 Chicony Electronics Co., Ltd HD WebCam
Bus 001 Device 005: ID 1c7a:0570 LighTuning Technology Inc. EgisTec Touch Fingerprint Sensor
Bus 001 Device 003: ID 8087:0a2a Intel Corp. 
Bus 001 Device 019: ID 0bda:f179 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
1 Like

Do you want to disable the internal one permanently or do you want to be able to switch anytime?

switch anytime.
thank you.

sudo modprobe -r module1
sudo modprobe module2

To find out the names of the modules run
hwinfo --wlan


after running hwinfo --wlan i got this

08: PCI 100.0: 0282 WLAN controller                             
  [Created at pci.386]
  Unique ID: yWPJ.umvaSGpyXfC
  Parent ID: z8Q3.stCwyT8zZ97
  SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: network
  Model: "Intel Dual Band Wireless-AC 7265"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x095a "Wireless 7265"
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x5010 "Dual Band Wireless-AC 7265"
  Revision: 0x59
  Driver: "iwlwifi"
  Driver Modules: "iwlwifi"
  Device File: wlp1s0
  Features: WLAN
  Memory Range: 0xb1100000-0xb1101fff (rw,non-prefetchable)
  IRQ: 133 (no events)
  HW Address: d4:6d:6d:59:27:70
  Permanent HW Address: d4:6d:6d:59:27:70
  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:v00008086d0000095Asv00008086sd00005010bc02sc80i00"
  Driver Info #0:
    Driver Status: iwlwifi is active
    Driver Activation Cmd: "modprobe iwlwifi"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #3 (PCI bridge)

so it seems that usb adapter is not detected, is it?

in this particular case, an lsusb before and after you insert the dongle would be more beneficial.

If that doesn’t give any difference, inxi --full --system --admin --verbosity=7 --filter --no-host before and after would be best.


1 Like

Maybe the USB adapter needs a driver to work. What’s the mode?
lsusb should show the info as @Fabby wrote.

1 Like

get your device names - you will get something this example

$ ip a | grep ' wl' | cut -d' ' -f2 | cut -d':' -f1

Set one up and the other down - reverse the interfaces for the opposite action

ip link set wlan0 down
ip link set wlan1 up

EDIT: I just remembered some experiments a while ago. When using Network Manager and dhcpcd you may get unexpected behavior.

The device you set down - Network Manager may reactivate the device and assign an IP to it. As this was some testing for a conky to display or not - I have never been troubleshooting the exact behavior although I found it strange.


thank you.
for lsusb the difference was

Bus 001 Device 024: ID 0bda:f179 Realtek Semiconductor Corp.

for the later command the difference was

           Device-2: 1-2.3:30 info: Realtek type: <vendor specific> driver: N/A interfaces: 1
           rev: 2.0 speed: 480 Mb/s chip ID: 0bda:f179 serial: <filter>

so the adapter is connected, but not enabled or something?

yes may be the adapter needs a driver. but i’ve tried building corresponding driver from pacman, but it showed that Failed retrieving some files .

ans how to find the mode from above output?

thank you!

Let’s read there…

1 Like

after doing $ ip a | grep ' wl' | cut -d' ' -f2 | cut -d':' -f1 this i got the output


though the adapter was connected.
thank you

Please follow eugen-b’s answer as you only have a driver for one card installed…


[sorry for the late reply, i was having trouble with the kernel headers]

thank you for your feedbacks.

i installed the drivers from GitHub - ulli-kroll/rtl8188fu: rtl8188fu driver for linux

now after inxi --full --system --admin --verbosity=7 --filter --no-host i get difference in

Device-3: Realtek USB2.0 Hub type: USB driver: rtl8188fu 
  bus ID: 1-2.2:28 chip ID: 0bda:f179 serial: <filter> 
  IF: wlp0s20f0u2u2 state: down mac: <filter> 

also, performing ip a | grep ' wl' | cut -d' ' -f2 | cut -d':' -f1 now it shows second wireless interface



and now it shows two SSIDs for each of the available networks (eg.:ABC(wlp1s0) and ABC(wlp0s20f0u2u2) ).
so i can assume that the driver is installed successfully.

but there is a small problem. though the available networks are show through usb adapter, i can not connect to them.

edit: i’ve loaded the drivers by running

sudo modprobe cfg80211
sudo modprobe rtl8188fu

but still doesn’t work

It’s saying

driver: N/A

does lsmod show the inserted module?
I don’t know if u need to use usb_modeswitch here…