I am facing a weird problem in Ubuntu 20.04 with kernel version 5.4.0-40. I have got a Wi-Fi adapter from Realtek for connecting my PC to the internet. From this answer, I have followed the instructions and downloaded and installed the driver from Github. It worked well for a few months, but since a few days I am facing the issue.
Ubuntu is detecting the presence of a Wi-Fi adapter, but whenever I am going to WiFi settings to connect to a network, the settings page says No WiFi adapter found:
I can understand that Ubuntu is detecting the adapter because WiFi option is appearing in the system tray when I connect the adapter:
I have also tried connecting to WiFi network from the command line with
iwconfig. Here is the output of the command:
When I try to connect to a WiFi network with the
iwconfig wlx00e0202c7613 essid <SSID> key <PASSWORD> command, I am getting this error:
What is the problem and how to fix this issue? I do not know much about networking in Linux, so please ask if more information is required.
Edit: I have removed some packages a few days ago thinking them to be unnecessary. I suspect that has caused the issue. Can anyone please give a list of the necessary packages for Ubuntu, or the packages which comes preinstalled with Ubuntu 20.04?
lspci -kv | grep 'Ethernet\|Network' -A 6:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet Flags: bus master, fast devsel, latency 0, IRQ 16 I/O ports at e000 [size=256] Memory at f7c00000 (64-bit, non-prefetchable) [size=4K] Memory at f0000000 (64-bit, prefetchable) [size=16K] Capabilities:  Power Management version 3 Capabilities:  MSI: Enable- Count=1/1 Maskable- 64bit+