On 05/10/2022 05:18, David Wright wrote:
On Mon 03 Oct 2022 at 13:27:13 (-0600), Charles Curley wrote:On Mon, 3 Oct 2022 20:53:46 +0300 Georgi Naplatanov wrote:Actually I think I found out what was happening: - for failed connection attempts trough SSH - the notebook sometimes switches to suspend/sleep mode and turns off its WiFi card and it takes time WiFi connection to become active againThis sounds reasonable. Suspend likely shuts off the wifi receiver, and upon ending the system may take a while to bring it back up.I'm not sure I understand how, if the wifi receiver is turned off, the laptop receives any packets that are intended to (incidentally) turn it back on and connect to it. I don't have much experience with sleep states. When my laptop is bone idle (open, screen blanked, kbd unlit, no logins, on battery), iwd still scans the wifi every minute, and ping returns are still instant. I presume this is the state known as S0. When I close the lid, it sleeps (I presume it's S3 as there's no swap; much activity occurs, and is logged, when the lid is reopened). Ping gets no replies. S1 and S2 are the mystery ones for me, as I have no idea how to enter/leave them. I suspect they may be the states where people post about their (non-builtin) keyboards and mice not waking them up.
According to https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/pm/sleep-states.rst,
S1 = Standby S3 = Suspend-to-RAM S4 = HibernationThese states can be achieved (if your hardware supports it) by executing "echo standby > /sys/power/state", "echo deep > /sys/power/mem_sleep" and "echo dik > /sys/power/state" (although you may find a userspace tool such as systemd or a GUI may be more suitable).
(S2 is very similar to S3. Maybe the only difference is that devices (e.g. the screen) are powered off. I'm not sure that S2 serves much practical purpose.)
I wonder why it's going into suspend mode; perhaps it is doing so unnecessarily.Is this perhaps something that DEs do, along with screensavers and screen locking. (I don't know whether the OP installs one; I don't. Perhaps that's why I've not encountered S1/S2.) Cheers, David.
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature