Not able to connect to Wireless network in Ubuntu 20.04

I am using Asus TUF FX505DT with the Wireless interface Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter.
It sometimes stops displaying the available Wireless networks and sometimes it displays the available networks but I am not able to connect to any network and it keeps on asking for the Wifi password again and again or keep trying to connect to the network.

$ sudo iwconfig
wlp4s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short  long limit:16   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
$ lspci 
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter (rev ff)
$ sudo lshw -C network
 *-generic
       description: Wireless interface
       product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: wlp4s0
       version: ff
       serial: dc:f5:05:b1:8f:81
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-37-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:69 ioport:d000(size=256) memory:f7700000-f770ffff

Go to Source
Author: Somil Singla

Wifi disconnects automatically after sometime

My WiFi disconnects automatically after sometime and is working again only after a reboot.

Here is the result of lshw -C network

  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eno1
       version: 15
       serial: 80:ce:62:7c:c1:77
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:4000(size=256) memory:b1104000-b1104fff memory:b1100000-b1103fff
  *-network DISABLED
       description: Wireless interface
       product: RTL8723DE 802.11b/g/n PCIe Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlo1
       version: 00
       serial: 40:9f:38:f7:ca:8f
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-33-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:130 ioport:3000(size=256) memory:b1000000-b100ffff

and here is result of iwconfig

wlo1      Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

i am using ubuntu 20.04

EDIT: output of rfkill list all

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

Go to Source
Author: parv desai