Jump to content

HP DVx AppleACPIBatteryManager Driver


  • Please log in to reply
73 replies to this topic

#61
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK

JBraddock, I see you have updated to 10.6.8 from another thread. Does the battery driver still work on 10.6.8? Thanks.

Out of curiosity, is it a bug in HP Bios? If so, how come they don't fix it right away. I am not a developer or pro user but when I come across an apparent and yet crucial bug in an application, I wonder why the developer doesn't just fix it. If it is that obvious, it should be fixed right away. Like the problem I have when I use laptop on battery for a while and then plug in the power adapter. Most of the time, the fan goes crazy. I don't know, may be I am being naive ;)

As for the battery, I didn't have time to update my laptop. I might update tonight. I let you know the result.
It was my desktop machine at work that I updated and it went okay.

50/50. No battery symbol is displayed in the menu bar (or whatever it is called), but if we look in System Preferences > Energy saver, the battery info is there. Go figure...

Better than nothing :censored2:

#62
dantesieg

dantesieg

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male

Does the battery driver still work on 10.6.8? Thanks.


It still works on me, but i don't have an HP and i don't use dsdt edit. It works if i use a MacbookPro 6.1 ECDT table, battery percent and time are normal.

#63
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK
@gsly, I updated to 10.6.8 and battery seems to work fine.

#64
gsly

gsly

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 143 posts
  • Gender:Male
  • Location:The Great White North

Out of curiosity, is it a bug in HP Bios? If so, how come they don't fix it right away. I am not a developer or pro user but when I come across an apparent and yet crucial bug in an application, I wonder why the developer doesn't just fix it. If it is that obvious, it should be fixed right away. Like the problem I have when I use laptop on battery for a while and then plug in the power adapter. Most of the time, the fan goes crazy. I don't know, may be I am being naive :D

I believe whomever it was that came up with the lapic code fix mentioned that the Intel chip-set sheets detail the proper initialization for the local APIC and having read it, the code in the kernel is definitely wrong, or needs to be exactly correct likely because the HP BIOS doesn't initialize it correctly :D I would think that if this was only an issue in the OSX kernel, then we would see ALL the i7 based machines need the kernel fix but I'm sure that isn't the case. If I can track down another i7 720QM based laptop successfully running without the patch, I should be able to look at that machines BIOS and compare to the HP one. I just need a few BIOS tools, a good disassembler and lots of time :)

And given what I saw in the BIOS AML/DSDT code, whomever worked on the battery methods at HP didn't read enough standards documents, or didn't understand the hardware because the code is {censored}. There is a smart battery controller in the battery and their standard ACPI functions weren't even using it (they pulled some embedded controller values). The WMI functions did a bit of SBS code, but they didn't pull out all of the available data from the battery.

As a professional developer, ya, I fix bugs when I know about them :) I'm sure the microcontroller/BIOS programmers at HP (and most places) rarely see the light of day or interact with the customer base in anyway, so they likely think their code is working fine and the world is still flat ;-)



It still works on me, but i don't have an HP and i don't use dsdt edit. It works if i use a MacbookPro 6.1 ECDT table, battery percent and time are normal.

Thanks for the feedback. Can you post or PM me the ECDT table you are using? I'm not sure if I have a MacBookPro6,1 copy or not. I know I was looking at one previously and I need to do that again before I try my next idea of getting the vanilla AppleSmartBattery driver working via embedded controller/DSDT.


@gsly, I updated to 10.6.8 and battery seems to work fine.

Cool, thanks. I guess I'll just dig up my revised posting document and recompile the current driver and get this thread updated. May not be until next (long) weekend though.

#65
dantesieg

dantesieg

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male

Thanks for the feedback. Can you post or PM me the ECDT table you are using? I'm not sure if I have a MacBookPro6,1 copy or not. I know I was looking at one previously and I need to do that again before I try my next idea of getting the vanilla AppleSmartBattery driver working via embedded controller/DSDT.

Here it is: Attached File  ECDT.aml.zip   224bytes   10 downloads

#66
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Retired Developers
  • 791 posts
  • Gender:Male

And given what I saw in the BIOS AML/DSDT code, whomever worked on the battery methods at HP didn't read enough standards documents, or didn't understand the hardware because the code is {censored}. There is a smart battery controller in the battery and their standard ACPI functions weren't even using it (they pulled some embedded controller values). The WMI functions did a bit of SBS code, but they didn't pull out all of the available data from the battery.

Well things are not like that, I digged in many vendors DSDT's and almost all use EC for battery stuff, exception is Apple, and I can understand why is like that, the reason is simple, they(chip manufacturers, vendors, etc.) do not want to expose the SMBus methods and stuff to the curious people manly for security reasons(I can expand the paranoia(their) saying that this kind of stuff is used on military rockets and so, but i wont) :)
HP on the other hand throw the bone in DSDT, was like an invitation, this is how to do it, you curious people do it ;)
...and we did.

#67
NIXin

NIXin

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 116 posts
  • Gender:Male
  • Location:Krakow, Poland
Any news on support for Lion?
Thanks!

#68
gsly

gsly

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 143 posts
  • Gender:Male
  • Location:The Great White North

Any news on support for Lion?
Thanks!


I'm working on it! I was going to update the thread a couple of weeks back but then I managed to get my machine up to 10.6.8 and running 64-bit and found a bug I didn't see in 10.6.7 32-bit so I'm tracking that down now. Also I'm working to get a Lion GM base install going in parallel so I can see what Apple changed and what's broken with the ACPI driver in Lion and get that compiled (now that Xcode 4.1 is available)

And after that, I think I'm going to go back to investigate ways of getting the Apple driver working or helping The King to fill in the missing bits so we can compile and use the Apple source. Using the vanilla driver or something much closer will also improve compatibility with other 3rd party software that is looking for the Apple driver (and/or data from it) exclusively, although I could fix that now by renaming the classes the same as Apple :angel:

#69
NIXin

NIXin

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 116 posts
  • Gender:Male
  • Location:Krakow, Poland
Exciting! Great stuff - gsly, you genious. ;) Good luck.

#70
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK
Thank you for your hard work. Really appreciated.
By the way, I think it would be a nice idea to post the new release as a new topic under "New Releases and Updates".

#71
yehia Amer

yehia Amer

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 249 posts
  • Gender:Male
  • Location:egypt
gsly, Great Work :construction: , Good luck :P

#72
gsly

gsly

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 143 posts
  • Gender:Male
  • Location:The Great White North
Argh! I should have known better! It turns out that the bug I've been searching for in the driver was actually a bug in HP's ACPI method that converts an Integer to string. The HP method did not ensure there was a trailing NULL/0x00 byte at the end of the converted string. Likely due to the way memory is allocated in 64-bit mode vs 32-bit, I was able to see the side effect more often in 64-bit kernel mode but I suspect I did see this once or twice in 32-bit mode but thought it was another issue :unsure:

So at the end of the day, there was no bug in the driver :D

I was able to fix the HP method and now I see the correct value on the driver side. I just need to remove some debug code, update the version details, recompile a debug/release version, update my documents with the fixed HP method/details and I will post the latest driver version. I should be able to get this done this week so keep an eye on this thread for a pointer to the new version (I plan to post it in a new thread in a more appropriate section as suggested by JBraddock)

I now have a Lion GM install working so I'll be working on checking the driver in that environment next.

#73
3.14r2

3.14r2

    The Round One

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,333 posts
  • Location:Molvania

...I will post the latest driver version. I should be able to get this done this week so keep an eye on this thread for a pointer to the new version (I plan to post it in a new thread in a more appropriate section as suggested by JBraddock)

Good news! Thanks for update :(

#74
gsly

gsly

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 143 posts
  • Gender:Male
  • Location:The Great White North
The new driver is up at:

http://www.insanelym...howtopic=264597





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy