How to fix a computer that won't restart?

Open the terminal and edit this /etc/default/grub file under Ubuntu 12.04

 sudo gedit /etc/default/grub

Find now this line:

GRUB_CMDLINE_LINUX=""

enter image description here

Replace it with this one:

GRUB_CMDLINE_LINUX="reboot=efi"

enter image description here

Save your file and close, then update Grub with this command:

sudo update-grub

Reboot your system, then try to restart your system to see if it works or not. If this is not working for you, repeat the same steps and try one of these lines instead:

GRUB_CMDLINE_LINUX="reboot=bios"

or

GRUB_CMDLINE_LINUX="reboot=acpi"

or

GRUB_CMDLINE_LINUX="reboot=pci"