With systemd the shutdown hook isn't executed anymore; create the following files to fix this:
#!/bin/bash # A script to act as a workaround for the bug in the runtime power # management module, which causes thinkpad laptops to restart after # shutting down. # Bus list for the runtime power management module. Probably shouldn't # touch this. buslist="pci i2c" for bus in $buslist; do for i in /sys/bus/$bus/devices/*/power/control; do echo on > $i done done
.include /usr/lib/systemd/system/laptop-mode-tools.service [Service] ExecStopPost=/bin/rm -f /var/run/laptop-mode-tools/enabled ; /usr/local/bin/shutdown-power-management.sh
After you created the files, execute systemctl daemon-reload
I haven't seen the problem since switching to systemd - I was assuming the fix was unnecessary with systemd. (In fact, I have the opposite problem - I shutdown rather than rebooting.) But maybe I should test again...
EDIT: I double-checked and shutdown on battery shuts down even without the fix with systemd. (Or maybe it plans to reboot but whatever stops rebooting prevents it from doing so in my case? So it looks like it works but only because the bugs cancel each other out...)
Last edited by cfr (2012-10-04 20:42:13)
@bazenga, thanks, your workaround works like a charm here.
On my Thinkpad X230, I had to disable "auto turn on when AC power" in BIOS > Configurations > Power. Then deployed the above script to reenable pci power controls.
Last edited by bassu (2012-10-30 10:26:14)
The greatest threat to knowledge is not ignorance - it is the illusion of knowledge!