Ubuntu 12.04 does a restart instead of a shutdown
I have had exactly the same problem on my Acer V5-571G: the laptop shuts down, turns off its power LED, and then starts again after a few seconds.
The problem seems to arise from incorrect work of pm-utils (which are replacement for laptop-mode-tools). 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.
So I have written a script:
#!/bin/bash
case "$1" in
stop) for i in /sys/bus/*/devices/*/power/control ; do echo on > $i ; done
;;
esac
exit 0
and to make it being executed every time before shutdown I've placed it under name K32power-control-on into /etc/rc0.d directory (don't forget to make the script executable, sudo chmod +x K32power-control-on). After that the laptop shuts down ok.
I think that there are only a few buses/devices which need to have 'on' value written to their power/control, so the list of devices in the script can be restricted, but I just didn't investigate further.
Related videos on Youtube
Andy Smith
Updated on September 18, 2022Comments
-
Andy Smith over 1 year
I recently upgraded from Ubuntu 11.10 to 12.04 on my Dell Latitude D630C.
Now, when I want to shut down the system does shut down but then starts up again immediately. It's like it does a reboot instead of a shut down.
-
Admin almost 12 yearsThis also happens with the Toshiba Satellite C670D-108 but only when the mains power is active. To shutdown without restart I have to pull the power connector.
-
ultrajohn over 11 years@paulb1257 interesting! mine was the exact opposite. I have to plug in my power connector so my system would shutdown properly. If I shut it down while it's on battery, it just would do a restart. maybe the laptop_mode setting is somehow related to this issue. mine is ON(1) when on battery mode, while OFF(0) when on AC mode.
-
ultrajohn over 11 yearsno, i guess i'm wrong. i tried disabling laptop_mode on battery, but it still reboot when i shutdown.
-