battery info & fans do not work after hibernate (HP nw8240)

Bug #63123 reported by Luka Renko
44
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
linux-source-2.6.20 (Ubuntu)
Won't Fix
Medium
Ben Collins

Bug Description

Binary package hint: acpi-support

Up-to-date Edgy (but also confirmed on up-to-date Dapper)

After resume from hibernation, it looks like battery info does not get updated anymore. This is particularly problematic for battery remaining time as the machine just shuts down when batteries are flat. This problem does not occur after suspend/resume, only hibernate/resume.

I did not notice this problem on Dapper, but I can recall one case when machine shut down due to flat batteries.

Laptop info:
68DTV Ver. F.0F
BATTERY
Hewlett-Packard
HP Compaq nw8240 (PY442EA#ABB)
F.0F

When I have run "sudo pmi action hibernate" from command line, I have noticed this error messages:

FATAL: Module fan is in use.
FATAL: Module thermal is in use.
FATAL: Module acpi_sbs not found.
FATAL: Module acpi_sbs not found.

Revision history for this message
Luka Renko (lure) wrote :

Just to be clear: I have reproduced this problem on up-to-date Dapper today (I just did not noticed this problem when I was still running Dapper)

Revision history for this message
Luka Renko (lure) wrote :

Upgrade of BIOS to F.14 does not help.

Revision history for this message
Simon Law (sfllaw) wrote :

Hi Luka,

In a Terminal window, could you run:

  $ lshal -m 2>&1 | tee /tmp/lshal.log

Wait for about a minute and then hibernate and resume. Wait another minute.

Then, please attach /tmp/lshal.log to this bug report using its web page. Thanks!

Changed in acpi-support:
assignee: nobody → sfllaw
status: Unconfirmed → Needs Info
Revision history for this message
Luka Renko (lure) wrote :

Simon, not sure if this will really help, as "lshal -m" (already running before hibernate) does not report anything after resume. Anyway, I have attached the log file, where you can see all events before hibernate (I have two batteries, built-in was full, while travel was discharging and was at 49% at the time of hibernate).

I have kept it running for more than five minutes after resume and no event was reported, even though that I pressed some laptop keys (which generate hal events). When I have started lshal -m again, at least laptop key events were properly reported, but still no sign of battery status change events.

Revision history for this message
Luka Renko (lure) wrote :

I have also tried to restart hal (sudo /etc/dbus-1/event.d/20hal restart), but no success.

It is also the fact that /proc/acpi/battery/*/* does not report any change in battery state either, so I suspect this bug may be also kernel issue (unless acpi-support is not doing something it should, like reloading battery module or similar). See output of cat /proc/acpi/battery/*/* in couple of minutes (no change).

Revision history for this message
Luka Renko (lure) wrote :

Unload/reload of battery kernel module did not help either.
I have attached output of "dmesg" to have more info on the HW.

Revision history for this message
Michael Blakeley (mike+ubuntu) wrote :

I believe I'm seeing the same symptoms on an HP nc6400, bios F.05. I can't try other bios revs, since F.05 is the only rev that supports my Intel T7200 CPU.

For me, 'lshal -m' also shows no changes during hibernate and restore (aside from displaying the network devices). Please let me know if I can provide other information that would be useful.

$ uname -a
Linux mblakele-lt 2.6.17-10-generic #2 SMP Fri Oct 13 15:34:39 UTC 2006 x86_64 GNU/Linux
$ apt-show-versions hal
hal/edgy uptodate 0.5.7.1-0ubuntu17

Simon Law (sfllaw)
Changed in acpi-support:
assignee: sfllaw → nobody
importance: Undecided → Medium
status: Needs Info → Confirmed
Revision history for this message
André Cruz (andrefcruz) wrote :

I also have this problem on my HP nx6110.
I had it with Dapper and Edgy is the same.

When I do a clean boot, I can do a "tail -f /var/log/acpid" and see all the events being thrown (ac on-line, off-line, thermal events, etc)...

If I resume from hibernate none of these events show. So, the battery info does not update, the fans don't start... It's a serious issue.

Revision history for this message
Luka Renko (lure) wrote :

I just tested this on HP nw8240 with up-to-date edgy (2.6.19 kernel) and there lshal is reporting wrong state of several values after resume. I was on battery only during resume and lshal still claims that ac_adapter is present and both is_charging and is_discharging for battery were false. Not that battery level (%) was properly decreased in time.

Then I have plugged in ac_adapter for a second and removed it again and now hal is showing number properly. I suspect that HAL is not updating values after resume and need some kind of trigger to report values again.

Revision history for this message
Luka Renko (lure) wrote :

I think this bug is related to kernel issue on HP laptops, where ACPI is in strange state after resume from hibernate.

Good description about the problems involved from SuSE:
https://bugzilla.novell.com/show_bug.cgi?id=179702#c103

Two patches that seems to help are available in these two bugs:
http://bugzilla.kernel.org/show_bug.cgi?id=7570
http://bugzilla.kernel.org/show_bug.cgi?id=5534

Tim Gardner (timg-tpi)
Changed in linux-source-2.6.20:
assignee: nobody → timg-tpi
Changed in linux-source-2.6.20:
assignee: timg-tpi → ben-collins
status: Confirmed → Fix Released
Revision history for this message
Luka Renko (lure) wrote :

Re-opening as this bug is still not fixed for my HP nw8240.
I have reviewed Ubuntu git repository with upstream bugs and upstream bug http://bugzilla.kernel.org/show_bug.cgi?id=5534 is not applied to Ubuntu git yet.

Missing git commits:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5f7748cf915
58a5026ded5be93c5bf6c1ac34edf
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c0d127b5693
7c3e72c2b1819161d2f6718eee877

While investigating this further, I have found another kernel bug http://bugzilla.kernel.org/show_bug.cgi?id=5534 and this is already committed to upstream git:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=aafbcd165a2
a02e6dff173f66772b3148229ace8

I will apply this changes to my local git clone and rebuild Ubuntu packages to try this out.

Changed in linux-source-2.6.20:
status: Fix Released → Confirmed
Revision history for this message
Karianne Fog Heen (simira) wrote :

Confirmed
Fan doesn't work on hp nc 8230 after resume from hibernate on daily

Revision history for this message
Luka Renko (lure) wrote :

I have applied several patches from upstream:

Linux bug: 8110
GIT: 51e7fff1c2b763da910db3a875eac5b992df91d9

Linux bug: 7570#c14
GIT: 7292576043666ff39946dee14641fe719ba8c7e8

Linux bug: 7887
GIT: aafbcd165a2a02e6dff173f66772b3148229ace8

Linux bug: 5534
 - 1ba753acb372c2955a4843302e92e49ce82e2fea
 - 5f7748cf91558a5026ded5be93c5bf6c1ac34edf
 - c0d127b56937c3e72c2b1819161d2f6718eee877

The improvement is that AC adapter/battery is properly detected after resume and status get properly updated. Fans do not go automatically after resume, but you can get them started if you enable polling by doing:

  echo 5 | sudo tee /proc/acpi/thermal_zone/TZ1/polling_frequency

This sounds more like a workaround. :-(

Karianne: can you try on default 2.6.20-12 kernel if above workaround already works on stock ubuntu kernel?

Revision history for this message
Luka Renko (lure) wrote :

Actually, for linux bug 7887, the right (more complete) git change is in 902b236c087bf021c94cc21a2b09d928c4156c2b

Revision history for this message
Ben Collins (ben-collins) wrote :

Unfortunately, I can't use most of those commit id's because they point to merges instead of actual commits.

Changed in linux-source-2.6.20:
status: Confirmed → Needs Info
Revision history for this message
Luka Renko (lure) wrote :

With 2.6.20-14 kernel, fans started to work after resume.

I still have the problem with ac adapter/battery status after resume, but this is now limited to only the following case:
- hibernate while mains powered (AC adapter online)
- resume while only battery powered (without AC adapter)
- battery % will get decreased, but "lshal" will claim "battery.rechargeable.is_discharging = false"
- now attach AC adapter -> it is properly detected and "battery.rechargeable.is_charging = true"
- now disconnect AC adapter -> it is properly detected as "battery.rechargeable.is_discharging = true"

Not sure if we can "wake up" battery status after resume somehow...

I have tried several upstream fixes (particularly aafbcd165a2a02e6dff173f66772b3148229ace8 looked promising), but they did not help

Karianne: do fans work fr you with 2.6.20-14 kernel?

Revision history for this message
Stoanhart (stoanhart) wrote :

I am experiencing this issue on up to date feisty (2.6.20-15), on an Asus Z71V. My battery status does not change, and I also can not adjust the brightness of my screen using the hotkeys, or the gnome-power-manager applet.

While my chipset/GPU fan seems to be on when restoring from hibernate, my CPU fan does not come on when I increase the CPU load to 100%, which it obviously usually does.

I will try luka's polling frequency hack next time I hibernate, and will post my results.

Thanks

Revision history for this message
Luka Renko (lure) wrote :

Similar reports (AC adapter state not correct after resume) on Toshiba and MSI laptops (see bug 102084) and some other reports under GNOME (see bug 93761).

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this bug to the new "linux" package. However, development has already began for the upcoming Intrepid Ibex 8.10 release. It would be helpful if you could test the upcoming release and verify if this is still an issue - http://www.ubuntu.com/testing . If the issue still exists, please update this report by changing the Status of the "linux" task from "Incomplete" to "New". We appreciate your patience and understanding as we make this transition. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Luka Renko (lure) wrote :

I do not have the HW (nw8240), but will try this on newer machine (nw8440) ASAP.
Maybe other reporters can give feedback for their machines.

Revision history for this message
Luka Renko (lure) wrote :

Everything is fine on HP nw8440.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Setting this to "Fix Released" based on the decision to stick with the 2.6.27 kernel for Intrepid - https://lists.ubuntu.com/archives/kernel-team/2008-September/003107.html

Changed in linux:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.