Difference between revisions of "How to make APM work"
(→using a hibernation partition) |
(added more models) |
||
(28 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
==General== | ==General== | ||
You need to enable the APM Power Management support in the kernel and install the [[apmd]] to handle the events triggered by the kernel driver. | You need to enable the APM Power Management support in the kernel and install the [[apmd]] to handle the events triggered by the kernel driver. | ||
− | The configuration for what to do at the different events is done in the proxy script which is usually found in | + | The configuration for what to do at the different events is done in the proxy script which is usually found in {{path|/etc/apmd_proxy}}. |
− | See {{ | + | See {{cmduser|man apmd}} for further information on this. |
− | If both ACPI and APM are enabled in your kernel, ACPI will override APM on boot if an ACPI capable BIOS is detected. To keep it from doing so add | + | If both ACPI and APM are enabled in your kernel, ACPI will override APM on boot if an ACPI capable BIOS is detected. To keep it from doing so add {{bootparm|acpi|off}} to your [[kernel parameters]]. |
Beware that different kernels and distributions will provide different results. Mandrake has been better than Redhat, Fedora, and Debian generally with e.g. T20, 600X and 240X in providing sleep but no blank or hibernation with 2.4 and 2.6 kernels. Debian Sarge with 2.4 kernels also. On a RH9 distribution you can be successful using a MDK kernel. | Beware that different kernels and distributions will provide different results. Mandrake has been better than Redhat, Fedora, and Debian generally with e.g. T20, 600X and 240X in providing sleep but no blank or hibernation with 2.4 and 2.6 kernels. Debian Sarge with 2.4 kernels also. On a RH9 distribution you can be successful using a MDK kernel. | ||
==Screen blanking (Standby)== | ==Screen blanking (Standby)== | ||
− | {{cmdroot|apm -S}} will standby the machine. {{key|Fn}}{{key|F3}} should result in the same thing. | + | A {{cmdroot|apm -S}} will standby the machine. {{key|Fn}}{{key|F3}} should result in the same thing. |
==Suspend to RAM (Sleep)== | ==Suspend to RAM (Sleep)== | ||
− | {{cmdroot|apm -s}} will suspend the machine. {{key|Fn}}{{key|F4}} should do the same thing. | + | A {{cmdroot|apm -s}} will suspend the machine. {{key|Fn}}{{key|F4}} should do the same thing. |
==Suspend to disk (Hibernate)== | ==Suspend to disk (Hibernate)== | ||
Line 21: | Line 21: | ||
===using a hibernation partition=== | ===using a hibernation partition=== | ||
− | The partition to be used for hibernation must be a primary partition that is at least as big as your laptop's memory including its video ram. First set the partition type of this partition to a0 (IBM | + | The partition to be used for hibernation must be a primary partition that is at least as big as your laptop's memory including its video ram. First set the partition type of this partition to a0 (IBM ThinkPad hibernation) with fdisk, and then use [[tphdisk]] to write a hibernation file directly to this partition. |
− | Only follow these instructions, if you understand them. You will overwrite a partition on your hard disk and might lose valuable data - consider yourself warned. For example, assume that /dev/hda2 is the partition that is to be converted to a hibernation partition. Become root and type {{cmdroot|/sbin/fdisk /dev/hda}}. At the fdisk prompt type | + | Only follow these instructions, if you understand them. You will overwrite a partition on your hard disk and might lose valuable data - consider yourself warned. For example, assume that {{path|/dev/hda2}} is the partition that is to be converted to a hibernation partition.<br /> |
+ | #Become root and type {{cmdroot|/sbin/fdisk /dev/hda}}.<br /> | ||
+ | #At the fdisk prompt type {{key|t}} to change the partition type, then type {{key|2}} (or the number of the partition that's supposed to be the hibernation partition) to indicate that you want to change the type of partition 2, and then enter the partition type: a0.<br /> | ||
+ | #Now type {{key|w}} to write the partition table back to disk and exit.<br /> | ||
+ | #After that use [[tphdisk]] to initialize the hibernation partition. First estimate the size of your laptop's memory (main and video). For the sake of this example, let us assume that the main memory is 1024 MB and the video card has 128 MB of memory. Then the command {{cmdroot|tphdisk 1152 > /dev/hda2}} will properly initialize the hibernation partition. Note that this will only work if the partition is big enough.<br /> | ||
+ | #After a reboot, {{key|Fn}}{{key|F12}} will work as expected. | ||
I have successfully used this method on a T41 (2373GEU) that runs Fedora Core 3. | I have successfully used this method on a T41 (2373GEU) that runs Fedora Core 3. | ||
Line 36: | Line 41: | ||
If you have 512MB or more of RAM installed, you will need to use a FAT32 partition, due to file-size limits in FAT16. | If you have 512MB or more of RAM installed, you will need to use a FAT32 partition, due to file-size limits in FAT16. | ||
− | There have been varying reports of success or lack thereof using [[tphdisk]]; see [[APM setup on a type 2379 | + | There have been varying reports of success or lack thereof using [[tphdisk]]; see [[APM setup on a type 2379 ThinkPad T40]] for workarounds and notes on required BIOS version, if [[tphdisk]] doesn't do the trick. |
===using SoftwareSuspend2=== | ===using SoftwareSuspend2=== | ||
− | + | {{Todo|For instance check the [http://www.suspend2.net/ Project Page]. There is a good howto.}} | |
+ | |||
+ | ==Troubleshooting== | ||
+ | *On the {{600X}} (using kernel 2.6.12.5) APM suspend and hibernate functions won't work if the floppy disk driver is not running (must be compiled into kernel or modprobe'd - even if your FDD is not connected). Running {{cmduser|apm --suspend}} will return Input/Output Error. After enabling the floppy's driver suspend and hibernate functions are running fine. | ||
+ | |||
+ | *On at least the {{T20}} APM hibernate won't work if the laptop is on AC power -- Fn-F12 will just produce a low beep. | ||
==External Sources== | ==External Sources== | ||
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4PESMK IBMs Standalone Hibernation Utility Diskette II] | *[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4PESMK IBMs Standalone Hibernation Utility Diskette II] | ||
+ | |||
+ | ==Recommended models for APM== | ||
+ | *{{130}} | ||
+ | *{{2 Series}} | ||
+ | *{{3 Series}} | ||
+ | *{{5 Series}} | ||
+ | *{{6 Series}} | ||
+ | *{{700}}, {{700C}}, {{701C}}, {{701CS}}, {{720}}, {{720C}}, {{730T}}, {{730TE}}, {{750}}, {{750C}}, {{750Cs}}, {{750P}}, {{755C}}, {{755CD}}, {{755CDV}}, {{755CE}}, {{755Cs}}, {{755CSE}}, {{755CV}}, {{755CX}}, {{760C}}, {{760CD}}, {{760E}}, {{760ED}}, {{760EL}}, {{760ELD}}, {{760L}}, {{760LD}}, {{760XD}}, {{760XL}}, {{765D}}, {{765L}}, {{770}}, {{770D}}, {{770E}}, {{770ED}}, {{770X}}, {{770Z}} | ||
+ | *{{T20}}, {{T21}} |
Latest revision as of 12:12, 21 December 2019
Contents
General
You need to enable the APM Power Management support in the kernel and install the apmd to handle the events triggered by the kernel driver.
The configuration for what to do at the different events is done in the proxy script which is usually found in /etc/apmd_proxy.
See $ man apmd
for further information on this.
If both ACPI and APM are enabled in your kernel, ACPI will override APM on boot if an ACPI capable BIOS is detected. To keep it from doing so add acpi=off
to your kernel parameters.
Beware that different kernels and distributions will provide different results. Mandrake has been better than Redhat, Fedora, and Debian generally with e.g. T20, 600X and 240X in providing sleep but no blank or hibernation with 2.4 and 2.6 kernels. Debian Sarge with 2.4 kernels also. On a RH9 distribution you can be successful using a MDK kernel.
Screen blanking (Standby)
A # apm -S
will standby the machine. FnF3 should result in the same thing.
Suspend to RAM (Sleep)
A # apm -s
will suspend the machine. FnF4 should do the same thing.
Suspend to disk (Hibernate)
The Phoenix BIOS allows you three ways to hibernate with APM:
- using a special partition
- using a hibernation file on a dos type partition
- using SoftwareSuspend2
using a hibernation partition
The partition to be used for hibernation must be a primary partition that is at least as big as your laptop's memory including its video ram. First set the partition type of this partition to a0 (IBM ThinkPad hibernation) with fdisk, and then use tphdisk to write a hibernation file directly to this partition.
Only follow these instructions, if you understand them. You will overwrite a partition on your hard disk and might lose valuable data - consider yourself warned. For example, assume that /dev/hda2 is the partition that is to be converted to a hibernation partition.
- Become root and type
# /sbin/fdisk /dev/hda
. - At the fdisk prompt type t to change the partition type, then type 2 (or the number of the partition that's supposed to be the hibernation partition) to indicate that you want to change the type of partition 2, and then enter the partition type: a0.
- Now type w to write the partition table back to disk and exit.
- After that use tphdisk to initialize the hibernation partition. First estimate the size of your laptop's memory (main and video). For the sake of this example, let us assume that the main memory is 1024 MB and the video card has 128 MB of memory. Then the command
# tphdisk 1152 > /dev/hda2
will properly initialize the hibernation partition. Note that this will only work if the partition is big enough. - After a reboot, FnF12 will work as expected.
I have successfully used this method on a T41 (2373GEU) that runs Fedora Core 3.
In case you have a floppy drive you can also use the IBMs Standalone Hibernation Utility Diskette II to create the hibernation partition.
Or you can use this bootable CD image if you don't.
using a hibernation file on a dos partition
The partition to put the file on must be a dos or vfat partition. Fat32 formatted partitions have been reported successful as well as Fat16 formatted ones. The file is either created with phdisk.exe, if you happen to have a floppy drive and a bootable dos floppy disk that you can start it from. Under Linux tphdisk will do this job for you.
If you have 512MB or more of RAM installed, you will need to use a FAT32 partition, due to file-size limits in FAT16.
There have been varying reports of success or lack thereof using tphdisk; see APM setup on a type 2379 ThinkPad T40 for workarounds and notes on required BIOS version, if tphdisk doesn't do the trick.
using SoftwareSuspend2
TODO
|
For instance check the Project Page. There is a good howto.
|
Troubleshooting
- On the 600X (using kernel 2.6.12.5) APM suspend and hibernate functions won't work if the floppy disk driver is not running (must be compiled into kernel or modprobe'd - even if your FDD is not connected). Running
$ apm --suspend
will return Input/Output Error. After enabling the floppy's driver suspend and hibernate functions are running fine.
- On at least the T20 APM hibernate won't work if the laptop is on AC power -- Fn-F12 will just produce a low beep.
External Sources
Recommended models for APM
- 130
- 220, 230CS, 235, 240, 240X, 240Z
- 300, 300C, 310, 310E, 310D, Template:315E, 315D, 310ED, Template:315ED, 320, 330C, 330CS, 340, 345C, 345CS, 340CSE, 350, 350C, 355, 355C, 355CS, 360, 360C, 365C, 365E, 365X, 360P, 360PE, 360CS, 360CE, 365CS, 365CD, 365ED, 365XD, 360CSE, 365CSD, 370C, 380, 380E, 380D, Template:380X, 380Z, Template:385E, 385D, 380ED, 380XD, 385ED, 385XD, 390, 390E, 390X
- 500, 510CS, 530CS, 535, 535E, 535X, 550BJ, 555BJ, 560, 560E, 560X, 560Z, 570, 570E
- 600, 600E, 600X
- 700, 700C, 701C, 701CS, 720, 720C, 730T, 730TE, 750, 750C, 750CS, 750P, 755C, 755CD, 755CDV, 755CE, 755CS, 755CSE, 755CV, 755CX, 760C, 760CD, 760E, 760ED, 760EL, 760ELD, 760L, 760LD, 760XD, 760XL, 765D, 765L, 770, , 770E, 770ED, 770X, 770Z
- T20, T21
- NeedsEditing
- 600X
- T20
- 130
- 220
- 230CS
- 235
- 240
- 240X
- 240Z
- 300
- 300C
- 310
- 310E
- 310D
- 315D
- 310ED
- 320
- 330C
- 330CS
- 340
- 345C
- 345CS
- 340CSE
- 350
- 350C
- 355
- 355C
- 355CS
- 360
- 360C
- 365C
- 365E
- 365X
- 360P
- 360PE
- 360CS
- 360CE
- 365CS
- 365CD
- 365ED
- 365XD
- 360CSE
- 365CSD
- 370C
- 380
- 380E
- 380D
- 380Z
- 385D
- 380ED
- 380XD
- 385ED
- 385XD
- 390
- 390E
- 390X
- 500
- 510CS
- 530CS
- 535
- 535E
- 535X
- 550BJ
- 555BJ
- 560
- 560E
- 560X
- 560Z
- 570
- 570E
- 600
- 600E
- 700
- 700C
- 701C
- 701CS
- 720
- 720C
- 730T
- 730TE
- 750
- 750C
- 750CS
- 750P
- 755C
- 755CD
- 755CDV
- 755CE
- 755CS
- 755CSE
- 755CV
- 755CX
- 760C
- 760CD
- 760E
- 760ED
- 760EL
- 760ELD
- 760L
- 760LD
- 760XD
- 760XL
- 765D
- 765L
- 770
- 770E
- 770ED
- 770X
- 770Z
- T21