So what is the correct replacement for /etc/pm/config.d/ scripts. In Ubuntu 14.04 I had one script there with:
SUSPEND_MODULES="ath5k r8169"
Apparently like said in first post in 16.04 those scripts are not called and everything is somehow managed by systemd.
What is proper replacement for SUSPEND_MODULES and where should I put, because resume from suspend hangs with those two modules.
EDIT: I've found man page related to this
Immediately before entering system suspend and/or hibernation systemd-suspend.service (and the other mentioned units, respectively) will run all executables in
/lib/systemd/system-sleep/ and pass two arguments to them. The first argument will be "pre", the second either "suspend", "hibernate", or "hybrid-sleep" depending on
the chosen action. Immediately after leaving system suspend and/or hibernation the same executables are run, but the first argument is now "post". All executables in
this directory are executed in parallel, and execution of the action is not continued until all executables have finished.
EDIT2: Also arch Power_management wiki is very helpful.
EDIT3: Need more testing, but following solution seems viable:
1. create file
Code:
/lib/systemd/system-sleep/suspend-modules
with content:
Code:
#!/bin/bash
case $1 in
pre)
for mod in $(</etc/suspend-modules.conf); do
modprobe -r $mod
done
;;
post)
for mod in $(</etc/suspend-modules.conf); do
modprobe $mod
done
;;
esac
2. add execute permission
Code:
sudo chmod a+x /lib/systemd/system-sleep/suspend-modules
3. Create file
Code:
/etc/suspend-modules.conf
with one module per line, that should unloaded on suspend
In my case:
Bookmarks