5

I'm trying to run a script in /etc/pm/sleep.d on resume from sleep. I'm not seeing any indication that the script ever gets run when I sleep the machine with "systemctl suspend". I do see that when I use "pm-suspend" to sleep the machine the script does get executed.

Whats the difference between systemctl and pm-suspend? Ubuntu 16.04.

user.dz
  • 47,137
  • 13
  • 140
  • 258
Phil
  • 51
  • 1
  • 4

1 Answers1

6

See the power management page on the Arch wiki.

systemd does not use pm-utils to put the machine to sleep when using systemctl suspend, systemctl hibernate or systemctl hybrid-sleep; pm-utils hooks, including any custom hooks, will not be run.

Zanna
  • 69,223
  • 56
  • 216
  • 327