power management on laptops - Portable

This is a discussion on power management on laptops - Portable ; I have a very newbie question, but I'm new to laptops after having used desktops all my life. I installed Fedora FC3 on a Compaq Evo N1020V. Now I know that power management is a fundamental issue with laptops, and ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: power management on laptops

  1. power management on laptops

    I have a very newbie question, but I'm new to laptops after having used
    desktops all my life.
    I installed Fedora FC3 on a Compaq Evo N1020V.
    Now I know that power management is a fundamental issue with laptops,
    and I see Fedora launching both a ACPI and a APM daemon at startup.
    Problem is, how do I interact with them?
    How do I tune energy saving / suspend / hybernate ... ?

    Thanks for any info

    Alessandro Magni


  2. Re: power management on laptops

    alythh@netscape.net wrote:
    > I have a very newbie question, but I'm new to laptops after having used
    > desktops all my life.
    > I installed Fedora FC3 on a Compaq Evo N1020V.
    > Now I know that power management is a fundamental issue with laptops,
    > and I see Fedora launching both a ACPI and a APM daemon at startup.
    > Problem is, how do I interact with them?
    > How do I tune energy saving / suspend / hybernate ... ?
    >
    > Thanks for any info
    >
    > Alessandro Magni
    >


    hi,

    APM is old-old-old-school power management, the reserve of Pentium II
    and socket 7 motherboards. You don't need it. You can access the power
    management features of FC (lid events) by first:

    edit /etc/grub.conf,* changing the line that reads:

    kernel /vmlinuz-xxxxxxx ro root=LABEL=/ rhgb quiet

    (where xxxxxxx is the kernel version) to:

    kernel /vmlinuz-xxxxxxx ro root=LABEL=/ rhgb quiet acpi_sleep=s3_bios

    (or whichever BIOS module you're using)

    then:

    creating the following files:

    # /etc/acpi/events/lid.conf:

    # sleep on lid close
    event=button[/]lid
    action=/etc/acpi/actions/sleep.sh

    # /etc/acpi/events/sleep.conf:

    # sleep on "sleep" key request
    event=button[/]sleep
    action=/etc/acpi/actions/sleep.sh

    # /etc/acpi/actions/sleep.sh (make this executable):

    #!/bin/sh
    echo -n mem >/sys/power/state
    /sbin/modprobe -r usb_uhci
    /sbin/modprobe -i usb_uhci
    /usr/sbin/hwclock --hctosys

    The modprobe lines reload the USB driver, which has the effect of making
    your USB mouse (if you use one) work again. You may need to add lines to
    reload the other USB drivers, if you use non-HCI devices (e.g., USB
    drives).

    The last line in sleep.sh sorts out any potential problems with the
    system clock resetting itself on resume.

    This is just a start, but all the same, it should get you started...
    HTH

    *I'm assuming you're using the GRUB bootloader. YMMV if you're using LILO.

    --
    Cheers,

    Jim

    -begin sig-
    Opinions expressed in this message may or may not be representative of
    the opinions of its author. You decide.

    Web: http://www.dotware.co.uk
    http://www.dotware-entertainment.co.uk

    Portable: P4m 2.0, 1GB, 40GB, MX440/15" XGA@1600x1200, Wi-Fi, GPRS,
    DVD/CDRW, XPSP2/Knoppix
    Powerbook G3/400, 392MB, 20GB, Rage 128/15"@1024x768, Wi-Fi, DVD, Mac OS
    X 10.4 "Tiger" Dev. Build
    Desktop: AMD64 3200+@2.63GHz, 512MB, 80GB, FX5700LE/32" WXGA@2048x768,
    DVD+-RW, XPSP1/Debian
    FileServer: Athlon XP 2400+, 256MB, 2.72TB, Blind, MuLinux

    More but I'm not tellin' ya, there's a pool forming at your feet.
    -end sig-

  3. Re: power management on laptops

    On 5 May 2005 07:40:10 -0700, alythh@netscape.net wrote:

    > I have a very newbie question, but I'm new to laptops after having used
    > desktops all my life.
    > I installed Fedora FC3 on a Compaq Evo N1020V.
    > Now I know that power management is a fundamental issue with laptops,
    > and I see Fedora launching both a ACPI and a APM daemon at startup.
    > Problem is, how do I interact with them?
    > How do I tune energy saving / suspend / hybernate ... ?
    >
    > Thanks for any info
    >
    > Alessandro Magni


    Some laptops can interact with apm like my Dell INspiron 4100 simply cannot
    do acpi. My other laptop, a thinkpad T23 does acpi and for some reason it
    cannot do apm. Confusing... On the acpi side, there are sets of scripts
    written that do various acpi events which are often placed in /etc/acpi and
    /etc/acpi/events. As an example, on my debianized laptop, I wrote a acpi
    lid handler script and an accompanying shell script that powers the laptop
    down on a lid close event. I also wrote one to suspend the laptop to ram
    with the magic keys on the thinkpad for suspend action. Perhaps FC 3
    provides a set of defaults that will work. Basically, there are many
    basics with acpi to learn You can visit acpi.sf.net and read about how
    the various interlocking parts all work (or not sometimes). APM on the
    other hand usually just works. When you close the lid, apm normally will
    issue a suspend event.

    I've normally found that I have to poke around a bit with acpi to make
    things just work. Its actually time well spent because you have a lot of
    control over many aspects of the laptop and a lot more information
    presented than apm does.

    Its worth noting that the laptop cannot run both at the same time. Some
    research on the linux on laptops website may yield appreciable results with
    how others have been successful (or not). Searches on google may also
    help.
    --
    Michael Perry | do or do not. There is no try. -Master Yoda
    mperry@lnxpowered.org | http://www.lnxpowered.org

  4. Re: power management on laptops

    Michael Perry wrote:
    > APM on the other hand usually just works.


    Life would be too beatifull if that "usually" did not really translate
    to "sometimes, it depends".

    Even if a laptop does have one or both of APM and ACPI it does not mean
    that one of these, or both as the case may be, is not horribly broken.
    I have seen various cases. These functions are supplied by BIOS and you
    are basically at a mercy of a BIOS writer. On the top of it these
    functions often turn off interrupts for very long periods and, as you
    can guess, kernel does not like that at all. Sometimes a BIOS update
    may help, if something like that is available, but cases when things got
    worse after such update are not unheard of. Linux also may have bugs,
    or workarounds which really help only with some models and turn out to
    be harmfull elsewhere, and this compounds the problem. ACPI interfaces
    are here indeed more likely candidates.

    ACPI is a complex beast and there are good chances that BIOS got it
    wrong but that does not mean that APM if fine - especially with newer
    laptops. There are laptops where one of these is rougly sane. If
    you have one of these then enjoy.

    BTW - I heard about laptops which will not even boot without an ACPI
    support turned on and these two approaches to a power managment are
    mutually exclusive.

    Michal

  5. Re: power management on laptops

    On Thu, 5 May 2005 18:21:49 +0000 (UTC), Michal Jaegermann wrote:

    > Michael Perry wrote:
    >> APM on the other hand usually just works.

    >
    > Life would be too beatifull if that "usually" did not really translate
    > to "sometimes, it depends".
    >
    > Even if a laptop does have one or both of APM and ACPI it does not mean
    > that one of these, or both as the case may be, is not horribly broken.
    > I have seen various cases. These functions are supplied by BIOS and you
    > are basically at a mercy of a BIOS writer. On the top of it these
    > functions often turn off interrupts for very long periods and, as you
    > can guess, kernel does not like that at all. Sometimes a BIOS update
    > may help, if something like that is available, but cases when things got
    > worse after such update are not unheard of. Linux also may have bugs,
    > or workarounds which really help only with some models and turn out to
    > be harmfull elsewhere, and this compounds the problem. ACPI interfaces
    > are here indeed more likely candidates.
    >
    > ACPI is a complex beast and there are good chances that BIOS got it
    > wrong but that does not mean that APM if fine - especially with newer
    > laptops. There are laptops where one of these is rougly sane. If
    > you have one of these then enjoy.
    >
    > BTW - I heard about laptops which will not even boot without an ACPI
    > support turned on and these two approaches to a power managment are
    > mutually exclusive.
    >
    > Michal


    Amen. I stand corrected. Its been my impression through some muddling use
    of acpi that a new kernel, installing a number of patches, building
    supporting tools packages for an IBM thinkpad like the ibm-acpi package to
    add hotkeys support, building suspend to disk support, understanding how
    suspend to ram works, trying to understand other concepts like cpu
    throttling, and for me at least trying to make general sense out of scores
    of data in the /proc/acpi area leaves me totally confused. It seems like
    there is a lot of information there.

    That being said, I have pretty much figured out both my laptops and their
    peculiarities. This has come about by my following those "usual"
    practices, breaking things, downloading diff patches, trying again, finding
    mailing lists or newsgroups, etc.

    Oftentimes, I get things right but its only after getting things wrong so
    many times.
    --
    Michael Perry | do or do not. There is no try. -Master Yoda
    mperry@lnxpowered.org | http://www.lnxpowered.org

+ Reply to Thread