6

What is the purpose of /etc/pm/config.d and /etc/pm/power.d? It's my understand that scripts in /etc/pm/sleep.d are run at the time of a power management event such as the computer sleeping, hibernating, resuming and thawing.

What would I use the config.d and power.d directories for?

Sean
  • 1,913
  • 2
  • 15
  • 23

1 Answers1

3
  /etc/pm/config.d
       The files in this directory are evaluated in C sort order. These
       files can be provided by individual packages outside of pm-utils.
       If a global configuration variable is set, the value set to will be
       appended to the previous value. If any other variable is set, it
       will be ignored. The syntax is simply: VAR_NAME = value. See the
       CONFIGURATION VARIABLES section for valid variables defined by
       pm-utils. External packages can define others, see their respective
       documentation for more information.

The hooks for the power state are placed in

/usr/lib/pm-utils/power.d

distribution / package provided hooks 

/etc/pm/power.d

hooks added by the system administrator 

Hooks in /etc/pm/ take precedence over those in /usr/lib/pm-utils/, so the system administrator can override the defaults provided by the distribution. 

For instance check this link

kamil
  • 7,275
  • 6
  • 40
  • 60
  • I have a script in `sleep.d` that runs when the lid is closed and opened. I believe lid events are being handled by `systemd` not `pm-suspend` so they should be in `config.d` not `sleep.d`. Perhaps the system treats them the same and it's up to us humans to put them in the right place. The `power.d` description was informative. Thanks kamil. – Sean Jan 31 '14 at 18:56
  • @Sean, Ubuntu doesn't use systemd. – psusi Jan 31 '14 at 19:10
  • 1
    Although that has now changed in version 15, precipitating questions such as http://askubuntu.com/questions/609695/ and http://askubuntu.com/questions/613741/. – JdeBP Apr 25 '15 at 09:01