You are not logged in.

#1 2020-01-11 11:58:51

newbie115
Member
Registered: 2014-04-13
Posts: 28

Action on resume from hibernate

Hi.

I'm trying to execute an action after resuming from suspend-to-disk.
I currently use a service which starts after hibernate.target, however this does not seem to include a resume from hibernation after suspend-then-hibernate. I want to have a service, which starts always after resuming the system from disk but not when resuming from RAM.
How can I achieve this out the box? The wiki although infinitely helpful on most subjects unfortunately has nothing on this.

Offline

#2 2020-01-11 12:23:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,403

Re: Action on resume from hibernate

There's a suspend-then-hibernate.target as well, hooking your existing service to that additionally should give you what you want. Though I don't know whether this has any fine granularity to state only coming from the hibernation phase... What is it that you want to do exactly?

Last edited by V1del (2020-01-11 12:30:43)

Offline

#3 2020-01-11 16:05:33

newbie115
Member
Registered: 2014-04-13
Posts: 28

Re: Action on resume from hibernate

Thanks for the suggestion. Unfortunately it does not offer any information about the state. Suspend-then-hibernate.target fires both on resuming from S3 and from S4 without any indication as to what exactly happened. Kernel knows though, so I thought maybe there is a non-hacky (not through e.g. reading kernel logs or making your own suspend then hibernate with the rtc clock) way of doing this.
What I want is to bypass the lockscreen when waking from hibernation but not when waking from suspend for... reasons.

Last edited by newbie115 (2020-01-11 16:15:47)

Offline

Board footer

Powered by FluxBB