Bug 334005

Summary: No battery detected on MSI PR200 laptop (kernel 2.6.22)
Product: [openSUSE] openSUSE 10.3 Reporter: Kevin Ottens <ervin>
Component: KernelAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jeffm, jmatejek, p.vanerk
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: acpidump from the MSI PR200 laptop
dmesg from the MSI PR200 laptop (2.6.24-rc6-git7-13-default kernel)
Enable EC region handlers before bus_scan
dmesg from the MSI PR200 laptop (2.6.22.15 patched kernel)
updated patch from bug 9627

Description Kevin Ottens 2007-10-15 17:19:38 UTC
The battery of my laptop (a MSI PR200-007) wasn't detected on openSUSE 10.3. I upgraded to the 2.6.23.1-29.1 kernel from factory and it's now detected perfectly. Backporting a fix for openSUSE 10.3 might be a good idea.

PS: And now that I upgraded, the ipw3945 device is not detected anymore. ;-)
Comment 1 Jeff Mahoney 2007-10-17 20:37:44 UTC
Was the KMP for ipw3945 installed as well? Or, does iwl3945 work instead?
Comment 2 Kevin Ottens 2007-10-19 14:38:17 UTC
Yeah, switching to iwl3945 the wifi is back, and I have the battery. But now I still have weird behavior probably tied to ACPI support. Randomly the system reports the battery empty or full while it isn't, or loose the ac power (while it's definitely plugged), etc. Basically that means I can't put any policy in kpowersave otherwise my laptop would shutdown randomly.

It *seems* to be tied to the wifi, I never experienced this when the wifi is switch off. If I switch it on it happens after some time.

Now it's obvious the kernel is acting strange ACPI wise on this laptop, but I've no idea how to verify if it's a problem in the kernel or a hardware problem with the laptop (maybe it has a buggy ACPI, I don't know).

So if you need more detailed information you'll have to help me a bit. I could provide acpidumps though but I don't know how to interpret them. Should I attach such dump? Do you need more information?
Comment 3 Stephan Kulow 2007-11-18 16:53:30 UTC
info is provided
Comment 5 Alexey Starikovskiy 2008-01-03 07:56:15 UTC
acpidump and dmesg are quite useful for any ACPI-related bug. Please provide them.
Comment 6 Kevin Ottens 2008-01-03 08:13:20 UTC
Created attachment 189106 [details]
acpidump from the MSI PR200 laptop
Comment 7 Kevin Ottens 2008-01-03 08:14:10 UTC
Created attachment 189108 [details]
dmesg from the MSI PR200 laptop (2.6.24-rc6-git7-13-default kernel)
Comment 8 Kevin Ottens 2008-01-03 08:18:59 UTC
Latest news from the front, I'm running on the kernels provided in factory for a while now. Basically what I experienced is the following:
 - 2.6.22 kernels: no battery
 - 2.6.23 kernels: I see the battery (reported twice sysfs+proc), and the information provided is unreliable (the two reported batteries are out of sync for instance, or one suddenly reports as empty, then full...)
 - 2.6.24 kernels: no battery again

So for now I'm stuck with no battery reported, which is not exactly convenient for a laptop. :-)
I hope the acpidump and dmesg will help, actually grepping for acpi and error in the dmesg shows a couple of lines which might useful.
Comment 9 Alexey Starikovskiy 2008-01-03 10:17:32 UTC
Created attachment 189134 [details]
Enable EC region handlers before bus_scan

It should fix the issue. See reference in patch header for more details.
Patch is modified to apply to opensuse 22.13 kernel.
Comment 10 Kevin Ottens 2008-01-04 14:23:56 UTC
Created attachment 189358 [details]
dmesg from the MSI PR200 laptop (2.6.22.15 patched kernel)

Unfortunately still no luck... I applied it on a 2.6.22.15 kernel using the build service (Kernel:SL103_BRANCH). I get very similar errors reported in the dmesg. I attached the new dmesg I got.
Comment 11 Alexey Starikovskiy 2008-01-08 21:26:05 UTC
Created attachment 189806 [details]
updated patch from bug 9627

Please check if this patch works better.
Comment 12 Kevin Ottens 2008-01-12 13:34:25 UTC
OK, this patch did it. I know have my battery reported. Thanks a lot, a very good step in the right direction. :-)

That said now I'm at the same point than with 2.6.23 or a patched 2.6.24 (taking the patch from http://bugzilla.kernel.org/show_bug.cgi?id=9627). That is the battery is reported, but randomly the information exposed in /proc are wrong.

When everything is fine for a fully loaded system I get:
---------------------------------------
$ cat state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      2224 mAh
present voltage:         16761 mV

$ cat info
present:                 yes
design capacity:         2400 mAh
last full capacity:      2224 mAh
battery technology:      rechargeable
design voltage:          14400 mV
design capacity warning: 0 mAh
design capacity low:     0 mAh
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
model number:            MS-1221

serial number:

battery type:            LION

OEM info:                MSI Corp.
---------------------------------------

But from time to time the values jump to something like:
---------------------------------------
$ cat state
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            2304 mA
remaining capacity:      8 mAh
present voltage:         45121 mV

$ cat info
present:                 yes
design capacity:         29449 mAh
last full capacity:      24584 mAh
battery technology:      rechargeable
design voltage:          45112 mV
design capacity warning: 0 mAh
design capacity low:     0 mAh
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
model number:            MS-1221

serial number:

battery type:            LION

OEM info:                MSI Corp.
---------------------------------------

While in both cases the system was fully loaded and plugged. If you want me to test another patch I'm around. ;-)
Comment 13 Alexey Starikovskiy 2008-01-12 19:36:54 UTC
Also known problem.
Please try patch from http://bugzilla.kernel.org/show_bug.cgi?id=9341.
Comment 14 Kevin Ottens 2008-01-21 08:49:47 UTC
Tried the patch, and I get the same effects than reported on the kernel bugzilla. The battery and the ac adapter are often reported as unplugged in /proc. But when they're reported correctly all the data about the battery seems right.

I also tried to comment out acpi_ec_burst_disable() as advised on the kernel bugzilla.

Note that I tried this patch against the 2.6.24-rc8 shipped in Kernel:HEAD.
Comment 15 Alexey Starikovskiy 2008-02-01 11:16:21 UTC
There is one more test patch at #9341, could you please try it?
Comment 16 Kevin Ottens 2008-02-01 13:59:31 UTC
Which patch do you mean? I see no new patch there since january.
Or you're asking me to test the obsoleted one?
Comment 17 Alexey Starikovskiy 2008-02-01 14:47:45 UTC
Sorry, patch is posted to #9823, comment #4.
Comment 18 Vincent Untz 2008-02-20 10:27:16 UTC
*** Bug 352013 has been marked as a duplicate of this bug. ***
Comment 19 Christoph Thiel 2008-04-25 14:32:26 UTC
Closing NOREPSONSE, due to missing information for more than 21 days. Please 
feel free to reopen and provide the requested information.
Comment 20 Jan Matejek 2008-06-13 15:26:32 UTC
reopening as this problem persists in latest Factory (kernel-default-2.6.25.5-1.1)

what exactly are the missing information? is the mentioned patch still valid for this kernel?
Comment 21 Paul van Erk 2008-08-20 09:31:45 UTC
Is this also an issue on openSUSE 11? I guess so, if it's a kernel problem. I have 2 days to decide if we buy this thing. Is it worth it, even with battery problems?
Comment 22 Jan Matejek 2008-08-21 12:05:30 UTC
yes, the problem was present in openSUSE 11, but is reportedly fixed in the upcoming 2.6.27 kernel (see related bug on ubuntu [1] and kernel bugzilla [2]), so i would think that the fix will make it into 11.1.

Suspend/resume (both RAM and on-disk) doesn't work, too. It is possible that the issue is already fixed in new kernels, i didn't test anything beyond Factory kernel from June (mentioned kernel-default-2.6.25.5-1.1) yet.

Apart from that, i didn't run into any major problem and i'm using this machine as my primary notebook with ubuntu and openSUSE since christmas.

[1] https://bugs.launchpad.net/ubuntu/+source/acpi/+bug/147560
[2] http://bugzilla.kernel.org/show_bug.cgi?id=9823
Comment 23 Paul van Erk 2008-08-21 13:26:17 UTC
Great news. Sounds like I'll take the plunge. Or rather, my wife will, since it will be her laptop. :) I'll just need to make it dual boot (also for warranty purposes), I guess. :)
Comment 25 Jan Matejek 2010-09-09 18:18:53 UTC
this works now