Here is what you do if you are running Xubuntu Hardy Heron:

1) Go to the terminal (Applications/System) and enter this line of code:

sudo mousepad /boot/grub/menu.lst

2) Now a Mousepad file will open. Scroll down all the way till you see

End Default Options

3) Find the paragraph where it says something like:

Ubuntu 7.10, kernel 2.6.22-14-generic
(hd0,0)
/boot/vmlinuz-2.6.22-14-generic root=UUID=419086cc-9136-45e9-9369-d7fe44edff76 ro quiet splash
/boot/initrd.img-2.6.22-14-generic

Note: this is only 4 lines in Mousepad, not 5.
4) See where it says "splash"? Enter a space, then write (on the same line):

acpi=force apm=power_off

5) Save the document, exit, restart the computer, log in again and try to shut down. It might just work.

 
NOTE: If you don’t have mousepad, then replace that command with sudo pico menu.lst