Bug 334806

Summary: Asus M6N: no battery information
Product: [openSUSE] openSUSE 10.3 Reporter: Paolo Panto <munix9>
Component: KernelAssignee: Thomas Renninger <trenn>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: alessioballarin, forgotten_v5inq2MBSE, patrick.kling
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch vs linux-2.6.22.9-0.4
Enhanced patch with some sanity check to not break other machines
Asus M6N acpidump (BIOS 0215A)
fixed patch
fix patch again

Description Paolo Panto 2007-10-18 11:42:22 UTC
Created attachment 179209 [details]
patch vs linux-2.6.22.9-0.4

Main battery status/information is not reported: in openSUSE 10.2 there were two 
directories in /proc/acpi/battery: BAT0 and BAT1, in openSUSE 10.3 there 
is only BAT1.

kernel-default-2.6.22.9-0.4 on Asus M6N notebook (BIOS 214a).

According to http://bugzilla.kernel.org/show_bug.cgi?id=8598 I've ported a part of the patch for 2.6.23-rc1-git back to 2.6.22.9-0.4 - this solved the problem.

Is it possible to include the patch in the future releases of openSUSE 10.3 kernel packages?
Comment 2 Thomas Renninger 2007-10-24 16:41:05 UTC
Looks ok to me.
Alexey, can you double check.. the patch might even come from you?
Comment 3 Thomas Renninger 2007-10-24 16:55:03 UTC
*** Bug 331630 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Renninger 2007-10-24 16:57:45 UTC
*** Bug 333656 has been marked as a duplicate of this bug. ***
Comment 7 Forgotten User v5inq2MBSE 2007-10-24 23:05:16 UTC
Thank you Paolo Panto for this patch. Solved the problems here, too. I'm using Bios 0211A (I've problems with fan regulation in 0214A, from time to time, it's doesn't stop rotating full speed, even if the CPU is idle for ages) on a M6842NW (also M6N series) and battery state is displayed correctly now, without patching dsdt.
Comment 8 Thomas Renninger 2007-10-31 15:09:19 UTC
Alexey pointed out that this patch will:
> Problem is, it creates "chain reaction" of 8709 and 8909 bugs.
(you can check on http://bugzilla.kernel.org)

The patches to fix this up are rather big...

Alexey, do you have an idea for a litte, safe workaround/fix :)

Maybe we could blacklist those machines for 10.3 only and fallback to:

	status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
					boot_ec, NULL);

only for reported machines...

If we want to go the blacklist for 10.3 approach, could pls all affect people attach dmidecode output...
Comment 9 Alexey Starikovskiy 2007-10-31 16:13:00 UTC
please take a look at additional patch posted on both 9262 and 8598. If it still works on ASUS, it would be ideal.
Comment 10 Thomas Renninger 2007-10-31 16:50:56 UTC
Created attachment 181533 [details]
Enhanced patch with some sanity check to not break other machines

Alexey, there still was another change...
I also took this check:
	if (ACPI_FAILURE(status) || !boot_ec->handle)
which did not exist in Paolo's patch or in our 2.6.22 kernel...

I also can provide another test kernel...
Do you think this is safe enough to go in for SL103_BRANCH?
Comment 11 Alexey Starikovskiy 2007-10-31 17:33:36 UTC
I've not seen EC _INI on any other machine, so I think we limit this patch quite enough to be safe.
Comment 12 Forgotten User v5inq2MBSE 2007-11-01 15:15:00 UTC
I've tried the second patch, it doesn't work here, BAT0 is gone away again.
Comment 13 Alexey Starikovskiy 2007-11-01 21:33:55 UTC
please provide acpidump output then.
Comment 14 Paolo Panto 2007-11-01 21:57:14 UTC
The same here with the second patch; BAT0 does not exist. acpidump follows.
Comment 15 Paolo Panto 2007-11-01 22:10:34 UTC
Created attachment 181724 [details]
Asus M6N acpidump (BIOS 0215A)
Comment 16 Alexey Starikovskiy 2007-11-01 22:52:20 UTC
Created attachment 181728 [details]
fixed patch

Thanks for acpidump. Patch idea is correct, only one letter is missing :)
Please test.
Comment 17 Alexey Starikovskiy 2007-11-02 00:00:12 UTC
Created attachment 181736 [details]
fix patch again

please test.
Comment 18 Forgotten User v5inq2MBSE 2007-11-02 22:34:19 UTC
The new patch (attachment id=181736) works fine here. Battery state can be read correctly, now.
Comment 19 Paolo Panto 2007-11-03 11:03:52 UTC
dito, the last patch works fine, BAT0 is available.
Comment 20 Thomas Renninger 2007-11-04 19:44:54 UTC
It's in.
It will be available with the next kernel update (which may take a while).
Until then you may want to get an rpm from here:
ftp://ftp.suse.com/pub/projects/kernel/kotd/SL103_BRANCH/

There should soon pop up a new kernel, look out for this change:
Sun Nov  4 20:39:40 CET 2007 - trenn@suse.de

- patches.arch/acpi_ec_fix_battery.patch: Fix battery/EC issues
  on Acer and Asus laptops (334806).

in changelog, e.g. doing:
rpm -qp --changelog kernel-default...rpm |less

Thanks everybody, especially Alexey for doing the real work here...
Comment 21 Forgotten User v5inq2MBSE 2007-11-10 08:29:59 UTC
I only want to let you know, it works fine with kernel 2.6.22.12-0.1-default which was installed yesterday by the online update.