You are not logged in.

#1 2015-01-25 03:15:45

engraves
Member
Registered: 2015-01-25
Posts: 7

Acer Aspire v5 571 reboot on power off

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

#2 2015-01-25 18:06:23

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,211

Re: Acer Aspire v5 571 reboot on power off

What happens when you run that script manually?

Offline

#3 2015-01-25 18:33:30

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: Acer Aspire v5 571 reboot on power off

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.

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

#4 2015-01-25 18:47:14

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,211

Re: Acer Aspire v5 571 reboot on power off

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

#5 2015-01-25 20:24:13

engraves
Member
Registered: 2015-01-25
Posts: 7

Re: Acer Aspire v5 571 reboot on power off

frank604 wrote:

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

#6 2015-01-25 20:25:30

engraves
Member
Registered: 2015-01-25
Posts: 7

Re: Acer Aspire v5 571 reboot on power off

clfarron4 wrote:

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

#7 2015-01-25 20:32:27

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,211

Re: Acer Aspire v5 571 reboot on power off

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

#8 2015-01-27 20:37:29

engraves
Member
Registered: 2015-01-25
Posts: 7

Re: Acer Aspire v5 571 reboot on power off

http://pastebin.com/P7iAFtTs

There's the fix for anyone having this problem aswell.

Offline

#9 2015-02-10 20:37:08

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: Acer Aspire v5 571 reboot on power off

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

Board footer

Powered by FluxBB