I have Ubuntu 14.04.2 installed on Lenovo Flex 2 laptop. My problem is that whenever I select shutdown from the menu, the laptop restarts instead of completely shutting down. Any idea why this might be happening?
-
Check your bios setting - After Power Off Wake=On or Off – Faizan Akram Dar Mar 05 '15 at 03:32
-
@ubuntu99: this does not happen with my Windows 8.1 which is in the other partition – Ubuntuser Mar 05 '15 at 04:18
-
Did you try the answer i posted editing grub file? and what is effect of sudo halt ? (Shutdown or Restart) – Faizan Akram Dar Mar 05 '15 at 04:23
2 Answers
The shutdown from the UI rarely works for me. It has been very iffy in versions for the last 4 years.
Someone might be able to place insight on directly why. But for a resolution you can install cairo-dock and use that UI shutdown problem free.
You can install it with:
$ sudo apt-get install cairo-dock
Now run it from the Launch button. Use this alternate shutdown option. It'll work every time.
I didn't include this in my original answer because it appeared that you were trying to use the GUI.
This will also work every time:
$ sudo shutdown -h now
You can also reboot the computer by issuing:
$ sudo shutdown -r now
Check other cli shutdown options with:
$ man shutdown
Of course you can put this in a script and create a myshutdown.desktop icon to execute the shutdown script with a click.

- 25,036
-
This would not worry me too much currently I guess ;) If shutdown did not work, I would use hibernate instead. Because, unlike in previous 'Buntus, hibernate will always work as a true shutdown (at least here on my box) instead of a quick shutdown-and-restore as it is designed. IOW, I am always required to relogin, whilst with a working hibernate, I would not be required to do that. Worked great in Lubuntu Trusty. – syntaxerror Mar 05 '15 at 04:18
-
@syntaxerror: actully, hibernate does not wake up my wifi . i have to restart my system everytime i put my laptop to hibernate. – Ubuntuser Mar 05 '15 at 04:20
-
Yes, I can believe, read what I wrote. Most of it is totally broken at the moment. However, as I don't have wifi on the machine I was just speaking of, I can't make much judgment about this side of the issue. – syntaxerror Mar 05 '15 at 04:21
You may create script for shutdown by executing following commands :
sudo gedit shutdown_system
and write sudo poweroff
in the file and save it.
then change permission by chmod +x shutdown_system
Execute the file for shutting down the system.
./shutdown_system
Hope it helps!

- 4,511
-
-
What about sudo halt ? Does it shutdown or restart the system. – Faizan Akram Dar Mar 05 '15 at 04:59
-
-
Try this sudo init 0. Also sudo shutdown -h now and also try sudo poweroff -f. Tell me what happens on each of these commands. – Faizan Akram Dar Mar 05 '15 at 05:06
-
init 0 - restarts, shutdown -f : drops to single user mode, poweroff - shuts down the laptop – Ubuntuser Mar 05 '15 at 05:23
-