Bug 4980 - *.events blocked unless ec_burst=1
*.events blocked unless ec_burst=1
Status: CLOSED CODE_FIX
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake
i386 Linux
: P2 high
Assigned To: Luming Yu
:
: 4535 5713 (view as bug list)
Depends on:
Blocks: 4506 5028
  Show dependency treegraph
 
Reported: 2005-08-01 10:05 UTC by Oleksij Rempel (fishor)
Modified: 2008-01-24 23:16 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.13-rc6
Tree: Mainline
Regression: ---


Attachments
kernel config (40.73 KB, text/plain)
2005-08-01 11:20 UTC, Oleksij Rempel (fishor)
Details
dmesg 2.6.13-rc4-mm1 (14.12 KB, text/plain)
2005-08-01 11:21 UTC, Oleksij Rempel (fishor)
Details
lspci (5.26 KB, text/plain)
2005-08-01 11:23 UTC, Oleksij Rempel (fishor)
Details
dsdt (19.62 KB, text/plain)
2005-08-01 11:24 UTC, Oleksij Rempel (fishor)
Details
dmesg-git 2005.08.09 (14.99 KB, text/plain)
2005-08-09 01:59 UTC, Oleksij Rempel (fishor)
Details
dmesg-2.6.13+patch+ec_burst=0 (11.68 KB, text/plain)
2005-09-05 22:10 UTC, Oleksij Rempel (fishor)
Details
dmesg-2.6.13+patch+ec_burst=1 (11.68 KB, text/plain)
2005-09-05 22:10 UTC, Oleksij Rempel (fishor)
Details
dmesg-2.6.14-rc1-mm1 (12.39 KB, text/plain)
2005-09-18 00:24 UTC, Oleksij Rempel (fishor)
Details
acpidump (92.05 KB, text/plain)
2005-09-18 00:36 UTC, Oleksij Rempel (fishor)
Details
dmesg+debug_patch (14.91 KB, text/plain)
2005-09-20 23:08 UTC, Oleksij Rempel (fishor)
Details
script output 2.6.14-rc1 ec_burst=1 (3.29 KB, text/plain)
2005-09-20 23:09 UTC, Oleksij Rempel (fishor)
Details
script output 2.6.13 ec_burst=1 (2.53 KB, text/plain)
2005-09-21 10:55 UTC, Oleksij Rempel (fishor)
Details
dmesg 2.6.13+debug_patch (14.97 KB, text/plain)
2005-09-21 10:55 UTC, Oleksij Rempel (fishor)
Details
against 2.6.14-rc1 (453 bytes, patch)
2005-09-21 20:49 UTC, Luming Yu
Details | Diff
script output 2.6.14-rc1-mm1 ec_burst=1 (1.46 KB, text/plain)
2005-09-21 22:49 UTC, Oleksij Rempel (fishor)
Details
dmesg 2.6.14-rc1-mm1+debug_patch (14.22 KB, text/plain)
2005-09-21 22:49 UTC, Oleksij Rempel (fishor)
Details
dmesg 2.6.14-rc1+debug_patch+last_patch (14.93 KB, text/plain)
2005-09-22 00:30 UTC, Oleksij Rempel (fishor)
Details
patch against 2.6.14-rc1 (566 bytes, patch)
2005-09-22 01:11 UTC, Luming Yu
Details | Diff
dmesg 2.6.13+debug_patch+update_patch (14.93 KB, text/plain)
2005-09-22 06:37 UTC, Oleksij Rempel (fishor)
Details
debug batt output (14.63 KB, text/plain)
2005-09-22 22:31 UTC, Oleksij Rempel (fishor)
Details
latest patch against 2.6.14-rc1 (882 bytes, patch)
2005-09-23 00:04 UTC, Luming Yu
Details | Diff
patch-take-2 against 2.6.14-rc1 (1.26 KB, patch)
2005-09-23 08:50 UTC, Luming Yu
Details | Diff
dmesg 2.6.14-rc1+debug_patch+last_patch (14.68 KB, text/plain)
2005-09-23 23:23 UTC, Oleksij Rempel (fishor)
Details
patch-take-2 against 2.6.14-rc1 (1.83 KB, patch)
2005-09-24 07:55 UTC, Luming Yu
Details | Diff
dmesg 2.6.14-rc1+debug_patch+last_patch3 (14.59 KB, text/plain)
2005-09-24 09:54 UTC, Oleksij Rempel (fishor)
Details
patch-take-4 against 2.6.14-rc1 (2.67 KB, patch)
2005-09-25 03:39 UTC, Luming Yu
Details | Diff
dmesg-2.6.14-rc1+patch4 (14.73 KB, text/plain)
2005-09-27 00:43 UTC, Oleksij Rempel (fishor)
Details
cleanup version of patch-take-4 (2.60 KB, patch)
2005-09-27 19:28 UTC, Luming Yu
Details | Diff

Description Oleksij Rempel (fishor) 2005-08-01 10:05:59 UTC
Distribution:ubuntu 5.04    
Hardware Environment:laptop nv5000    
Software Environment:kernel2.6.13-rc4-mm1+acpi    
Problem Description:   
computer frees on entering mem sleep.
Comment 1 Adrian Bunk 2005-08-01 10:25:49 UTC
Some additional information would be helpful, e.g.:
- are there any messages or anything else that would give a hint about the cause
of the problem?
- your .config
- the output of "dmesg -s 1000000"
Comment 2 Oleksij Rempel (fishor) 2005-08-01 11:20:11 UTC
OK :-)  
With kernel 2.6.13-rc4 i get:  
  
PM: Preparing system for mem sleep  
Stopping tasks:  
=========================================================================|  
usb 1-2.3: usb suspend  
usb 1-2.1: usb suspend  
usb 1-2: usb suspend  
uhci_hcd 0000:00:07.2: suspend_rh  
usb usb1: usb suspend  
uhci_hcd 0000:00:07.2: uhci_suspend  
uhci_hcd 0000:00:07.2: --> PCI D0/legacy  
PM: Entering mem sleep  
//////////////////////end/////////////////////////////  
  
with 2.6.13-rc4-mm1  
some thing like this (i cant get dmesg for this):  
  
PM: Preparing system for mem sleep  
Stopping tasks:  
=========================================================================|  
usb 1-2.3: no poweroff yet, suspend insteat  
usb 1-2.1: no poweroff yet, suspend insteat  
usb 1-2: no poweroff yet, suspend insteat  
uhci_hcd 0000:00:07.2: suspend_rh  
acpi can't get interrupt ... bla bla 
uhci_hcd 0000:00:07.2: no poweroff yet, suspend insteat 
  
Comment 3 Oleksij Rempel (fishor) 2005-08-01 11:20:57 UTC
Created attachment 5458 [details]
kernel config
Comment 4 Oleksij Rempel (fishor) 2005-08-01 11:21:40 UTC
Created attachment 5459 [details]
dmesg 2.6.13-rc4-mm1
Comment 5 Oleksij Rempel (fishor) 2005-08-01 11:23:12 UTC
Created attachment 5460 [details]
lspci
Comment 6 Oleksij Rempel (fishor) 2005-08-01 11:24:11 UTC
Created attachment 5461 [details]
dsdt
Comment 7 Oleksij Rempel (fishor) 2005-08-02 10:51:49 UTC
Kernel 2.6.13-rc5 tested. Still can't get mem sleep. Now it's looks like:  
  
usb 1-2.3: usb suspend    
usb 1-2.1: usb suspend    
usb 1-2: usb suspend    
acpi cannot get interup for device 0000:00:0c.0  
acpi cannot get interup for device 0000:00:0d.0  
usb usb1: usb suspend    
 
and freez! 
    
Comment 8 Len Brown 2005-08-04 23:28:00 UTC
0000:00:0c.0 Multimedia audio controller: ESS Technology ES1988 Allegro-1 (rev 
12)
0000:00:0d.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] 
(rev 0c)


This is probably related to the PCI Interrupt Link suspend/resume changes.
We changed that code after 2.6.13-rc5, so if you can test the latest linus
git-tree, or -rc6 when that appears, it would be great.
Comment 9 Oleksij Rempel (fishor) 2005-08-05 05:25:09 UTC
OK!I tested latest linus git-tree. It's can s3 suspens and resume but now: 
sleep button don't working and  
 
$ cat /proc/acpi/battery/BAT0/info 
present:                 no 
 
they are pluget! 
Comment 10 Oleksij Rempel (fishor) 2005-08-08 06:26:26 UTC
with kernel 2.6.13-rc5-mm1 all working properly. 
Comment 11 Shaohua 2005-08-08 17:48:42 UTC
Thanks for reporting back, I guess latest Linus's git tree also fixes the 
issue, right?
Comment 12 Oleksij Rempel (fishor) 2005-08-09 01:57:12 UTC
I tested latest git. It's can suspend and resume but after resume it's lost 
battery. Before suspend battery wose present. 
Comment 13 Oleksij Rempel (fishor) 2005-08-09 01:59:08 UTC
Created attachment 5558 [details]
dmesg-git 2005.08.09
Comment 14 Shaohua 2005-08-09 02:05:05 UTC
How about unload battery driver and load it after resume?
Did the system ever fully work before?
Comment 15 Oleksij Rempel (fishor) 2005-08-09 02:28:23 UTC
I never compile it like a module. But i will try :-) 
 
Comment 16 Oleksij Rempel (fishor) 2005-08-09 02:44:29 UTC
> Did the system ever fully work before?  
Yes. If you mean suspend, resume and battery. I thin with kernel 2.6.13-rc1-mm1 
Comment 17 Oleksij Rempel (fishor) 2005-08-09 02:47:55 UTC
With WinXp all this futures and some more working wery good :-( 
Comment 18 Oleksij Rempel (fishor) 2005-08-09 04:12:55 UTC
I tryed to unload battery module and load it agen after resume.It schow battery 
as present but wrong batt_info and all acpi events blocked (Power and sleep 
button not worked). 
Here is /proc/acpi/battery/info output: 
This is OK. 
///////////////////begin//////////////// 
present:                 yes 
design capacity:         3800 mAh 
last full capacity:      3248 mAh 
battery technology:      rechargeable 
design voltage:          7400 mV 
design capacity warning: 330 mAh 
design capacity low:     99 mAh 
capacity granularity 1:  16 mAh 
capacity granularity 2:  16 mAh 
model number: 
serial number: 
battery type:            LION 
OEM info:                Samsung 
////////////////////end//////////////////// 
 
this is after resume it's wrong 
/////////////////begine/////////////// 
present:                 yes 
design capacity:         972800 mAh 
last full capacity:      831488 mAh 
battery technology:      unknown 
design voltage:          1894400 mV 
design capacity warning: 84480 mAh 
design capacity low:     25344 mAh 
capacity granularity 1:  4096 mAh 
capacity granularity 2:  4096 mAh 
model number: 
serial number: 
battery type:            LION 
OEM info:                Samsung 
////////////////end/////////////////////// 
Comment 19 Shaohua 2005-08-09 18:39:59 UTC
Might be an EC issue. Did other ACPI devices like AC adapter which uses EC 
also work (state is ok) after resume? Please make sure your kernel version is 
using polling mode ec driver (2.6.13-rc6 has it).
Comment 20 Oleksij Rempel (fishor) 2005-08-10 00:13:25 UTC
I use git three it's using polling mode   
  
> ec.c    
> static int acpi_ec_polling_mode = EC_POLLING;   
  
if it's correct, i use this to update git-kernel:  
> cd linux-2.6  
> rsync -a --verbose --stats --progress \  
>   rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/ \  
>   .git/  
  
After resume ac-adapter show online, power and sleep buttons are working. But  
if i change it to offline it will newer go back, power and sleep buttons not 
working eny more. 
 
All this looks like Bug#: 4506 wich was fixed with kernel 2.6.13-rc1-mm1 
Comment 21 Oleksij Rempel (fishor) 2005-08-10 03:07:27 UTC
Tested. With ec_burst=1 boot option all ewents working properly.
Comment 22 Len Brown 2005-08-11 22:42:50 UTC
Please summarize what is failing in the latest Linus tree,
and if it a regression compared to an earlier release such
as 2.6.12, or if it is something that has never worked.

If the behaviuor is different in the latest -mm, that is
always useful to know, but we can close a bug only when
the fix has shipped in Linus' tree.
Comment 23 Oleksij Rempel (fishor) 2005-08-12 00:00:29 UTC
kernel:       |2.6.12.3|2.6.13-rc6|2.6.13-rc6+ec_burst=1 
power_btn     |work.   |block.if  |work 
sleep_btn     |work.   |block.if  |work 
batt_info     |wrong   |real.if   |work 
suspen_resume |work.   |work.     |work 
Comment 24 Len Brown 2005-09-02 23:15:07 UTC
2.6.13 results are the same as 2.6.13-rc6, yes?

Good to know that ec_burst=1 fixes everything in 2.6.13.
But it is a regression that 2.6.13 requires the ec_burst=1
parameter when 2.6.12 did not, yes?

Does 2.6.13 work with ec_burst=0 if the latest patch
in bug 3851 is applied?
Comment 25 Oleksij Rempel (fishor) 2005-09-04 02:56:59 UTC
This patch is ready in stable 2.6.13. May be you mean other patch. Plese give me
direct link.
Comment 26 Luming Yu 2005-09-04 19:34:51 UTC
the released 2.6.13 doesn't have latest ec patch filed at bug 3851. 
It would be great if you can test them to see if it works too. 
 
Another point is if ec_burst=1 fix a real bug, not a regression that leaked 
into base kerne before. 
Comment 27 Luming Yu 2005-09-04 19:55:42 UTC
*** Bug 4535 has been marked as a duplicate of this bug. ***
Comment 28 Oleksij Rempel (fishor) 2005-09-05 13:51:15 UTC
I tested kernel 2.6.13+patch result negative. For example after disconecting
ac_adapter batt_info show proper info but not worked after ac wose connectet
agene. Actually not battareys only, power and sleep battons not working too.
Comment 29 Luming Yu 2005-09-05 18:40:44 UTC
Did you supply boot option ec_burst=1?
If yes, please post dmesg. 
Comment 30 Oleksij Rempel (fishor) 2005-09-05 22:09:45 UTC
No i tested with ec_burst=0. But today i tested with ec_burst=1 ang get worst
result alredy after boot nothing worked (i mean batt. & buttons)
Comment 31 Oleksij Rempel (fishor) 2005-09-05 22:10:23 UTC
Created attachment 5912 [details]
dmesg-2.6.13+patch+ec_burst=0
Comment 32 Oleksij Rempel (fishor) 2005-09-05 22:10:49 UTC
Created attachment 5913 [details]
dmesg-2.6.13+patch+ec_burst=1
Comment 33 Luming Yu 2005-09-05 22:45:14 UTC
very strange!!! 
 
You have ever said everything works with 2.6.13-rc6+ec_burst=1  
 
So, please verfy if 2.6.13-rc6 works with patch at 
http://bugzilla.kernel.org/show_bug.cgi?id=3851#c73. 
 
 
Comment 34 Oleksij Rempel (fishor) 2005-09-05 23:09:20 UTC
With this patch it's never worked. I tested this patch for about one month and
it didn't worked. I wrote it you! Is some thing chenged in this time with this
patch ore Kerenl? Kernel 2.6.13+ec_burst=1 stil the beste what i have on this
laptop. 
Comment 35 Luming Yu 2005-09-05 23:22:53 UTC
Ok, please post /proc/interrupt before and after cat battery info. 
 
According to comment#c73, 2.6.13-rc6 works. Please retest it . 
Comment 36 Luming Yu 2005-09-05 23:24:47 UTC
Sorry, I quoted wrong number. It should be comment #23 
Comment 37 Oleksij Rempel (fishor) 2005-09-14 06:52:19 UTC
Interrupts with 2.6.13-rc6 no ec_burst=1.
====================Before sleep=============================
           CPU0
  0:    1230652          XT-PIC  timer
  1:        193          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  7:          0          XT-PIC  parport0
  8:          4          XT-PIC  rtc
  9:        340          XT-PIC  acpi
 10:      53603          XT-PIC  uhci_hcd:usb1, Allegro
 11:       2331          XT-PIC  yenta, eth0
 12:        110          XT-PIC  i8042
 14:      24268          XT-PIC  ide0
 15:      19158          XT-PIC  ide1
NMI:          0
ERR:          0
========================After sleep================
           CPU0
  0:    1292307          XT-PIC  timer
  1:        243          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  7:          0          XT-PIC  parport0
  8:          4          XT-PIC  rtc
  9:        375          XT-PIC  acpi
 10:      60437          XT-PIC  Allegro, uhci_hcd:usb1
 11:       2383          XT-PIC  yenta, eth0
 12:        274          XT-PIC  i8042
 14:      25128          XT-PIC  ide0
 15:      20083          XT-PIC  ide1
NMI:          0
ERR:          0
Comment 38 Luming Yu 2005-09-16 02:08:42 UTC
Please test linux-2.6.14-rc1  with ec_burst=0 and ec_burst=1. 
If you find any issue, please cat and post /proc/interrupts before and after 
that test. 
 
 
Comment 39 Oleksij Rempel (fishor) 2005-09-16 23:24:03 UTC
kernel:       |2.6.14-rc1|2.6.14-rc1|2.6.13    |2.6.13
boot_opt:     |ec_burst=0|ec_burts=1|ec_burst=0|ec_burst=1|
after-        |boot|sleep|boot|sleep|boot|sleep|boot|sleep|
power_btn     |ok  |no   |no  |no   |ok  |no   |ok  |ok   |
sleep_btn     |ok  |no   |no  |no   |ok  |no   |ok  |ok   |
batt          |ok  |no   |no  |no   |ok  |no   |ok  |ok   |
ac_adapter    |ok  |no   |ok  |ok   |ok  |no   |ok  |ok   |
suspen_resume |ok  |ok   |ok  |ok   |ok  |ok   |ok  |ok   |

kernel 2.6.14-rc1 with ec_burst=0 schow the same result as 2.6.13 with same boot
option. WIth ec_burst=1 2.6.14-rc1 schow worst result. /proc/interrupts are
alwey same as in Comment #37 . 2.6.14-rc1-mm1 not tested.
Comment 40 Luming Yu 2005-09-17 06:55:01 UTC
I'm surprised by the results of the worst 2.6.14-rc1 ec_burst=1 result.
Please build kernel with acpi debug option enabled , and post dmesg of 2.6.14-
rc1 ec_burst=1. It is very important to cat and post /proc/interrupts before 
and after query battery info, because ec_burst=1 is pure interrupt based. I 
want to make sure if acpi interrupt gets increment when you query battery info.
Comment 41 Luming Yu 2005-09-17 07:00:28 UTC
Please also post acpidump output.
Comment 42 Oleksij Rempel (fishor) 2005-09-18 00:23:20 UTC
I disabled acpid and xorg to preserv battery cheking and the kernel was kompiled
with acpi-debug. The ac and battery modules was kompiled as modules and loaded
after boot.Here is the interrupt output before modprobe & cat and after.
           CPU0
  0:      76383          XT-PIC  timer
  1:         91          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  7:          0          XT-PIC  parport0
  8:          4          XT-PIC  rtc
  9:        143          XT-PIC  acpi
 10:        190          XT-PIC  uhci_hcd:usb1, Allegro
 11:         88          XT-PIC  yenta, eth0
 12:       1964          XT-PIC  i8042
 14:       2234          XT-PIC  ide0
 15:        758          XT-PIC  ide1
NMI:          0
ERR:          0
           CPU0
  0:     145314          XT-PIC  timer
  1:        328          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  7:          0          XT-PIC  parport0
  8:          4          XT-PIC  rtc
  9:        180          XT-PIC  acpi
 10:        190          XT-PIC  uhci_hcd:usb1, Allegro
 11:        128          XT-PIC  yenta, eth0
 12:       3134          XT-PIC  i8042
 14:       2286          XT-PIC  ide0
 15:       1846          XT-PIC  ide1
NMI:          0
ERR:          0
Comment 43 Oleksij Rempel (fishor) 2005-09-18 00:24:12 UTC
Created attachment 6052 [details]
dmesg-2.6.14-rc1-mm1
Comment 44 Oleksij Rempel (fishor) 2005-09-18 00:24:58 UTC
Comment on attachment 6052 [details]
dmesg-2.6.14-rc1-mm1

ec_burst=1
Comment 45 Oleksij Rempel (fishor) 2005-09-18 00:36:07 UTC
Created attachment 6053 [details]
acpidump
Comment 46 Luming Yu 2005-09-18 07:08:59 UTC
From the log, Battery 0 is absent.

Thanks for these info. Could you confirm ACPI interrupt can get increased by 
pressing power button before and after loading battery module? I suspect this 
is a irq issue rather than ec driver issue. 


Comment 47 Oleksij Rempel (fishor) 2005-09-18 12:20:34 UTC
I'm sorry i didn't anderstood what do you meen. Please sey primitiv what i need
to do :)
Comment 48 Luming Yu 2005-09-18 18:35:57 UTC
1. boot kernel linux-2.6.14-rc1 with ec_burst=1 .
2. login
3. kill acpid 
4. cat /proc/interrupts
5. press power button
6. cat /proc/interrupts
7. load battery module
8. cat /proc/interrupts
9. press power button
10. cat /proc/interrupts
11. run dmesg , and post dmesg output.
Comment 49 Luming Yu 2005-09-20 19:20:25 UTC
Hi Alexey,

Could you repost the testing results. I cannot access them.

Thanks,
Luming
Comment 50 Oleksij Rempel (fishor) 2005-09-20 23:08:58 UTC
Created attachment 6065 [details]
dmesg+debug_patch
Comment 51 Oleksij Rempel (fishor) 2005-09-20 23:09:33 UTC
Created attachment 6066 [details]
script output 2.6.14-rc1 ec_burst=1
Comment 52 Luming Yu 2005-09-20 23:37:11 UTC
The above logs show battery status works with 2.6.14-rc1 burst=1. But your 
previous reports clearly show battery is not present with 2.6.14-rc1 burst=1. 
I don't know why.  
 
Comment 53 Oleksij Rempel (fishor) 2005-09-20 23:44:10 UTC
This is complitly wrong status. 
I mean no as not OK. Bat it's looks like bead idea. I will write wrong insteat. 
Sorry.
Comment 54 Luming Yu 2005-09-21 00:14:47 UTC
what do you mean? 
 
Do you mean the battery info is wrong? 
Or do you mean the battery shouldn't be present? 
 
From the ec access log, ec driver looks fine. 
Could you reproduce the issue of baterry-not-present, and post the log. 
 
Thanks very much.  
 
Comment 55 Oleksij Rempel (fishor) 2005-09-21 00:41:20 UTC
The battery output is wrong like Comment #18 . baterry-not-present is kernel
2.6.14-rc1-mm1's issue. 
Comment 56 Luming Yu 2005-09-21 00:55:30 UTC
Oh, I didn't notice that. 
 
Could you apply that debugging patch against 2.6.13. I suppose it should work. 
Please do same test as 2.6.14-rc1 and  post the log. 
 
I want to see what's the difference in accessing ec. 
 
Comment 57 Oleksij Rempel (fishor) 2005-09-21 10:55:01 UTC
Created attachment 6078 [details]
script output 2.6.13 ec_burst=1
Comment 58 Oleksij Rempel (fishor) 2005-09-21 10:55:59 UTC
Created attachment 6079 [details]
dmesg 2.6.13+debug_patch
Comment 59 Luming Yu 2005-09-21 20:49:19 UTC
Created attachment 6083 [details]
against 2.6.14-rc1

From the log, I found some difference in ec reading like:
2.6.14-rc1:  (Wrong!)
read [00] from address[88]
read [d8] from address[89]
read [0e] from address[8a]
2.6.13: (correct)
read [d8] from address[88]
read [0e] from address[89]
read [00] from address[8a]

I suspect acpi_ec_burst_wait return too soon before data ready in ec output
data buffer.
Comment 60 Luming Yu 2005-09-21 20:52:10 UTC
Please test patch at 
http://bugzilla.kernel.org/attachment.cgi?id=6083&action=view
Comment 61 Oleksij Rempel (fishor) 2005-09-21 22:49:04 UTC
Created attachment 6084 [details]
script output 2.6.14-rc1-mm1 ec_burst=1
Comment 62 Oleksij Rempel (fishor) 2005-09-21 22:49:49 UTC
Created attachment 6085 [details]
dmesg 2.6.14-rc1-mm1+debug_patch
Comment 63 Luming Yu 2005-09-21 22:56:16 UTC
I'm not sure what could cause battery absent issue in 2.6.14-rc1-mm1. 
But 2.6.14-rc1 issue should be resolved first. 
So, please patch the following patch against 2.6.14-rc1 
http://bugzilla.kernel.org/attachment.cgi?id=6083&action=view 
 
And see if battery status can work as expected. 
 
Thanks very much. 
Comment 64 Oleksij Rempel (fishor) 2005-09-21 23:12:22 UTC
About in two hours it will be ready.
Comment 65 Oleksij Rempel (fishor) 2005-09-22 00:30:57 UTC
Created attachment 6086 [details]
dmesg 2.6.14-rc1+debug_patch+last_patch

Batt info is correct!
Comment 66 Luming Yu 2005-09-22 01:11:05 UTC
Created attachment 6087 [details]
patch against 2.6.14-rc1

This is update one. Please test it.
If it do solve your problem, I will push the patch to Len.
Comment 67 Oleksij Rempel (fishor) 2005-09-22 06:36:37 UTC
It's working but some times it schow strang walue:
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3312 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      9440496 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3312 mAh
present voltage:         8192 mV
Comment 68 Oleksij Rempel (fishor) 2005-09-22 06:37:58 UTC
Created attachment 6089 [details]
dmesg 2.6.13+debug_patch+update_patch

It's working.
Comment 69 Luming Yu 2005-09-22 09:05:04 UTC
Please post log for 2.6.14-rc1+debug_patch+update_patch when battery behaves 
correct and wrong. I want to understand the difference in ec reading.

Does that update_patch fix battery-absent issue for 2.6.14-rc1-mm1?
Comment 70 Oleksij Rempel (fishor) 2005-09-22 13:28:59 UTC
correct
Sep 22 22:03:07 localhost kernel: Read [f0] from address [bc]
Sep 22 22:03:07 localhost kernel: Read [0c] from address [bd]
Sep 22 22:03:07 localhost kernel: Read [00] from address [be]
Sep 22 22:03:07 localhost kernel: Read [00] from address [bf]
wrong
Sep 22 22:03:08 localhost kernel: Read [f0] from address [bc]
Sep 22 22:03:08 localhost kernel: Read [0c] from address [bd]
Sep 22 22:03:08 localhost kernel: Read [90] from address [be]
Sep 22 22:03:08 localhost kernel: Read [00] from address [bf]

correct
root@lopi:/home/lex# echo "cat batt info" >> /var/log/kern.log && cat
/proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3312 mAh
present voltage:         8192 mV

wrong
root@lopi:/home/lex# echo "cat batt info" >> /var/log/kern.log && cat
/proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      9440496 mAh
present voltage:         8192 mV
Comment 71 Oleksij Rempel (fishor) 2005-09-22 13:33:07 UTC
wrong
Sep 22 22:29:42 localhost kernel: Read [f0] from address [bc]
Sep 22 22:29:42 localhost kernel: Read [0c] from address [bd]
Sep 22 22:29:42 localhost kernel: Read [00] from address [be]
Sep 22 22:29:42 localhost kernel: Read [90] from address [bf]

present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      -1879044880 mAh
present voltage:         8192 mV

and this is wrong too
Sep 22 22:31:29 localhost kernel: Read [f0] from address [bc]
Sep 22 22:31:29 localhost kernel: Read [90] from address [bd]
Sep 22 22:31:29 localhost kernel: Read [00] from address [be]
Sep 22 22:31:29 localhost kernel: Read [00] from address [bf]

wrong
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      37104 mAh
present voltage:         8192 mV

Comment 72 Luming Yu 2005-09-22 19:59:31 UTC
Please  do: 
boot 2.6.14-rc1+debug_patch+update_patch 
echo -n 0x10 > /proc/acpi/debug_layer 
echo -n 0x10 > /proc/acpi/debug_level 
Keep testing battery status until wrong, Then Please post full log. 
 
I suspect the OBF bit is always 1 on your laptop's  EC controller. 
Could you confirm MS windows works well? 
 
 
Comment 73 Oleksij Rempel (fishor) 2005-09-22 22:26:14 UTC
Yes Ms Windows working well without any extra firmware from manufacture. I can
make some screenschot if you need. I tested kernel 2.6.14-rc1-mm1 with update
patch  - it's working :) . 
Comment 74 Oleksij Rempel (fishor) 2005-09-22 22:31:11 UTC
Created attachment 6106 [details]
debug batt output

present:		 yes
capacity state: 	 ok
charging state: 	 charged
present rate:		 0 mA
remaining capacity:	 3296 mAh
present voltage:	 8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:		 yes
capacity state: 	 ok
charging state: 	 charged
present rate:		 0 mA
remaining capacity:	 -1879044896 mAh
present voltage:	 8192 mV
//////////////////////////////////////////////////////This is last one
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:		 yes
capacity state: 	 ok
charging state: 	 charged
present rate:		 0 mA
remaining capacity:	 3296 mAh
present voltage:	 8192 mV
I maked one shot more
Comment 75 Luming Yu 2005-09-23 00:04:46 UTC
Created attachment 6109 [details]
latest patch against 2.6.14-rc1

Please test the latest patch against 2.6.14-rc1.
Comment 76 Oleksij Rempel (fishor) 2005-09-23 07:29:33 UTC
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3360 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      36896 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3360 mAh
present voltage:         8192 mV


Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [20] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [20] from address [bc]
Read [90] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [20] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]


root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3360 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      9440544 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3360 mAh
present voltage:         8192 mV

Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [20] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]
Execute Method: [\_SB_.ADP0._PSR] (Node c7fc89c8)
Read [c8] from address [c4]
Read [80] from address [c5]
Read [00] from address [c6]
Read [00] from address [c7]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [20] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]

Output with new patch
Do you need all dmesg output ore it's enaf?
Comment 77 Luming Yu 2005-09-23 08:50:56 UTC
Created attachment 6114 [details]
patch-take-2 against 2.6.14-rc1

Please test this one, and post log.
Comment 78 Oleksij Rempel (fishor) 2005-09-23 14:23:18 UTC
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3344 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      36880 mAh
present voltage:         8192 mV

Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [10] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [10] from address [bc]
Read [90] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)


root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      -1879044848 mAh
present voltage:         8192 mV
root@lopi:/home/lex# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      3344 mAh
present voltage:         8192 mV

Execute Method: [\_SB_.ADP0._PSR] (Node c7fc89c8)
Read [c8] from address [c4]
Read [80] from address [c5]
Read [00] from address [c6]
Read [00] from address [c7]
Execute Method: [\_SB_.BAT0._BST] (Node c7fc8c88)
Read [10] from address [bc]
Read [0d] from address [bd]
Read [00] from address [be]
Read [00] from address [bf]


This is result with new patch. May be it's not realy importent?
Comment 79 Oleksij Rempel (fishor) 2005-09-23 14:27:19 UTC
One more quastion. On this laptop is "undock" wich not working with linux but
working well with windows without extra software, if i press it i get:
Execute Method: [\_SB_.PCI0.ISA_.EC0_._Q0C] (Node c7fc3b88)
Execute Method: [\_SB_.DDCK._STA] (Node c7fc86c8)

Is it hotbuttons  or motherboard issue ? How i need to post it?
Comment 80 Oleksij Rempel (fishor) 2005-09-23 14:28:45 UTC
i meen undock button
Comment 81 Luming Yu 2005-09-23 19:45:18 UTC
Please post dmesg. Did you see "Error in acpi_ec_enter_burst_mode" in dmesg?

As for DOCK, linux needs a dock driver, but it isn't ready.
Comment 82 Oleksij Rempel (fishor) 2005-09-23 23:23:50 UTC
Created attachment 6124 [details]
dmesg 2.6.14-rc1+debug_patch+last_patch

There is no "Error in acpi_ec_enter_burst_mode" messages.
Comment 83 Oleksij Rempel (fishor) 2005-09-24 00:26:57 UTC
About comment Comment #78 . I thing it's not only Execute Method issue. In dmesg
you'l see meany examples wich come with wrong output but with corret to. Do you
anderstand what i meen?
Comment 84 Oleksij Rempel (fishor) 2005-09-24 00:31:27 UTC
But always if read bite is 90 output is wrong.
Comment 85 Luming Yu 2005-09-24 07:50:46 UTC
Not sure why. From the latest dmesg, there aren't error messages clue to the 
root cause. I suspect OBF flag got set before the data became ready. Another 
possibility is EC just return 0x90. 
Comment 86 Luming Yu 2005-09-24 07:55:53 UTC
Created attachment 6127 [details]
patch-take-2 against 2.6.14-rc1

patch-take3 against 2.6.14-rc1

Please test it.  The patch invokes leave burst mode.
Comment 87 Oleksij Rempel (fishor) 2005-09-24 09:54:33 UTC
Created attachment 6134 [details]
dmesg 2.6.14-rc1+debug_patch+last_patch3
Comment 88 Oleksij Rempel (fishor) 2005-09-24 09:57:57 UTC
Still same issue: wrong output if 90. But it's happening only one time per 20 tests.
Comment 89 Oleksij Rempel (fishor) 2005-09-24 10:03:22 UTC
I tested sleep and resume with and without ac. It's working realy good. All
buttons are working and etc.
Comment 90 Luming Yu 2005-09-24 10:13:09 UTC
Hmm, interesting. Did you enable preempt?
If yes, would you please try disabling preempt.
Comment 91 Oleksij Rempel (fishor) 2005-09-24 23:28:28 UTC
CONFIG_PREEMPT_NONE=y
But still same issue.
Comment 92 Luming Yu 2005-09-25 00:25:48 UTC
Oh, could you test if this issue only happens with ec_burst=1 on 2.6.14-rc1?
Does ec_burst=0 have this issue on 2.6.14-rc1?
Comment 93 Oleksij Rempel (fishor) 2005-09-25 02:02:36 UTC
No ec_burst=0 don't have this one but after resume some thing couse battery
absent issue.
Comment 94 Luming Yu 2005-09-25 03:39:43 UTC
Created attachment 6135 [details]
patch-take-4 against 2.6.14-rc1

PLease test patch-take4 that just remove burst mode related calls.
Because 0x90 means burst mode ACK, I want to see if this debug patch
can have some postive effect.
Comment 95 Oleksij Rempel (fishor) 2005-09-27 00:43:16 UTC
Created attachment 6165 [details]
dmesg-2.6.14-rc1+patch4

Patch tested. I didn't get any wrong outputs! Sleep,resume, buttonsn and
battery info are working properly.
Comment 96 Luming Yu 2005-09-27 02:18:09 UTC
Thanks a lot for your testing reports.  
 
I think the ec controller of this laptop has some unexpected behavior that 
confused EC driver. So, I think it is NOT safe to enter burst mode for this 
laptop. Maybe this rule can apply to others.  
 
Since my latest patch works, I will push it to Len after clean up. 
Thanks again. 
Comment 97 Oleksij Rempel (fishor) 2005-09-27 03:00:55 UTC
Thenk you too :)
But haow about ec_burst=0 it's not realy working on this laptop.
Comment 98 Luming Yu 2005-09-27 19:28:17 UTC
Created attachment 6171 [details]
cleanup version of patch-take-4
Comment 99 Luming Yu 2005-09-27 19:40:18 UTC
To comment# 97, ec_burst=0 use polling to operate ec.  
ec_burst=1 is based on interrupt for ec operations. 
 
Polling depends on ec status bits to determine if data is ready. 
if status bit is wrong, polling will be wrong too. Maybe this is reason why 
ec_burst=0 doesn't work after resume. 
 
And ec_burst=1 will be enabled by default. 
 
 
Comment 100 Oleksij Rempel (fishor) 2005-09-28 10:19:49 UTC
Patch is tested. All working!
Thenk you wery match!
Comment 101 Len Brown 2005-12-21 18:48:39 UTC
*** Bug 5713 has been marked as a duplicate of this bug. ***
Comment 102 Len Brown 2005-12-21 18:52:20 UTC
patch in comment 98 applied to acpi-test tree some time ago,
should go into 2.6.16 when it opens.
Comment 103 Len Brown 2006-02-02 14:33:40 UTC
Shipped in 2.6.16-rc1-git6 -- closing.
Comment 104 Alexey Starikovskiy 2008-01-24 13:24:33 UTC
Alexey,
we are about to try to enable burst mode in EC again, as a patch for bug #9341.
Could you check if this patch does not break your machine?
Comment 105 Oleksij Rempel (fishor) 2008-01-24 23:16:02 UTC
Unfortunately, I have not the laptop any more :(

Note You need to log in before you can comment on or make changes to this bug.