You are not logged in.
With systemd the shutdown hook isn't executed anymore; create the following files to fix this:
/usr/local/bin/shutdown-power-management.sh
#!/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
/etc/systemd/system/laptop-mode-tools.service
.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
Offline
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)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
@bazenga, thanks, your workaround works like a charm here.
Offline
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.
And bazenga!!!!!!
Last edited by bassu (2012-10-30 10:26:14)
The greatest threat to knowledge is not ignorance - it is the illusion of knowledge!
Offline