Questions about deep sleep (crust)
#1
I've got some questions about the pinephone's deep sleep (using crust) that I'm struggling to find answers to.

Firstly, how can I tell when/if the device goes into deep sleep, or if a distro even uses it?

Secondly, how is it activated? Is it done automatically as part of normal suspend-to-ram, or is it its own thing?

Last, are there any notable differences in how the device can be woken up from deep sleep compared to normal sleep? Mostly thinking of timers/alarms, but I can test those myself if I know the answers to the earlier questions.

Any information/documentation is appreciated Smile
  Reply
#2
Ok, as often happens after asking a question, I've finally managed to find some useful information myself.



SXMO has a screenlock program[0] that their documentation specifies enters crust suspend/deep sleep. Looking through the source code provides some answers (assuming I've not somehow misinterpreted something).




It appears that the crust suspend is equivalent to a normal suspend-to-ram, which is activated when the string 'mem' is written to /sys/power/state while the file /sys/power/mem_sleep contains the string 'deep' (as opposed to 's2idle' or 'shallow').[1] Presumably if the crust firmware is present nothing else is needed.




The sxmo_screenlock code also strongly implies to me that all the usual methods of wakeup from suspend apply as well, since they make sure only the ones they're interested in are enabled.




I've not tested any of this, but it definitely looks like I may have been under the impression that the situation was much more complicated than it is Rolleyes




Posting this in case anyone else was wondering and is as unfamiliar with how this sort of stuff works as me.



[0] https://git.sr.ht/~mil/sxmo-docs/tree/ma...lockstrong

[1] https://www.kernel.org/doc/html/v4.18/ad...tates.html
  Reply
#3
Seems 100% identical to how it is handled on laptops, so I assume all standard userspace interfaces apply to PP too.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Questions and experiences using Fedora Mobile (as a PinePhone newbie) zkajdan 1 1,844 10-03-2021, 11:31 AM
Last Post: zkajdan
  window manager choices/questions. D4rkh0rs3 1 2,137 08-21-2021, 12:10 PM
Last Post: swiley
  deep sleep issues on multiple distros discogribbs 0 1,201 08-19-2021, 08:52 PM
Last Post: discogribbs
  After installing CRUST, what does a distro need to do to get wake on modem working? Subsentient 4 6,631 07-06-2020, 04:32 AM
Last Post: Alefnode
  pplockd: Simple power management/CRUST daemon for X11 GUIs on PinePhone Subsentient 1 3,569 07-04-2020, 06:39 AM
Last Post: Subsentient

Forum Jump:


Users browsing this thread: 1 Guest(s)