If one of the above boot parameters solved your problem with Ubuntu hanging on shutdown you will want to make the changes permanent to avoid having to enter them with each boot. In this section we will look at making the changes permanent assuming you are using Ubuntu's default boot loader, Grub. In order to permanently change your boot options, you'll need to edit the /boot/grub/menu.lst file.
Before you begin, open a terminal window and type this command to back up the file:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
Type this command to edit the menu.lst file:
sudo nano /boot/grub/menu.lst
You can use any text editor to edit this file, Nano is just my personal favorite. Next you will want to locate the line that starts with "# kopt=" and add whichever boot option(s) fixed your Ubuntu shutdown problems to the end of the boot command, with a space between each one.
The last step will be to update your Grub installation with the following command:
sudo update grub
If you have tried the solution above to troubleshoot potential ACPI problems and Ubuntu still hangs on shutdown you will need to start going over your log files looking for any error messages.
/var/log/dmesg (superuser not required)
/var/log/messages (superuser required)
A couple things in particular to pay attention to are:
Network interface errors: If a network interface is not terminating properly this can cause long delays in your shutdown, often appearing to make your shutdown hang. Most times the network interface will timeout eventually but even so you will want to troubleshoot this problem to avoid long delays in your Ubuntu shutdown. Pay particular attention to any lines containing eth0, eth1, etc.
Other services not terminating properly: Any number of services may be having problems terminating properly, causing your Ubuntu shutdown to hang. A thorough inspection of your log files may give you a clue as to what service is causing the problem so you can take steps to troubleshoot that specific problem.