Reboot instead of poweroff (11.04)

Asked by tobyS

Since some weeks, my Thinkpad X220 stopped shutting down properly, but always reboots after shutdown. This issue occurs when using the "shutdown" button in Unity, but also when using "shutdown -p now" on the shell. I then need to manually hold the power button to force the power off.

I don't really remember if it was a certain update which resulted in the issue, I'm sorry. :/ However, since it keeps occurring after several further updates, I need to debug it now.

I did not change anything in Grub other than applying the fix for random X hangs as suggested here: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/761065, which is changing

- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.semaphores=1"

in /etc/default/grub.

Can anyone give me a hint how I can debug the behavior or does maybe even someone have a fix?

Thanks in advance,
Toby

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu acpi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
J. Austin Rodriguez (jeanaustinr) said :
#1

Hi! what happens when you do 'sudo shutdown -P now' in the Terminal? Or how about 'sudo halt now'?

Revision history for this message
tobyS (tobias-schlitt) said :
#2

Jean, thanks for your reply. As already said in the question, the behavior is the same. The machine shuts down fine, but instead of powering off, it instantly reboots.

Revision history for this message
tobyS (tobias-schlitt) said :
#3

*grmpf* Hit the wrong button for my answer … sorry.

Revision history for this message
Yan Lam (tszylam) said :
#4

I also experience the same problem and I tried to play with the bios option but no luck. My machine also has a windows 7 partition which shutdowns normally.

Revision history for this message
Yan Lam (tszylam) said :
#5

Further googling suggests the problem may be related to laptop-mode-tool. After I disabled loading auto modules (by changing the ENABLE_AUTO_MODULES=1 to 0 in /etc/laptop-mode/laptop-mode.conf) and manually enabled the listed modules, shutdown seems to be working.

Revision history for this message
tobyS (tobias-schlitt) said :
#6

Thanks for info, will try that later, too.

Revision history for this message
tobyS (tobias-schlitt) said :
#7

OK, a quick check induced that I don't seem to have laptop-mode installed at all. At least I don't have a directory /etc/laptop-mode.

Revision history for this message
Yan Lam (tszylam) said :
#8

I should also mention that the reboot-instead-of-poweroff only happens when it is using the battery. It can normally shutdown when AC is plugged in even before the above modification.

laptop-mode-tools should be preinstalled with ubuntu. Another possibility I have not tried is to install the debian version of laptop mode tools as suggested in the package webpage.

Revision history for this message
caritas (huang-ying-caritas) said :
#9

After my testing, this is due to runtime power management of ehci, which is turned on by laptop-mode-tool by default. A workaround is to disable runtime power management of ehci before shutdown. Write a shutdown init.d script with the following contents exected for "start" parameter.

 for f in /sys/bus/pci/drivers/ehci_hcd/*/power/control; do
  echo on > $f
 done

This fixes the issue for my x220. With laptop-mode-tool installed and runtime power management enabled during runtime for ehci, the battery life is longer with proper shutdown behavior.

Can you help with this problem?

Provide an answer of your own, or ask tobyS for more information if necessary.

To post a message you must log in.