as the title suggests, by WIFI keeps getting hard blocked randomly. This happens in middle of some video stream or even if it is idle.
I have tried disabling automatic suspend in Settings > Power as suggested in Ubuntu 20.04 wifi randomly disconnecting but to no help.
I have a RaLink RT3090 1T/1R internal WIFI adapter and a RealTek RTL8188EUS USB adapter. Both are disabled when this happens.
Below are the list of commands which @heynnema suggested in one of the comments.
I am happy to provide any other outputs as needed, please help me solve this issue.
Except for rfkill list all
all other commands were executed when WIFI was not hard blocked.
rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
sudo lshw -C network
*-network
description: Wireless interface
product: RT3090 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlp2s0
version: 00
serial: 1c:4b:d6:64:07:62
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2800pci driverversion=5.4.0-65-generic firmware=0.40 latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:17 memory:f0500000-f050ffff
*-network
description: Ethernet interface
product: AR8131 Gigabit Ethernet
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: c0
serial: 70:71:bc:4f:d6:e7
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.1-NAPI latency=0 link=no multicast=yes port=twisted pair
resources: irq:31 memory:f0400000-f043ffff ioport:d000(size=128)
*-network
description: Wireless interface
physical id: 2
bus info: usb@2:1.2
logical name: wlxd03745258658
serial: d0:37:45:25:86:58
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=r8188eu ip=192.168.0.118 multicast=yes wireless=IEEE 802.11bgn
iwlist scan
enp3s0 Interface doesn't support scanning.
lo Interface doesn't support scanning.
wlp2s0 No scan results
wlxd03745258658 Scan completed :
Cell 01 - Address: 8C:53:C3:5C:38:DF
ESSID:"Varun"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.427 GHz (Channel 4)
Encryption key:on
Bit Rates:144 Mb/s
Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD7E0050F204104A0001101044000102103B000103104700102880288028801880A8808C53C35C38DF102100067869616F6D69102300045234434D10240004303030321042000831323334353637381054000800060050F20400011011000C5869616F4D69526F7574657210080002210C103C0001011049000600372A000120
Quality=0/100 Signal level=23/100
Cell 02 - Address: 3C:84:6A:D5:94:4C
ESSID:"Hansy"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.457 GHz (Channel 10)
Encryption key:on
Bit Rates:300 Mb/s
Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD7F0050F204104A0001101044000102103B0001031047001038833092309218839C773C846AD594C41021000754502D4C696E6B10230009544C2D57523835304E10240003332E3010420003312E301054000800060050F20400011011000D544C2D57523835304E20332E3010080002210C103C0001011049000600372A000120
Quality=0/100 Signal level=47/100
Cell 03 - Address: 50:D4:F7:30:6A:56
ESSID:"Optimus2"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:144 Mb/s
Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Quality=100/100 Signal level=93/100
Cell 04 - Address: 1C:7E:E5:53:F2:99
ESSID:"Optimus1"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:108 Mb/s
Extra:rsn_ie=30180100000fac020200000fac04000fac020100000fac020c00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Quality=0/100 Signal level=39/100
Cell 05 - Address: 70:3A:CB:CA:15:8B
ESSID:"sagar"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Quality=0/100 Signal level=23/100
Cell 06 - Address: A0:04:60:10:93:F5
ESSID:"sagar_EXT"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD8D0050F204104A0001101044000102103B000103104700102880288028801880A880A004601093F5102100044E54475210230008574E3330303052501024000256331042000C6130303436303130393366351054000800060050F204000110110017574E333030305250763328576972656C6573732041502910080002210C103C0001011049000600372A000120
Quality=0/100 Signal level=23/100
iwlist freq
enp3s0 no frequency information.
lo no frequency information.
wlp2s0 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 14 : 2.484 GHz
wlxd03745258658 11 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency:2.462 GHz (Channel 11)
free -h
total used free shared buff/cache available
Mem: 1.8Gi 913Mi 145Mi 470Mi 790Mi 304Mi
Swap: 1.9Gi 235Mi 1.6Gi
sysctl vm.swappiness
vm.swappiness = 60
sudo dmidecode -s bios-version
204.T01
UPDATE
sudo journalctl -b 0 /usr/sbin/NetworkManager
output: Pastebin