pmaports/main/postmarketos-base/rootfs-etc-sleep-inhibitor.conf
clayton craft 5a06a6bb06
postmarketos-base: replace elogind suspend hook with sleep-inhibitor (MR 1825)
This adds sleep-inhibitor as a dependency when elogind is present, and
installs a conf for it with some plugins enabled that are beneficial to
devices running pmOS. The elogind suspend hook is dropped.

This resolves issues where suspend is aborted in the hook *after*
PrepareForSleep is sent over dbus (which might cause some things to
disable radios/modems, etc for suspend).

The 'period' in the conf is in minutes, a value of 0.1 is 6 seconds,
which seems reasonable for releasing the lock when conditions for
inhibiting no longer apply, without spinning the CPU too frequently.
2020-12-28 00:36:35 +01:00

38 lines
1.5 KiB
Text

# Configuration file for sleep-inhibitor program. Copy this to
# /etc/sleep-inhibitor.conf and edit as you want.
#
# Normally the plugin dir (for provided plugins) is automatically
# determined at either /usr/share/sleep-inhibitor/plugins or
# /usr/local/share/sleep-inhibitor/plugins but you can define it
# explicitly here if you want, e.g. for custom config file for testing.
# plugin_dir:
#
# Plugins are defined following. You can define as many plugins as you
# require. Custom plugins are specified with an absolute path to your
# own executable file. Standard plugins (i.e. those included in the
# distribution plugins/ dir) are specified with no path.
#
# Arguments are specified as below:
# path: Must be specified. Can be an absolute path for custom
# plugins, or relative to the program distribution plugins/
# directory for standard plugins.
# args: Optional. Provides arguments to the above script if required.
# period: Optional. Specifies period in minutes. Defaults to 5.
# name: Optional. Descriptive name for logging. Defaults to basename of
# path.
# what: Optional. Takes a colon-seperated list of one or more
# operations to inhibit. See the description of the --what
# option in the man page for systemd-inhibit. Defaults to the
# default value of that systemd-inhibit option.
plugins:
- path: ssh-session-open
name: SSH session open
period: .1
what: sleep
- path: apk-running
name: apk running
period: .1
what: sleep