APMD-List:
Archives

  
Back

to

APMD

Home

      Index: [thread] [date] [subject] [author]
  From: Craig Markwardt <craigm@pcasun3.gsfc.nasa.gov>
  To  : <ajlewis2@intac.com>
< apmd-list@worldvisions.ca> Date: Mon, 6 Dec 1999 11:21:19 -0500 (EST)

APM on desktop does not resume

Hi--

ajlewis2@intac.com writes:
 > I have RedHat 6.0 which comes with apm enabled in the kernel.  When
 > I do apm -s, while in console as root, the machine goes into
 > "sleep" mode.  When I press the button to awaken it, I find that
 > the system is frozen. I am using a desktop and am not finding much
 > online that explains what to do in order to make apm work.  

Unfortunately there are a lot of buggy BIOS implementations of APM.
Not all of them work properly.  That said, it is also possible that
there is a bug in the Linux side too.  You should provide some more
information about your setup, including kernel version, hardware make
and model, etc.

One thing about RedHat is that they apparently did not install
/etc/apmd_proxy in their standard distribution.  apmd_proxy does do a
few things to protect your system before and after entering suspend
mode.  You can get this from the full distribution on the web page,
and install it by hand.  Make sure it's executable.

 > I assume that there is too much hard drive activity, because when I
 > use hdparm to spin down the hard drive, it starts backup within
 > seconds.  Is there a document that addresses this problem?  Thank
 > you.  Anita

I've been doing a lot of experimentation on this, trying to reduce the
amount of hard disk accesses.  My tips for RedHat 6.1:

1. Cron jobs run every ten minutes by default.  Each one causes a disk
   access.  Try to reduce the number of cron jobs.  Solutions:

2. Remove /etc/cron.d/kmod, and add a similar job on a daily/weekly
   timescale if you really want it.  kmod removes stale kernel
   modules, and is not really required.

3. Move hourly and daily cron entries into weekly and monthly.  These
   are found in /etc/cron.hourly, cron.daily, cron.weekly,
   cron.monthly.

4. Mount drive partitions with the "noatime" option.  By default the
   disk is accessed everytime you open a file, even for reading or
   executing, to save the access time.  "noatime" prevents that.  Of
   course, you lose the access time information, but that's usually
   not an issue on a laptop.

5. Any system logging activity will eventually flush to disk within
   five seconds.  It doesn't matter what you have in /etc/syslog.conf.
   So try to reduce or remove any daemons that cause logging.

6. apmd itself submits logging entries as the battery discharges and
   charges.  Ironically this can cause the battery to drain faster.
   The RedHat default is for apmd to start before system logging is
   started, and thus the log entries appear on the console instead of
   the disk.  Probably best to keep it this way for battery savings,
   although you lose the permanent log of your battery activity.

7. Look for suggestions in the Battery HOWTO.  Highlights:

   * If you use emacs, you can reduce the frequency of auto-saves.

   * The suggestions for "bdflush" in /etc/inittab are now obsolete.
     These functions are now performed in the kernel, and the range of
     user-settable parameters on this behavior are small.  However,
     look into the "noflushd" package, which works around this issue
     and tries its hardest to prevent the hard disk from spinning up
     superfluously.

I have done most of these things (not the noflushd, since I'm working
on my own solution), and my laptop can stay spun down for hours when
idle.  noflushd could help that even more.  For some reason, emacs
*still* causes a *lot* of accesses which I can't explain.  I'd like to
hear any further suggestions on that.

Craig


Index: [thread] [date] [subject] [author]


Write to me! apenwarr@worldvisions.ca