[Lubuntu] Fix for disconnecting Wi-Fi on Lubuntu 18.04
by Riley MacDonald, May 14, 2020
After moving I was unable to continue using a hardwired network connection on my Lubuntu 18.04 PC so I installed an old Wi-Fi card. A connection to my network was quickly established but after a few minutes the connection was lost and could not be re-established.
Card Details:
# Find the installed PCI network card $ lspci | grep 802.11 02:01.0 Network controller: Ralink corp. RT2561/RT61 802.11g PCI # Print verbose details of the device $ lspci -vv -s 02:01.0 02:01.0 Network controller: Ralink corp. RT2561/RT61 802.11g PCI Subsystem: Linksys WMP54G v4.1 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 64, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 16 Region 0: Memory at fdef8000 (32-bit, non-prefetchable) [size=32K] Capabilities: <access denied> Kernel driver in use: rt61pci Kernel modules: rt61pci |
Solution:
Investigation determined that Linux Kernel Power Management was likely suspending the Wi-Fi card causing a disconnect. Permanently deactivating power management for the Wi-Fi hardware device resolved the issue for me.
Observe Power Management is enabled:
$ iwconfig lo no wireless extensions. wlp2s1 IEEE 802.11 ESSID:"[MY_SSID]" Mode:Managed Frequency:2.447 GHz Access Point: 00:00:00:00:00:00 Bit Rate=54 Mb/s Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=70/70 Signal level=-40 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:43 Missed beacon:0 enp0s25 no wireless extensions. |
Edit the Network Manager configuration for Wi-Fi Power Save:
sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf |
Modify the default value of 3 to 2:
[connection] wifi.powersave = 2 |
Restart the system. Power Management will now be disabled by default:
$ iwconfig lo no wireless extensions. wlp2s1 IEEE 802.11 ESSID:"[MY_SSID]" Mode:Managed Frequency:2.447 GHz Access Point: 00:00:00:00:00:00 Bit Rate=54 Mb/s Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=70/70 Signal level=-40 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:43 Missed beacon:0 enp0s25 no wireless extensions. |