I have solved the problem of my laptop waking in 20 seconds like this - see links there. I would like to understand how this works.
That solution is to somehow modify a variable in /sys/power/mem_sleep
, namely s2idle
to deep
.
Looking at that file it contained this single line:
s2idle [deep]
which was already confusing , given both variables seemed mentioned there, one in brackets.
I didn't need to decide anything though, because, as instructed in the second comment, I haven't tried to change that file as such, but I have used the command:
echo deep | sudo tee -a /sys/power/mem_sleep
Looking again at that file it seemed unchanged though.
After restart the waking from suspend is instantaneous, but that file has the same single line s2idle [deep]
that it had in the first place.
I have trusted that solution but:
I don't know how to reverse that in case I had to
The file seems unchanged so what changing/reversing could mean?
Maybe interesting to notice, there is a file at that location sys/power/wakeup_count
which contains this single line: 20
. Could those be the 20 seconds that I had experienced before?
You wrote
deep
to that system file. That file has fixed values that you can see. The one in brackets is the selected value. So it doesn't look like you changed anything.The meaning of the values is:
Source: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-power