wifi stops working

My wifi keeps losing the connection. Restarting laptop and everything is fine.

My Levono IdeaCentre 300 stick did that - the wifi chip in it went bad - I bought a $5.00 usb wifi chip on ebay and it never drops any more.

If you use network manager you can try restarting it “sudo systemctl restart network”

  1. Chipset and driver details? For an internal device do
/sbin/lspci -nnk | grep -iA3 net

For internal, or external USB-connected you could do

/usr/sbin/hwinfo --wlan
  1. Assuming that you’re using NetworkManager, you could watch the logging in a terminal using
sudo journalctl -fu NetworkManager

Observe/capture the output when the wifi becomes disconnected.

4:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0888] (rev c4)
        Subsystem: Intel Corporation Centrino Wireless-N 2230 BGN [8086:4262]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi
05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 07)
        Subsystem: Lenovo Device [17aa:5018]
        Kernel driver in use: r8169
        Kernel modules: r8169

Had this error resuming from sleep, it would not connect

Nov 27 15:35:15 localhost.localdomain NetworkManager[1433]: <info>  [1606509315.7594] device (wlan0): supplicant interface state: starting -> down
sNov 27 15:35:25 localhost.localdomain NetworkManager[1433]: <warn>  [1606509325.6347] device (wlan0): re-acquiring supplicant interface (#5).
sNov 27 15:35:30 localhost.localdomain NetworkManager[1433]: <error> [1606509330.7691] sup-iface[0x558ed0a33a20,wlan0]: error adding interface: wpa_supplicant couldn't grab this interface.
Nov 27 15:35:30 localhost.localdomain NetworkManager[1433]: <info>  [1606509330.7692] device (wlan0): supplicant interface state: starting -> down
Nov 27 15:35:30 localhost.localdomain NetworkManager[1433]: <info>  [1606509330.7692] device (wlan0): supplicant interface keeps failing, giving up

Maybe your Intel wifi device is slow to start up from sleep…does restarting NetworkManager help in this situation?

sudo system restart NetworkManager

You might be impacted by the Intel wifi bug discussed here…
https://bugzilla.kernel.org/show_bug.cgi?id=203709
A pragmatic option might just be to employ a suitable external wifi device.

It might also be worth checking power management with respect to the iwlwifi driver. Some have found disabling it helps, others report no benefit unfortunately.

Create /etc/modprobe.d/wifi.conf (as root) eg with nano

sudo nano /etc/modprobe.d/wifi.conf

and add this entry

options iwlwifi power_save=0

Save when done, and it will take effect the next time this module is loaded (or next boot). If it doesn’t work for you, just delete that config file again.

FWIW, an old Mint thread describing similar issues (same driver but different Intel chipset).

NetworkManager is only one option. On my notebook it even breaks suspend/resume when closing the lid. Try https://en.opensuse.org/Network_Management_With_Systemd It works fine here: https://forums.opensuse.org/showthread.php/533733-Network-Problems-after-TW-install-on-HP-Laptop-15-da0xxx