221 replies to this topic
#101
Posted 21 November 2011 - 07:10 PM
#102
Posted 26 November 2011 - 06:15 PM
It looks like I'll get to test the driver with a new 12-cell battery (just ordered) as my original 8-cell HP battery is now showing "Service Battery" in OSX and "Consider replacing your battery" in Windows 7
Apparently the original battery has 31 cycles on it.
#103
Posted 26 November 2011 - 10:38 PM
Jingu, on 20 November 2011 - 03:31 PM, said:
Thanks gsly.
That was very nice of you to do the edits on my dsdt.
Unfortunately, it doesn't work.
When I put back Store (^^LPCB.EC0.BIF9 (), Index (PBIF, 0x09)) in Method _BIF, Method _BIF fails and no battery information is returned. There is also an unexpected side effect from your edits. I lose the fan rpm sensor in iStat each time.
That was very nice of you to do the edits on my dsdt.
Unfortunately, it doesn't work.
When I put back Store (^^LPCB.EC0.BIF9 (), Index (PBIF, 0x09)) in Method _BIF, Method _BIF fails and no battery information is returned. There is also an unexpected side effect from your edits. I lose the fan rpm sensor in iStat each time.
SOLVED!!: Method SMBR can now read the battery name string without crashing in Lion.
Gsly, I tried your dsdt with the Method SMBR 8-bit re-write in Snow Leopard and it perfectly read the battery name string, indicating that your Method SMBR re-write was flawless. So, something else in Method SMBR was causing it to fail in Lion. With the help of your adundant comments on my dsdt, my suspicions closed in on the instruction Store (Zero, BDAT). That essentially stores a zero in a big 32 byte field. For what purpose? And that did not look entirely Lion compatible, so I deleted that line and voila! Method SMBR can retrieve the battery name string without crashing. So, it was your SMBR re-write, combined with deleting that line. Thanks much.
Oh, I also solved the disappearing fan sensor issue by converting both fan EC registers TAH0 and TAH1 to 8-bit, not just TAH0 like before.
I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.
#104
Posted 27 November 2011 - 03:11 AM
Jingu, on 26 November 2011 - 10:38 PM, said:
SOLVED!!: Method SMBR can now read the battery name string without crashing in Lion.
Gsly, I tried your dsdt with the Method SMBR 8-bit re-write in Snow Leopard and it perfectly read the battery name string, indicating that your Method SMBR re-write was flawless. So, something else in Method SMBR was causing it to fail in Lion. With the help of your adundant comments on my dsdt, my suspicions closed in on the instruction Store (Zero, BDAT). That essentially stores a zero in a big 32 byte field. For what purpose? And that did not look entirely Lion compatible, so I deleted that line and voila! Method SMBR can retrieve the battery name string without crashing. So, it was your SMBR re-write, combined with deleting that line. Thanks much.
Oh, I also solved the disappearing fan sensor issue by converting both fan EC registers TAH0 and TAH1 to 8-bit, not just TAH0 like before.
I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.
Gsly, I tried your dsdt with the Method SMBR 8-bit re-write in Snow Leopard and it perfectly read the battery name string, indicating that your Method SMBR re-write was flawless. So, something else in Method SMBR was causing it to fail in Lion. With the help of your adundant comments on my dsdt, my suspicions closed in on the instruction Store (Zero, BDAT). That essentially stores a zero in a big 32 byte field. For what purpose? And that did not look entirely Lion compatible, so I deleted that line and voila! Method SMBR can retrieve the battery name string without crashing. So, it was your SMBR re-write, combined with deleting that line. Thanks much.
Oh, I also solved the disappearing fan sensor issue by converting both fan EC registers TAH0 and TAH1 to 8-bit, not just TAH0 like before.
I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.
#105
Posted 05 December 2011 - 05:06 PM
gsly,
Thank you for such comprehensive guide on dsdt battery changes.
I also own HP laptop machine owner and followed all available guides on this forum. My EC0 16bit registers are divided into half and B1B2 routine introduced by Zprood is used to make it work in Lion.
I'm stuck however on two issues:
original:
If (LEqual (Local2, 0x04))
{
Store (0xFA, MAXC)
Store (Package (0x02)
{
0x00,
0x00
}, Local4)
after replacing MAXC with AXC0 and AXC1 implementing B1B2 routine
Store (0xFA, B1B2 (AXC0, AXC1))
I'm able to compile cleanly with two different programs, however when freshly created dstd.aml is parsed again several errors are introduced.
If (LEqual (Local2, 0x04))
{
Store (0xFA, B1B2)
AXC0
AXC1
What am I doing wrong? Here's B1B2 routine
Method (B1B2, 2, NotSerialized)
{
ShiftLeft (Arg1, 0x08, Local0)
Or (Arg0, Local0, Local0)
Return (Local0)
}
Another problem I'm having is cycle count stuck at 0. What will be responsible for prowiding that information?
For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.
Thank you for such comprehensive guide on dsdt battery changes.
I also own HP laptop machine owner and followed all available guides on this forum. My EC0 16bit registers are divided into half and B1B2 routine introduced by Zprood is used to make it work in Lion.
I'm stuck however on two issues:
original:
If (LEqual (Local2, 0x04))
{
Store (0xFA, MAXC)
Store (Package (0x02)
{
0x00,
0x00
}, Local4)
after replacing MAXC with AXC0 and AXC1 implementing B1B2 routine
Store (0xFA, B1B2 (AXC0, AXC1))
I'm able to compile cleanly with two different programs, however when freshly created dstd.aml is parsed again several errors are introduced.
If (LEqual (Local2, 0x04))
{
Store (0xFA, B1B2)
AXC0
AXC1
What am I doing wrong? Here's B1B2 routine
Method (B1B2, 2, NotSerialized)
{
ShiftLeft (Arg1, 0x08, Local0)
Or (Arg0, Local0, Local0)
Return (Local0)
}
Another problem I'm having is cycle count stuck at 0. What will be responsible for prowiding that information?
For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.
Attached Files
#106
Posted 06 December 2011 - 03:16 PM
dk777, on 05 December 2011 - 05:06 PM, said:
Another problem I'm having is cycle count stuck at 0. What will be responsible for prowiding that information?
For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.
For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.
The SBS function CycleCount() provides this information from the battery controller. See the referenced documentation. Your DSDT appears to use WMI to gather battery information from the embedded controller hardware so you'll have to determine if that information is provided (unlikely).
#107
Posted 07 December 2011 - 12:30 AM
gsly, on 06 December 2011 - 03:16 PM, said:
Please re-post your DSDT as the vanilla you posted also has the same syntax errors suggesting this isn't really the correct one.
dsdt.dsl.zip 82.31K
5 downloadsMy original 16bit MAXC register was broken into two 8bit AXC0, AXC1 registers. Can I replace B1B2 method at this part of the code with something like this instead?
If (LEqual (Local2, 0x03))
{
Store (0xFA, AXC0)
Store (0x00, AXC1)
Store (Package (0x02)
{
Zero,
Zero
}, Local4)
to be honest, I downloaded already patched dsdt.aml and used that to get a list of modified registers and made a patch.
HP_BATTERY_patch.txt.zip 963bytes
26 downloadsThank you for your time.
#108
Posted 11 December 2011 - 12:34 AM
Hey there,
i have a ThinkPad W520 and at the moment i get the following:

But my cycle count is missing. My BAT0 Device looks like:
I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?
And thank you for your nice guide!
i have a ThinkPad W520 and at the moment i get the following:

But my cycle count is missing. My BAT0 Device looks like:
Device (BAT0)
{
Name (_HID, EisaId ("PNP0C0A"))
Name (_UID, Zero)
Name (_PCL, Package (0x01)
{
_SB
})
Name (B0ST, Zero)
Name (BT0I, Package (0x0D)
{
Zero,
Ones,
Ones,
One,
0x2A30,
Zero,
Zero,
One,
One,
"",
"",
"",
""
})
Name (BT0P, Package (0x04) {})
Method (_STA, 0, NotSerialized)
{
If (H8DR)
{
Store (HB0A, B0ST)
}
Else
{
If (And (RBEC (0x38), 0x80))
{
Store (One, B0ST)
}
Else
{
Store (Zero, B0ST)
}
}
If (B0ST)
{
Return (0x1F)
}
Else
{
Return (0x0F)
}
}
Method (_BIF, 0, NotSerialized)
{
Store (Zero, Local7)
Store (0x0A, Local6)
While (LAnd (LNot (Local7), Local6))
{
If (HB0A)
{
If (LEqual (And (HB0S, 0x0F), 0x0F))
{
Sleep (0x03E8)
Decrement (Local6)
}
Else
{
Store (One, Local7)
}
}
Else
{
Store (Zero, Local6)
}
}
Return (GBIF (Zero, BT0I, Local7))
}
Method (_BST, 0, NotSerialized)
{
XOr (DerefOf (Index (BT0I, Zero)), One, Local0)
Return (GBST (Zero, HB0S, Local0, BT0P))
}
Method (_BTP, 1, NotSerialized)
{
And (HAM4, 0xEF, HAM4)
If (Arg0)
{
Store (Arg0, Local1)
If (LNot (DerefOf (Index (BT0I, Zero))))
{
Divide (Local1, 0x0A, Local0, Local1)
}
And (Local1, 0xFF, HT0L)
And (ShiftRight (Local1, 0x08), 0xFF, HT0H)
Or (HAM4, 0x10, HAM4)
}
}
}
I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?
And thank you for your nice guide!
#109
Posted 11 December 2011 - 07:55 PM
gothic860, on 11 December 2011 - 12:34 AM, said:
Hey there,
i have a ThinkPad W520 ...
But my cycle count is missing. ...
I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?
And thank you for your nice guide!
i have a ThinkPad W520 ...
But my cycle count is missing. ...
I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?
And thank you for your nice guide!
#110
Posted 11 December 2011 - 08:47 PM
Thank you for your reply, but i don't have the PCI.LPC.EC.SMRD stuff inside my (EC) Device:
Maybe its just another name for it from Lenovo...? Im no DSDT-Pro
but i think its a tricky problem. Maybe i can find something with google later today. I will report.
Device (EC)
{
Name (_HID, EisaId ("PNP0C09"))
Name (_UID, Zero)
Name (_GPE, 0x11)
Method (_REG, 2, NotSerialized)
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, H8DR)
}
}
OperationRegion (ECOR, EmbeddedControl, Zero, 0x0100)
Field (ECOR, ByteAcc, NoLock, Preserve)
{
HDBM, 1,
, 1,
, 1,
HFNE, 1,
, 1,
, 1,
HLDM, 1,
Offset (0x01),
BBLS, 1,
BTCM, 1,
, 1,
, 1,
, 1,
HBPR, 1,
BTPC, 1,
Offset (0x02),
HDUE, 1,
, 4,
SNLK, 1,
Offset (0x03),
, 5,
HAUM, 2,
Offset (0x05),
HSPA, 1,
Offset (0x06),
HSUN, 8,
HSRP, 8,
Offset (0x0C),
HLCL, 8,
, 4,
CALM, 1,
Offset (0x0E),
HFNS, 2,
Offset (0x0F),
, 6,
NULS, 1,
Offset (0x10),
HAM0, 8,
HAM1, 8,
HAM2, 8,
HAM3, 8,
HAM4, 8,
HAM5, 8,
HAM6, 8,
HAM7, 8,
HAM8, 8,
HAM9, 8,
HAMA, 8,
HAMB, 8,
HAMC, 8,
HAMD, 8,
HAME, 8,
HAMF, 8,
Offset (0x23),
HANT, 8,
Offset (0x26),
, 2,
HANA, 2,
Offset (0x27),
Offset (0x2A),
HATR, 8,
HT0H, 8,
HT0L, 8,
HT1H, 8,
HT1L, 8,
HFSP, 8,
, 6,
HMUT, 1,
Offset (0x31),
, 2,
HUWB, 1,
Offset (0x32),
HWPM, 1,
HWLB, 1,
HWLO, 1,
HWDK, 1,
HWFN, 1,
HWBT, 1,
HWRI, 1,
HWBU, 1,
HWLU, 1,
Offset (0x34),
, 3,
PIBS, 1,
, 3,
HPLO, 1,
Offset (0x36),
Offset (0x38),
HB0S, 7,
HB0A, 1,
HB1S, 7,
HB1A, 1,
HCMU, 1,
, 2,
OVRQ, 1,
DCBD, 1,
DCWL, 1,
DCWW, 1,
HB1I, 1,
, 1,
KBLT, 1,
BTPW, 1,
BTDT, 1,
HUBS, 1,
BDPW, 1,
BDDT, 1,
HUBB, 1,
Offset (0x46),
, 1,
BTWK, 1,
HPLD, 1,
, 1,
HPAC, 1,
BTST, 1,
Offset (0x47),
HPBU, 1,
, 1,
HBID, 1,
, 3,
HBCS, 1,
HPNF, 1,
, 1,
GSTS, 1,
, 2,
HLBU, 1,
DOCD, 1,
HCBL, 1,
Offset (0x49),
SLUL, 1,
Offset (0x4C),
HTMH, 8,
HTML, 8,
HWAK, 16,
HMPR, 8,
, 7,
HMDN, 1,
Offset (0x78),
TMP0, 8,
Offset (0x81),
HIID, 8,
Offset (0x83),
HFNI, 8,
HSPD, 16,
Offset (0x88),
TSL0, 7,
TSR0, 1,
TSL1, 7,
TSR1, 1,
TSL2, 7,
TSR2, 1,
TSL3, 7,
TSR3, 1,
Offset (0x8D),
HDAA, 3,
HDAB, 3,
HDAC, 2,
Offset (0xB0),
HDEN, 32,
HDEP, 32,
HDEM, 8,
HDES, 8,
Offset (0xBB),
PLSL, 8,
PLMS, 8,
PLLS, 8,
PLTU, 8,
Offset (0xC8),
ATMX, 8,
HWAT, 8,
Offset (0xCC),
PWMH, 8,
PWML, 8,
Offset (0xED),
, 4,
HDDD, 1,
Offset (0xFF),
FQ5B, 1,
, 4,
OCPF, 1,
P7FG, 1,
VTAF, 1
}
Maybe its just another name for it from Lenovo...? Im no DSDT-Pro
#111
Posted 12 December 2011 - 11:44 AM
I tried it by myself but no chance i searched Google for hours, but i didn't find anything about the SMBus write / reading on Thinkpads DSDT.
Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me
.
Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me
Attached Files
#112
Posted 12 December 2011 - 09:40 PM
Jingu, on 26 November 2011 - 10:38 PM, said:
I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.
gsly, on 27 November 2011 - 03:11 AM, said:
Awesome! Thanks for the feedback and updated posting to relate your platform specific findings. This also proves we can build up a number of standard DSDT methods between different platforms as long as the underlying hardware is relatively standard (EC, SMBus, SBS, etc)
Jingu, I can confirm it works on a u36sd. However, I did not need the calculation correction with my 6cell so I would suggest not using that as a standard since it may be specific to your battery. I also did not convert my EC registers, I have an error somewhere in my work on that but its not needed for the calculation so...
For the benefit of others reading this; leave FBIF stock, use jingu's CBIF edit, change CBST 'If (PUNT)' to 'If (LEqual (PUNT, Zero))', add SMBR 8bit edits and disable UseExtBatInfoMethod and UseExtraBatInfoMethod in kext and you should be good to go.
#113
Posted 13 December 2011 - 01:25 PM
18seven, on 12 December 2011 - 09:40 PM, said:
Jingu, I can confirm it works on a u36sd. However, I did not need the calculation correction with my 6cell so I would suggest not using that as a standard since it may be specific to your battery. I also did not convert my EC registers, I have an error somewhere in my work on that but its not needed for the calculation so...
For the benefit of others reading this; leave FBIF stock, use jingu's CBIF edit, change CBST 'If (PUNT)' to 'If (LEqual (PUNT, Zero))', add SMBR 8bit edits and disable UseExtBatInfoMethod and UseExtraBatInfoMethod in kext and you should be good to go.
For the benefit of others reading this; leave FBIF stock, use jingu's CBIF edit, change CBST 'If (PUNT)' to 'If (LEqual (PUNT, Zero))', add SMBR 8bit edits and disable UseExtBatInfoMethod and UseExtraBatInfoMethod in kext and you should be good to go.
Hi there, I also have a U36SD, would you share your DSDT so I can compare with mine? I have made the modifications that @jingu shared but they did not worked, @jingu also kindly helped me to solve the problem but I did not work, so, if you could help my by sharing a working DSDT I would really appreciate it.
#114
Posted 13 December 2011 - 06:29 PM
Post yours Claudio and I'll have a look/see.
#115
Posted 13 December 2011 - 06:39 PM
Here they are, my original DSDT and the one that I've modified.
http://dl.dropbox.co...ery_changes.dsl
http://dl.dropbox.co...iginal_dsdt.dsl
Thanks a lot!
http://dl.dropbox.co...ery_changes.dsl
http://dl.dropbox.co...iginal_dsdt.dsl
Thanks a lot!
18seven, on 13 December 2011 - 06:29 PM, said:
Post yours Claudio and I'll have a look/see.
#116
Posted 13 December 2011 - 08:08 PM
Claudio, you did not follow my directions. Patch for your dsdt is attached. Don't just apply it, study it so you understand what your doing wrong.
Attached Files
#117
Posted 14 December 2011 - 03:05 PM
gothic860, on 12 December 2011 - 11:44 AM, said:
I tried it by myself but no chance i searched Google for hours, but i didn't find anything about the SMBus write / reading on Thinkpads DSDT.
Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me
.
Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
SBRC, 16,
SBFC, 16,
SBAE, 16,
SBRS, 16,
SBAC, 16,
SBVO, 16,
SBAF, 16,
SBBS, 16
}
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
, 15,
SBCM, 1,
SBMD, 16,
SBCC, 16
}
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
SBDC, 16,
SBDV, 16,
SBOM, 16,
SBSI, 16,
SBDT, 16,
SBSN, 16
}
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
SBCH, 32
}
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
SBMN, 128
}
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
SBDN, 128
}
i.e. SBDN = Smart Battery Device Name, SBMN = Smart battery Model Number, etc. Perhaps one of the other fields provides Cycle Count... like say, SBCC? SBCC isn't referenced by any DSDT code, but that doesn't mean the hardware designer didn't do his job correctly and more than likely all the battery information has been provided by the EC.
Use RW Everything on Windows to look at/monitor this field in the Embedded controller and see what it returns. Or better yet, implement a _BIX method and return the value of this field for CycleCount and see what you get!
#118
Posted 14 December 2011 - 07:03 PM
Thank you for your reply.
Ok with Windows an RE everything:

But where or how can i get the SBCC output? Sorry but i have no experience with this stuff and google wasn't a real help here.
With DSDT i don't really know how to set up the _BIX Method
(see test.zip)
Ok with Windows an RE everything:

But where or how can i get the SBCC output? Sorry but i have no experience with this stuff and google wasn't a real help here.
With DSDT i don't really know how to set up the _BIX Method
Attached Files
#119
Posted 15 December 2011 - 11:08 AM
gsly, on 26 November 2011 - 06:15 PM, said:
It looks like I'll get to test the driver with a new 12-cell battery (just ordered) as my original 8-cell HP battery is now showing "Service Battery" in OSX and "Consider replacing your battery" in Windows 7 :( Apparently the original battery has 31 cycles on it.
I have 12-cell battery on my HP, everything is fine except sometimes I'm getting 'FIXME' messages in console:
15/12/2011 09:30:57 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u�=��_i�ղ". 15/12/2011 09:32:03 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`e�gQ". 15/12/2011 09:39:51 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`<�". 15/12/2011 09:50:24 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u@Q� \�".this doesn't seem to affect system or battery information in any way, from google search I found that this may be battery problem itself but then battery is 2 months old, any ideas from you ?
Thanks
swavek
#120
Posted 15 December 2011 - 03:53 PM
swavek, on 15 December 2011 - 11:08 AM, said:
Hi gsly
I have 12-cell battery on my HP, everything is fine except sometimes I'm getting 'FIXME' messages in console:
Thanks
swavek
I have 12-cell battery on my HP, everything is fine except sometimes I'm getting 'FIXME' messages in console:
15/12/2011 09:30:57 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u�=��_i�ղ". 15/12/2011 09:32:03 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`e�gQ". 15/12/2011 09:39:51 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`<�". 15/12/2011 09:50:24 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u@Q� \�".this doesn't seem to affect system or battery information in any way, from google search I found that this may be battery problem itself but then battery is 2 months old, any ideas from you ?
Thanks
swavek
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



Sign In
Create Account








