[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ACPI on E-Series Lifebook



Hi,

setting up a recent daily Sarge snapshot on this Laptop worked like a charm.
The only thing I'm missing is the folowing functionality I had with my former
Fujitsu/Siemens laptop using APM:

  - Closing the lid:
    Laptop went into suspend mode until I pressed power button.
    The harddisk stopped and the screen was switched of.  A short
    "beep beep" - notification was issued to inform the user that
    the laptop is now suspended.
  - Pressing the power button:
    Same effect as when closing the lid.

I had to press the power button to wake the box up again.

The new box work with acpi now.  It seems that APM is disabled because
the kernel log sais

   $ dmesg | grep -i apm
   apm: BIOS not found.

whatever this means.  Pragmatically I think if ACPI works who cares about APM.
But it does not really work like expected.  Closing the lid just switches of
the backlight.  I personally have the behaviour to close the lid if I want
to move to any other place so turning off harddisk and putting the laptop into
suspend mode as described above is really the functionality I want.  To accomplish
this I crated the files

  ~$ cat /etc/acpi/events/lid
  event=button/lid
  action=/etc/acpi/lid.sh

  ~$ cat /etc/acpi/lid.sh
  echo "`date`: Lid closed" >> /var/log/lid.log
  /bin/echo 1 >/proc/acpi/sleep

The echo line is just for debugging purpose.  The light of the screen is switched
of for a moment but this seems to be all what happens.  From

   linux/Documentation/power/swsusp.txt

Sleep states summary (thanx, Ducrot)
====================================

In a really perfect world:
echo 1 > /proc/acpi/sleep       # for standby
echo 2 > /proc/acpi/sleep       # for suspend to ram
echo 3 > /proc/acpi/sleep       # for suspend to ram, but with more power conservative
echo 4 > /proc/acpi/sleep       # for suspend to disk
echo 5 > /proc/acpi/sleep       # for shutdown unfriendly the system

should the laptop enter standby mode but this is hardly a standby mode.  Do
I have to define something more?

Now to the power button.  If you ask me switching of the laptop using the
power button is a stupid idea - at least for my behaviour.  I used to "wake up"
my box using this button but issuing a halt / shutdown if I want to switch it
off.  As last resort pressing the power button a longer time would switch it
of the hard way.  So I wanted to test the suspend to disk features for this
button.  For this I tried the following changes in /etc/acpi/powerbtn.sh:

     /bin/echo n >/proc/acpi/sleep

where

   n=2 (suspend to ram according to the doc quoted above)
       --> nothing happens at all (except my debugging output that the
           power button was pressed)

   n=3 (for suspend to ram, but with more power conservative)
       --> the display switches to text mode and prints out the following
           lines (I copied from syslog):

Sep  3 13:56:57 localhost kernel: PM: Preparing system for suspend
Sep  3 13:57:04 localhost kernel: Stopping tasks: =====================================================================================|
Sep  3 13:57:04 localhost kernel: PCI: Setting latency timer of device 0000:00:1d.7 to 64
Sep  3 13:57:04 localhost kernel: Could not suspend device 0000:00:1d.7: error -5
Sep  3 13:57:04 localhost kernel: ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
Sep  3 13:57:04 localhost kernel: PCI: Enabling device 0000:00:1f.5 (0000 -> 0003)
Sep  3 13:57:04 localhost kernel: ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 11 (level, low) -> IRQ 11
Sep  3 13:57:04 localhost kernel: i810_audio: Primary codec has ID 0
Sep  3 13:57:04 localhost kernel: ac97_codec: AC97 Audio codec, id: 0x8384:0x7666 (SigmaTel STAC9750T)
Sep  3 13:57:04 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Sep  3 13:57:04 localhost kernel: Restarting tasks... done
Sep  3 13:57:04 localhost sleepd[2014]: 14 sec sleep; resetting timer
Sep  3 13:57:04 localhost kernel: apm: BIOS not found.
Sep  3 13:57:04 localhost modprobe: FATAL: Error inserting apm (/lib/modules/2.6.8/kernel/arch/i386/kernel/apm.ko): No such device

       --> I guess especially the "Could not suspend..." part is critical for
           this problem and asking Google I found:

                http://lkml.org/lkml/2004/8/21/137

           with the advise:  "Its not oops. Try disabling preempt."
           (I'm currently rebuilding my kernel this way, but I feel a little
            bit sad because this option promisses enhancements for desktop
            systems which is obviousely true for a laptop ...)

           Moreover there is the advise to use tha latest kernel source 2.6.8.1.
           Can I assume that the relevant patches are contained in the Debian
           package kernel-source-2.6.8-5 or should I use upstream kernel sources?

   n=4  (Suspend to disk)
        --> seems to work fine at least even a ssh window to a differnt
            box which stayed open on the laptop and one of two ssh connections
            from another box to the laptop worked after resuming (one of
            these connections died - but well, this does not really count.
        - on the other hand the time saving effect compared to a real shutdown
          is quite low if you did not really excessive tasks (and if I do
          really excessive tasks I do not really know whether I want to trust
          suspend to disk) - but the report that this works might make
          people happy anyway.

So what do I missing:

   The functionality of closing the lid and triggering a suspend to ram
   by waking the laptop up by pressing the power button.

Any hints?

Kind regards

          Andreas.



Reply to: