On 23:19 Thu 06 Mar 2008, Tomas Carnecky wrote:
> Ganesha Bhaskara wrote:
> > Tomas Carnecky wrote:
> >> .. there are none!
> >>
> >> According to powertop my X61 laptop runs for >5 hours when on a full
> >> battery (if I lower the brightness all the way to the lowest value,
> >> disable wireless/bluetooth, no xserver running, only console etc).
> >> Today at 1:30pm I closed the lid of the laptop, causing it to go into
> >> suspend to ram.
> > Did you confirm this ? ..... I suspect your X61 did not suspend to ram.
> > On my laptop, that is a light that starts blinking when the computer is
> > suspended.
> > There must be something on your X61 that indicates the same. Also try to
> > suspend the computer with the lid open to check if suspend is working
> > correctly.
> >> Then I forgot about the laptop and at about 19:00pm I
> >> wanted to do something with my laptop so I got it and saw that it was
> >> down, battery completely empty! The laptop was still warm,
> > Again indicates suspend was not successful.
>
> When I close the lid or press Fn+F4 (that is the sleep shortcut on
> thinkpads), this script is executed:
>
> #!/bin/sh
>
> # if launched through a lid event and lid is open, do nothing
> echo "$1" | grep "button/lid" && grep -q open
> /proc/acpi/button/lid/LID/state && exit 0
>
> echo "7 blink" > /proc/acpi/ibm/led
>
> sync
> echo mem > /sys/power/state
>
>
> Obviously it's difficult to test whether the laptop went into sleep when
> I close the lid -.-
>
> Maybe there's something wrong with that script logic or the my kernel
> (.25-rc3). But thanks for the heads up that the laptop should last much
> longer.
.25-rc3 has a problem with IBM Thinkpad lid and ACPI switches. I don't
know if the attached patch has hit Git but try it out, it fixed my lid
switch issues.
BTW, you can tell that a X6* Thinkpad has gone to sleep by the little
moon icon that lights up on the lid.
Cheers,
Brandon
ACPI: EC: fix regression
From: Alexey Starikovskiy <[EMAIL PROTECTED]>
---
drivers/acpi/ec.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index caf873c..d6f9956 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -129,7 +129,8 @@ static struct acpi_ec {
struct mutex lock;
wait_queue_head_t wait;
struct list_head list;
- u8 handlers_installed;
+ u8 handlers_installed:1;
+ u8 from_ecdt:1;
} *boot_ec, *first_ec;
/* --------------------------------------------------------------------------
@@ -772,16 +773,18 @@ static int acpi_ec_add(struct acpi_device *device)
/* Check for boot EC */
if (boot_ec) {
- if (boot_ec->handle == device->handle) {
- /* Pre-loaded EC from DSDT, just move pointer */
- ec = boot_ec;
- boot_ec = NULL;
- goto end;
- } else if (boot_ec->handle == ACPI_ROOT_OBJECT) {
+ if (boot_ec->from_ecdt &&
+ (boot_ec->handle == device->handle ||
+ boot_ec->handle == ACPI_ROOT_OBJECT)) {
/* ECDT-based EC, time to shut it down */
ec_remove_handlers(boot_ec);
kfree(boot_ec);
first_ec = boot_ec = NULL;
+ } else if (boot_ec->handle == device->handle) {
+ /* Pre-loaded EC from DSDT, just move pointer */
+ ec = boot_ec;
+ boot_ec = NULL;
+ goto end;
}
}
@@ -943,6 +946,7 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec->command_addr = ecdt_ptr->control.address;
boot_ec->data_addr = ecdt_ptr->data.address;
boot_ec->gpe = ecdt_ptr->gpe;
+ boot_ec->from_ecdt = 1;
if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
&boot_ec->handle))) {
pr_info("Failed to locate handle for boot EC\n");
_______________________________________________
Discuss mailing list
[email protected]
http://mail.lesswatts.org/mailman/listinfo/discuss