1

I am absolutely aware how many times this question has been asked, but I tried every possible solution I could find and could not solve this problem.

Wifi is working without any problems until I suspend it by closing the lid or by systemctl suspend. After that I just get "no wifi adpter found".

On debian.org I found that this can be a problem with specific network card I have and I tried their solution:

According to debian.org the problem is brcmfmac firmware which has to be removed before suspend and loaded after suspend.

I made a file network_suspend, made sure it is owned by root, executable, and run absolute paths to lsmod, grep and rmmod and put it into /lib/systemd/system-sleep:

#!/bin/sh
case $1 in
    pre)
      if /sbin/lsmod | /bin/grep -q brcmfmac; then
          /sbin/rmmod brcmfmac
      fi
    ;;
    post)
        /sbin/modprobe brcmfmac
    ;;
esac
exit 0

Just for debigging purposes I added echo "pre" > /home/user/pre.txt to check if script is executing before and after I close/open lid and it does work correctly -> brcmfmac is unloaded before suspend and loaded back after suspend.

I am still getting "No Network adapter found" after suspend. Do you have any idea why is this happening and how to solve this?

Just for the record, I was puzzled by this and installed Pop_OS and tried the same thing. On Pop_OS it is working correctly without any problems, so I assume this is problem specific to Debian OS.

2 Answers 2

1

This is not an answer. I do not have enough `reputation' to comment, so I will just post here instead.

I have the exact problem with two different distributions, Arch Linux (Cinnamon) on Macbook 2015, and Fedora 35 (Cinnamon) on Macbook 2015. Both systems can not connect to WiFi again after suspension.

1
  • I just answered my question. The solution that I posted works for me
    – cheshire
    Commented Feb 13, 2022 at 18:02
1

Short Answer: Firmware/Kernel modules are not the problem here. Check if you have NetworkManager service running.

I was using netinst Debian ISO and selected only base system utilities (no DE). I assumed NetworkManager service is already contained in this, but no.

After booting into my newly installed OS I didn't have wifi connection, so I added this to /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid ssid
    wpa-psk password

After reboot wpa_supplicant reads from this file and connects to wifi. Then I installed network-manager:

sudo apt install network-manager

and started it with:

sudo systemctl enable NetworkManager

After next reboot the problem is that the network is still managed by wpa_supplicant so I went to /etc/network/interfaces and commented out the part where it connects to my wifi:

# auto wlan0
# iface wlan0 inet dhcp
#    wpa-ssid ssid
#    wpa-psk password

After that reboot and start nmtui, choose your ssid and connect again.

Wifi resumes now after suspend on my laptop.

2
  • This is not the solution for the issue, Ubuntu & Kali already have network-manager.
    – Jared Chu
    Commented Feb 16, 2022 at 16:39
  • 1
    @JaredChu Yes, it was solution for the issue I described. Ubuntu & Kali do not have anything to do with my question. I was referencing netinst Debian OS without DE, which doesn't come with network-manager.
    – cheshire
    Commented Feb 16, 2022 at 22:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .