how does suspend/standby work on your system? 

Newsgroups: comp.os.linux.portable
Date: 2002-08-11 07:08:21 PST
> I'd like to ask how suspend/standby/hibernate works on the various
> systems people are using.

IBM Thinkpad A22p, suspend-to-RAM works great, never used suspend-to-disk. Suspend-to-RAM worked fine on the previous laptops I've owned, Thinkpad 380D and 600X. I tested suspend-to-disk on both the 600X and A22p, it worked fine, but I never had any use for it.

> It seems to be loosely equivalent to Windows' 'standby' function in
> that it needs power - eventually the battery will die if you leave it
> that way long enough.

A modern laptop will stay in suspend-to-RAM for between 48 and 72 hours before running out of battery power. That should be long enough for almost any purpose.

> What I would really like is something equivalent to the Windows
> 'hibernate' feature Is there any way to do this? (Omnibook 500, RedHat
> 7.3)

Suspend-to-disk is typically controlled by the machine's BIOS, not the OS at all. On most laptops, a special "hibernation file" is written to the first FAT32 partition, and the location of that file on disk is written to NVRAM using super-secret BIOS calls. All this requires a laptop-specific DOS utility. Another super-secret BIOS call (typically activated by pressing Fn-F12 on the keyboard) traps the CPU, and a BIOS routine takes over and writes the contents of RAM and the processor state into the hibernation file, then sets a flag so that the next time the power's turned on, the thing restores its state from the file instead of going through normal bootup.

Getting this to work right requires some tweaking in most cases. An alternative is the "swsusp" patch to the kernel, which will work regardless of whether the laptop's native suspend-to-disk capability will.

Matt G

how does suspend/standby work on your system? 

I have a rebranded Clevo laptop (http://cpbotha.net/my_laptop.html) that is almost exclusively ACPI. Suspend to ram does not work yet (I'll explain more later) but I use the swsusp patches (link on my laptop page) to "hibernate" to disc. This works perfectly on my setup.

> Suspend-to-disk is typically controlled by the machine's BIOS, not the
> OS at all.  On most laptops, a special "hibernation file" is written to
> the first FAT32 partition, and the location of that file on disk is
> written to NVRAM using super-secret BIOS calls.  All this requires a

This is not so true anymore. This used to be the case with most older laptops (and some of the newer Thinkpads and Dells) but the move to ACPI is changing all of this. With ACPI, far more of the responsibility of suspending/resuming is left with the OS. In linux, this support is still fledgeling. When it's complete, however, it will offer far more fine-grained control than ever possible with APM.

I know that ACPI suspend-to-ram S1 works on many laptops already. S3 suspend to RAM works on far fewer and is only available on the 2.5.x kernels. S4 suspend to disc is not implemented at all, but the software suspend patches (swsusp) represent a big step in the right direction.

charl p. botha

how does suspend/standby work on your system? 

> None of those work for me.  When I switch the power back on, the
> screen comes back, but the machine remains hung up.  Quite
> annoying.  I tried many fixes, but nothing helped.
>
> Dell Latitude CPi 266
> Red Hat 7.2
> APM

Dell Latitude CPi D330XT, APM suspend to ram works via Fn-suspend, pressing power button to resume, or just closing the lid, reopen to resume. I have to turn off apm calls during cpu idle or the machine will reboot after about 20 minutes of use. Haven't tried suspend to disk yet.

Jerry

how does suspend/standby work on your system? 

>  > Dell Latitude CPi D330XT, APM suspend to ram works via Fn-suspend,
> Is that with Red Hat?

Slackware 8.0 with a custom built 2.4.16 kernal using pcmcia-cs, not the kernel pcmcia.

Jerry

how does suspend/standby work on your system? 

IBM Thinkpad A21m

I don't do anything with APM, I only press Function+F4. It goes to standby fine, but the time also stops.

how does suspend/standby work on your system? 

> Function+F4. It goes to standby fine, but the time also stops.

This is not tough to fix. However, we need to know which distro you're using, since the apmd_proxy script lives in different spots depending on distro. In SuSE, it lives in /usr/sbin/apmd_proxy and most of its environment variables are set in /etc/sysconfig/powermanagement (in 8.0, 7.x had the env. variables in /etc/rc.config or directly within the proxy script.) In Redhat, it lives in /etc/sysconfig/apm-scripts/ apmscript , and the env. variables are in /etc/sysconfig/apmd .

In SuSE, set the APMD_SET_CLOCK_ON_RESUME varaible to "yes". In Redhat, set CLOCK_SYNC to "yes". Then when apmd receives a "resume" event, it'll execute "hwclock —hctosys", and the time will be (mostly) correct on resume. HTH,

Matt G