Comment 3 for bug 1827879

Revision history for this message
Sander Los (sander-6) wrote :

Some additional information: It looks like NetworkManager is part of the problem / solution.
--> Linked to networkmanager <--
If wifi is disabled (nmcli radio wifi off) the suspend works as expected.
Unfortunately, when scripting this into a systemctl script hooking to suspend.target, networkmanager is killed before the script is executed, thus networkmanager cannot respond anymore to the command.

Example of this systemctl script included here:

[Unit]
Description=Network suspend service
Before=sleep.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli radio wifi off'
ExecStart=/usr/bin/sleep 5

[Install]
WantedBy=sleep.target