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
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] d=yes
Description=Network suspend service
Before=sleep.target
StopWhenUnneede
[Service] /usr/bin/ sudo -u $USER /bin/bash -lc 'nmcli radio wifi off' /usr/bin/ sleep 5
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=
ExecStart=
[Install] sleep.target
WantedBy=