You are not logged in.
Pages: 1
Everytime I try to power off my laptop it'll reboot in any linux distro. The only fix I found to work is this http://www.pbehnke.com/main/node/11 but that's for fedora. How would I go about doing the same thing in arch? I've also tried the answer posted at the end of this thread https://bbs.archlinux.org/viewtopic.php?id=191098. No luck.
Offline
What happens when you run that script manually?
Offline
It's been a while since either Arch or Fedora were using initscripts...
If I were you, I'd probably write a systemd service to execute the for loop when you make the call to shutdown.
EDIT: It just so happens that on the second page of the reference thread for the script, there is this:
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
EDIT2: Depending on how you've set things up, you might need a slightly different service file to get it to execute though.
Last edited by clfarron4 (2015-01-25 18:51:54)
Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository
Offline
I'm assuming he has made the script and the systemd service to call upon it. But wanted to know if just running the script yielded the result he was looking for.
Offline
What happens when you run that script manually?
Well I don't know how to get it to work on systemd because it was designed for init.d
Offline
It's been a while since either Arch or Fedora were using initscripts...
If I were you, I'd probably write a systemd service to execute the for loop when you make the call to shutdown.
EDIT: It just so happens that on the second page of the reference thread for the script, there is this:
bazenga wrote: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
EDIT2: Depending on how you've set things up, you might need a slightly different service file to get it to execute though.
Is there a way of running that script without laptop-mode-tools?
Offline
For systemd, read https://wiki.archlinux.org/index.php/systemd
This is mandatory reading for using arch imo.
As to running the script, that sh file, read http://www.cyberciti.biz/faq/howto-run- … -in-linux/
Offline
There's the fix for anyone having this problem aswell.
Offline
Thank you, engraves. I had the same problem on a similar laptop (Acer v5 471G). On Ubuntu I was able to install laptop-mode-tools and the problem is gone, but installing the package on Arch didn't help. Your solution works fine
Offline
Pages: 1