How to get the Linux kernel to properly power down the Dell Optiplex GX240 using ACPI

''This problem has been fixed as of 2.6.23. See: Kernel bug reported. If you cannot upgrade to this version or higher use the method below as a work around.''

Dell Optiplex GX240 power down problems in the Linux kernel

This involves editing, hacking, the Linux kernel and is not recommended for users that don't know what they are doing

To see if you are having this problem check dmesg
 * There is a possible bug in the Linux kernel that causes Dell Optiplex GX240's ACPI mode to be forced to ht (hyperthreading), however this prevents ACPI to power down the computer on the shutdown command, halt, or powerdown command. This problem is present in the 2.6.19 - 2.6.22 Linux kernel and most likely older version.
 * Adding acpi=ht, acpi=noirq, or acpi=on to grub will not help.

=The Fix (work around)= {        .callback = force_acpi_ht, .ident = "DELL GX240", .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"), DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"), },        }, /*      {         .callback = force_acpi_ht, .ident = "DELL GX240", .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"), DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"), },        },
 * 1) First backup the original kernel (recommended)
 * 2) Remove any kernel parameters in grub or lilo having to do with ACPI
 * 3) Change directories to the kernel's source
 * 4) Edit the Makefile (recommended)
 * 5) *Change the EXTRAVERSION variable to be something different so you can recognize the new kernel, and you will still have the old one to fall back on.
 * Example: EXTRAVERSION = -Rat-monster-r5
 * 1) Edit: arch/i386/kernel/acpi/boot.c
 * 2) Find the section with the following code:
 * Comment is out like below
 * Compile the kernel as normal and test it out

=Source= (kind of source)
 * http://forums.fedoraforum.org/showthread.php?t=107291
 * Kernel bug reported

From HowTo Wiki, a Wikia wiki.