Fixed WiFi not working after VPN disconnect on Ubuntu

After disconnecting from the VPN network on Ubuntu 20.04, the wireless may stop working and the settings may also show “Adapter not found”. If you have the same issue, this tutorial may be helpful.

You can perform the following steps to get your wireless working again without restarting your computer:

1.) Restart the Wi-Fi network from the system menu.

Try turning off the wireless network from the system tray menu and then turning it on again.

Fixed WiFi not working after VPN disconnect on Ubuntu

This will work if you disconnect from the PPTP VPN server.

2.) Restart the Wifi network via nmcli.

The previous steps may not work. In that case, execute the command in the terminal (Ctrl + Alt + T) and restart the network.

nmcli networking off 

nmcli networking on

And this works if you disconnect from the ExpressVPN server.

Fixed WiFi not working after VPN disconnect on Ubuntu

3.) Restart the wireless interface via ifconfig.

You can also restart the wireless network by running the following two commands.

sudo ifconfig wlo1 down

sudo ifconfig wlo1 up

Note: You need to replace wlo1 with the wifi network name (usually wlan0). Confirm via ifconfig command.

4.) If none of the above steps work, try reloading the wireless kernel module.

Open a terminal (Ctrl + Alt + T) from the system application menu and run a command to check for wireless drivers.

sudo lshw -C network 2>&1 | grep wireless | grep driver

As the photo shows, in my case it is rtw_pci.

Fixed WiFi not working after VPN disconnect on Ubuntu

Then run the command to reload the kernel module.

sudo modprobe -r MODULE_NAME && sudo modprobe MODULE_NAME

In my case the command was (rtwpci It should have worked rtw_pci):

sudo modprobe -r rtwpci && sudo modprobe rtwpci

Fixed WiFi not working after VPN disconnect on Ubuntu

It’s a sequel.

It’s a sequel.
It’s a sequel.

It’s a sequel.
It’s a sequel.

Sidebar