[systemd-devel] Help writing a user service file that will exec a command upon system sleep

John da_audiophile at yahoo.com
Thu Oct 29 11:52:13 PDT 2015


________________________________
> From: David Timothy Strauss <david at davidstrauss.net>
>To: John <da_audiophile at yahoo.com>; "systemd-devel at lists.freedesktop.org" <systemd-devel at lists.freedesktop.org> 
>Sent: Wednesday, October 28, 2015 7:54 PM
>Subject: Re: [systemd-devel] Help writing a user service file that will exec a command upon system sleep
> 
>
>
>I read up on PSD, and I expect you're using it for performance/hardware longevity. Correct me if I'm wrong about this.
>
>So, have you considered just mounting your home directory or a volume for things like browser profile data with normally aggressive/unsafe options on a normal file system? You can configure file systems like ext4 to only commit at periodic intervals, and you can also configure your system to commit/sync all file systems before going to sleep. They will buffer writes to memory until committing, and reads will buffer into the kernel's page cache. This option is not crash-safe, but neither is PSD.
>


This is an interesting idea but I would like to learn about user units and sleep mode :)


More information about the systemd-devel mailing list