Wireless disabled after Debian 13 goes to sleep

Dunbar

New Member
Joined
Jan 30, 2026
Messages
8
Reaction score
3
Credits
62
Wireless access disabled sometimes when awake machine from sleep. Always the case if i actually click to put Debian 13 into sleep mode.
I installed Debian 13 to my MacBookPRO 2015 three days ago - all seems to be doing well except for the wireless access.

I have used:-
Code:
sudo nmcli radio wifi off
and
Code:
sudo nmcli radio wifi on
which has often worked but not always.

Note that i have little experience in -- linux, command line, forums, hardware and computer problem solving but am keen to learn.
 


This is a classic Linux laptop issue, especially on MacBooks. The wireless getting disabled on wake is usually one of a few things:

Most likely culprit - rfkill getting triggered:

Check the rfkill status:
Code:
rfkill list

If you see the wireless is "soft blocked" or "hard blocked", that's your problem. The soft block is what nmcli is toggling, but sometimes the hardware switch (or what the kernel thinks is a hardware switch) gets in a weird state.

Unblock it:
Code:
sudo rfkill unblock wifisudo rfkill unblock all

Then bring it back up:
Code:
sudo nmcli radio wifi on

MacBook-specific issue - Broadcom driver problems:

MacBook Pro 2015 likely has a Broadcom wireless chip, which can be finicky on Linux. Check what driver you're using:
Code:
lspci -k | grep -A 3 Network


If you see "bcma" or "b43" drivers, those are the open-source ones that sometimes have power management issues. The "wl" (broadcom-sta) proprietary driver often works better but has its own quirks.

Power management being too aggressive:

NetworkManager might be putting the wireless into power save mode and it's not waking up properly. Check current power save status:
Code:
iw dev wlan0 get power_save

(Replace wlan0 with your actual wireless interface name - check with ip link)

Disable power save temporarily to test:
Code:
sudo iw dev wlan0 set power_save off

If that fixes it, make it permanent by creating a file:
Code:
sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-off.conf

Add:
Code:
[connection]wifi.powersave = 2

Then restart NetworkManager:
Code:
sudo systemctl restart NetworkManager

Systemd sleep hooks interfering:

Sometimes systemd-sleep is killing the wireless on suspend. Check the logs right after waking:
Code:
journalctl -b | grep -i wirelessjournalctl -b | grep -i networkjournalctl -u NetworkManager | tail -50

Look for errors or warnings about the wireless interface around suspend/resume time.

Nuclear option - restart NetworkManager on wake:

Create a systemd service that runs on resume:
Code:
sudo vim /etc/systemd/system/restart-nm-on-wake.service

Add:
Code:
[Unit]Description=Restart NetworkManager on wakeAfter=suspend.target

[Service]Type=oneshot
ExecStart=/bin/systemctl restart NetworkManager

[Install]WantedBy=suspend.target

Enable it:
Code:
sudo systemctl enable restart-nm-on-wake.service

Quick diagnostic to run next time it happens:

Code:
rfkill listnmcli radio wifi
nmcli device status
iw dev wlan0 get power_save
journalctl -u NetworkManager --since "5 minutes ago"

That'll tell you what's actually going wrong.

My guess is it's either rfkill getting set on wake, or power management being too aggressive with the Broadcom chip. The MacBook 2015 Broadcom wireless is notorious for this on Linux.

What does rfkill list show when the wireless stops working?

You might not like this, but in some cases you have no choice, I have ethernet adapters on all my laptops,
wi-fi works "most" of the time on "most" of them. But ethernet always works.
 
This is a classic Linux laptop issue, especially on MacBooks. The wireless getting disabled on wake is usually one of a few things:

Most likely culprit - rfkill getting triggered:

Check the rfkill status:
Code:
rfkill list

If you see the wireless is "soft blocked" or "hard blocked", that's your problem. The soft block is what nmcli is toggling, but sometimes the hardware switch (or what the kernel thinks is a hardware switch) gets in a weird state.

Unblock it:
Code:
sudo rfkill unblock wifisudo rfkill unblock all

Then bring it back up:
Code:
sudo nmcli radio wifi on

MacBook-specific issue - Broadcom driver problems:

MacBook Pro 2015 likely has a Broadcom wireless chip, which can be finicky on Linux. Check what driver you're using:
Code:
lspci -k | grep -A 3 Network


If you see "bcma" or "b43" drivers, those are the open-source ones that sometimes have power management issues. The "wl" (broadcom-sta) proprietary driver often works better but has its own quirks.

Power management being too aggressive:

NetworkManager might be putting the wireless into power save mode and it's not waking up properly. Check current power save status:
Code:
iw dev wlan0 get power_save

(Replace wlan0 with your actual wireless interface name - check with ip link)

Disable power save temporarily to test:
Code:
sudo iw dev wlan0 set power_save off

If that fixes it, make it permanent by creating a file:
Code:
sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-off.conf

Add:
Code:
[connection]wifi.powersave = 2

Then restart NetworkManager:
Code:
sudo systemctl restart NetworkManager

Systemd sleep hooks interfering:

Sometimes systemd-sleep is killing the wireless on suspend. Check the logs right after waking:
Code:
journalctl -b | grep -i wirelessjournalctl -b | grep -i networkjournalctl -u NetworkManager | tail -50

Look for errors or warnings about the wireless interface around suspend/resume time.

Nuclear option - restart NetworkManager on wake:

Create a systemd service that runs on resume:
Code:
sudo vim /etc/systemd/system/restart-nm-on-wake.service

Add:
Code:
[Unit]Description=Restart NetworkManager on wakeAfter=suspend.target

[Service]Type=oneshot
ExecStart=/bin/systemctl restart NetworkManager

[Install]WantedBy=suspend.target

Enable it:
Code:
sudo systemctl enable restart-nm-on-wake.service

Quick diagnostic to run next time it happens:

Code:
rfkill listnmcli radio wifi
nmcli device status
iw dev wlan0 get power_save
journalctl -u NetworkManager --since "5 minutes ago"

That'll tell you what's actually going wrong.

My guess is it's either rfkill getting set on wake, or power management being too aggressive with the Broadcom chip. The MacBook 2015 Broadcom wireless is notorious for this on Linux.

What does rfkill list show when the wireless stops working?

You might not like this, but in some cases you have no choice, I have ethernet adapters on all my laptops,
wi-fi works "most" of the time on "most" of them. But ethernet always works.

Thank you for your amazingly useful reply. I have gone through some of the commands/checks that you suggest.

Quick diagnostic to run next time it happens:

Code:
$ /sbin/rfkill list nmcli radio wifi
rfkill: invalid identifier: nmcli
rfkill: invalid identifier: radio
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

Code:
$ nmcli device status
DEVICE          TYPE      STATE                   CONNECTION
lo              loopback  connected (externally)  lo
wlp3s0          wifi      disconnected            --
p2p-dev-wlp3s0  wifi-p2p  disconnected            --


Code:
$ /sbin/iw dev wlp3s0 get power_save
Power save: off

Code:
$ journalctl -u NetworkManager
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.

So I need to look into this hint from command journalctl Help with that would be much appreciated.

Power management being too aggressive:
Code:
$ /sbin/iw dev wlp3s0 get power_save
Power save: off

Next
It looks like i will need to get the journalctl command to run. And yes edit my $PATH

Your comments on the above of course will be very useful.
 
FIXED
I got the journalctl command to work by adding my user account to group 'adm'. The results from it did show errors after the wake instructions however not any more.

The system suddenly started working fine. It used to be that if i clicked to put the system to sleep then it would always be wireless connection disabled. Not now so I checked the logs and it was after the last re-boot that all was fine even though I had done many reboots beforehand.
 
I am sorry - do not understand. I am not using any USB ports.
some Mac especially older models the power to the USB Ports also controls the power to the WiFi card, the Bluetooth function of the card, Bluetooth uses the same frequencies that the 2.4 GHz WiFi band uses. WiFi sends a strong signal and is set to use just one channel. Bluetooth sends a weak signal (shorter range) and dances around on the WiFi frequencies, looking for one that is not being used at the moment. If it cannot find one then it will stay shut down
 
some Mac especially older models the power to the USB Ports also controls the power to the WiFi card, the Bluetooth function of the card, Bluetooth uses the same frequencies that the 2.4 GHz WiFi band uses. WiFi sends a strong signal and is set to use just one channel. Bluetooth sends a weak signal (shorter range) and dances around on the WiFi frequencies, looking for one that is not being used at the moment. If it cannot find one then it will stay shut down
Thank you for that - this is a great place for learning.
I may have to look into that as my problem with the wifi has returned. Next I will try relaunch of NetworkManager upon system wake up.
Thanks again.
 


Follow Linux.org

Members online


Top