Reboot instead of shut down

I have a Lenovo ThinkPad S430 laptop. Occasionally, when I want to shut down the machine, it would power off and a second later turn on again. Seems to happen more often when using the battery, but I am not sure. I am using XFCE and this happens when I select shut down from the Log out menu. This behaviour can be really annoying if you are on a hurry…

I did some searching and in the end, the solution found here seemed to work. I created this file /etc/rc.d/rc.local_shutdown and pasted the following in it:

for i in /sys/bus/usb/devices/*/power/control;
do echo on > $i
done

Then, I made the file executable:

chmod +x /etc/rc.d/rc.local_shutdown

I tested the shutdown process 10 times on battery and 10 times on power. There were no reboots and I hope this really fixed the problem. If this was the problem, here’s an excerpt from this post:

The problem seems to arise from incorrect work of pm-utils. But if you write on into /sys/bus/*/devices/*/power/control, the kernel takes control over power management at the specified devices – and somehow this makes the hardware to shut down correctly.

Here are some additional discussions of the same problem:
A thread on LQ, also a talk on the Ubuntu forums and some more on Ubuntu forums; there is this  discussion on the Arch Linux forum.

Seems people started having trouble using the above solution after their distro switched to systemd, but we don’t have this problem, do we?



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s