Jump to content

HP DVx ACPI 3.x/4.x Battery Driver (10.6/10.7)


  • Please log in to reply
227 replies to this topic

#61
macq

macq

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 115 posts

Works great gsly, good job! :)
To people that say they have compile errors - it must be that your DSDT is not compatibile with mine. Also, are you patching under Windows or Linux? Because if you patch on Mac, you are actually patching an already patched DSDT (so, no good!).
If you like send me your raw, untouched DSDT file (extracted in Windows or Linux), and I can look into where the patcher is failing for your machines.

Cheers,
NIXin


@Nixin ,
here's my raw linux generated dsdt if you need for evaluation

Attached Files



#62
manmal

manmal

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 435 posts
Hi Nixin,
compile errors here too... i have a DV8. Here is my raw, untouched DV8 dsdt extracted from linux.
Thanks!
Mal

Attached File  manmal_dv8.aml.zip   21.61KB   8 downloads

#63
manmal

manmal

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 435 posts
Hi Glsy! Thanks for your work!! I just tried your method in lion and it works quite nice! I am noticing that the battery is seen as "service battery"... is it normal? I am using AppleSmartBattery kext.

But It REALLY works on Lion!! Thanks!!

Any update about the problem that when battery is almost zero, it doesn't hibernate but it powers off and on continuously until the battery is dead? It may be nice to put computer in hibernate automatically without powering it on and off continuously but i guess it's hard-coded in hardware?

Mal

#64
gsly

gsly

    InsanelyMac Geek

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

Hi Glsy! Thanks for your work!! I just tried your method in lion and it works quite nice! I am noticing that the battery is seen as "service battery"... is it normal? I am using AppleSmartBattery kext.

But It REALLY works on Lion!! Thanks!!

Any update about the problem that when battery is almost zero, it doesn't hibernate but it powers off and on continuously until the battery is dead? It may be nice to put computer in hibernate automatically without powering it on and off continuously but i guess it's hard-coded in hardware?

Mal

Where are you seeing "service battery"? If its in the system profiler, I think Lion is telling you to replace the battery ;) The battery driver just talks to the battery, gathers the information and passes it to the power management layer in OSX. Unless your battery is returning "service battery" for the model name, etc., the OS is looking at the rest of the data (number of cycles, current capacity and capacity-at-new) and determining the health of the battery based on those.

As mentioned, the battery drivers role in life is to talk to the battery and relay that information to the power management layer. The power management layer is the bit that tells the system to sleep when idle (idle sleep) and system sleep (forced sleep). The problem with idle sleep is that applications and drivers can override the request to sleep. Also, I think that if an old driver is used that doesn't respond to idle sleep requests, the PM layer interprets that as "abort the sleep". Just my theory and I hope to do some testing in this regard soon.

#65
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK

I am noticing that the battery is seen as "service battery"... is it normal? I am using AppleSmartBattery kext.

That "service battery" warning will go away in time. I had the same warning, which appeared after a power loss.

#66
nami

nami

    InsanelyMac Protégé

  • Members
  • PipPip
  • 51 posts
Hi,


I tried to edit my dsdt but i cant find the methods to edit. Can someone edit my dsdt and add the necesseary hacks to make it work. I have a hp dv3.

Here is my dsdt: http://www.mediafire...jvegosgwvf2w0qq

Thanks

#67
manmal

manmal

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 435 posts
@glsy
Thanks glsy for trying to figure out such awake from sleep when battery is low. Service battery has shown in taskbar near (battery icon near wifi,speakerout,time,eject,search icon top-right of the screen). I noticed in your original post, under the "model number", "setial number" and so on there is no name (" ") ... is it perhaps due to such missing name? I applied all the fixes , was i wrong to apply everything?

@JBraddock
Thanks James for your suggestion, but here it doesn't go away... it stays there... both in lion and in snow : service battery. Under istatPro i can see Health: 71% , Cycles : 159 , and correct time of charging and percentage . It says service battery also on battery power (without ac power supply). ***OFF TOPIC BEGIN*** Did you update your lion guide for hdx16? I almost use dv8 now, due to such annyoing applehda problem that sound doesn't resume after sleep (i use sleep function a lot)... ***OFF TOPIC END***

Thanks!
Mal

#68
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK

@JBraddock
Thanks James for your suggestion, but here it doesn't go away... it stays there... both in lion and in snow : service battery. Under istatPro i can see Health: 71% , Cycles : 159 , and correct time of charging and percentage . It says service battery also on battery power (without ac power supply). ***OFF TOPIC BEGIN*** Did you update your lion guide for hdx16? I almost use dv8 now, due to such annyoing applehda problem that sound doesn't resume after sleep (i use sleep function a lot)... ***OFF TOPIC END***

I had that warning for a couple of weeks and then it went away. It is possible that in your case, your battery is actually dying. Try uninstalling and reinstalling the driver. Or may be just use the older version on Snow Leopard to see if it fixes the issue.

// Yes, I updated the topic. I'll share one more fix which is the graphic power management. Without it, GPU performance is horrible. Once 10.7.2 has come out, I'll update it again. I bought Samsung YA-SBR510B, which is just joy to use. It has both bluetooth and usb input, which means that it goes on working even after sleep. //

#69
gsly

gsly

    InsanelyMac Geek

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

@glsy
Thanks glsy for trying to figure out such awake from sleep when battery is low. Service battery has shown in taskbar near (battery icon near wifi,speakerout,time,eject,search icon top-right of the screen). I noticed in your original post, under the "model number", "setial number" and so on there is no name (" ") ... is it perhaps due to such missing name? I applied all the fixes , was i wrong to apply everything?

Thanks!
Mal

Ya, the "Service Battery" message is coming from another part of the OS (likely the PM layer) and you can see it here:

Service Battery indicator in Mac OS X

I've never seen that message before :) It comes from /System/Library/CoreServices/Menu Extras/Battery.menu

Other messages you can see there:

About the Battery menu bar extra for portable Macs

#70
NIXin

NIXin

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 114 posts
  • Gender:Male
  • Location:Krakow, Poland
Hey guys,

You were correct, the patcher I gave you before didn't work and thrown parse errors. It is because of some weird error in the AutoPatcher.
Here's a fix. Attached File  HP_DVx_i7_patch_2011_09_29.zip   20.38KB   66 downloads

To use the patcher with DV6 or DV8 rename accordingly patch-xx.txt file to patch.txt

Sorry, I didn't test it properly before release.

Cheers

#71
oldnapalm

oldnapalm

    InsanelyMac V.I.P.

  • Moderators
  • 6,836 posts
  • Gender:Male
  • Location:Brazil
I tested with manmal's DV8 and still need to remove the "nasty hacks" to be able to compile.

# nasty hack for DV6 to remove one closing bracket from child
into method label _RMV parent_type device parent_label J384 code_regex Return\s\(One\)\n\s*\} replace_matched
begin
Return (One)\n
end;

# nasty hack for DV8
into method label PR08 parent_type device parent_label J384 code_regex Return\s\(PR08\)\n\s*\} replace_matched
begin
Return (One)\n
end;

This patch doesn't make much sense to me, because if the original file had a missing or extra } the parser would fail
Attached File  Captura_de_Tela_2011_09_29_a__s_11.46.42.png   18.92KB   18 downloads

Edit: the other error in previous patch (2011-09-22) was this
// LION FIX _linenums:0'>// LION FIX:into method label SMRD parent_type device parent_label EC0 remove_entry;
Comments between patches must be #, not //, so the old SMRD was not being removed, causing error "Name already exists in scope (SMRD)".

This applies without problems on manmal's DSDT
Attached File  HP_DVx_i7_patch_2011_09_22.txt   56.15KB   54 downloads

You can use this version of Auto-Patcher (app only)

Download: http://olarila.com/f....php?f=19&t=507

Kexts.com mirror: http://www.kexts.com...r_app_only.html

#72
manmal

manmal

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 435 posts
Thank you very much NIXin & oldnapalm for your work!!!
I am using it right now and it seems to work very nice!!!
Now i am beginning to understand how such scripting language works :D nice oldnapalm!!
Mal

*EDIT: The only things i noticed with this dsdt are, 1) audio was not working(i am using 10.6.8 now... will try lion later) , but i changed layoutID and it works now, 2) Brightness is not working well : both GenericBrightness and ACPIBrightness (new method) and backlight of LCD is very very low! ...and I am continuing to have service battery message, though.

#73
macq

macq

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 115 posts
@ Nixin.oldnapalm,

i am still having the compile errors,more than 200,I have tried the fixed patch by oldnapalm but it also fails to compile.Could you please look into my dsdt and see whats wrong.my dsdt is posted a couple of posts back on this thread only.It is post 61
Thanks in advance

#74
oldnapalm

oldnapalm

    InsanelyMac V.I.P.

  • Moderators
  • 6,836 posts
  • Gender:Male
  • Location:Brazil
Try patch-dv6.txt from NIXin (2011-09-29), works fine with your DSDT.

#75
macq

macq

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 115 posts

Try patch-dv6.txt from NIXin (2011-09-29), works fine with your DSDT.


@oldnapalm

ok my bad, it does work. :P

Thanks for the help to all you guys.(gsly,nixin and oldnapalm).

brilliant job :D


#76
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,712 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
sorry.. you mean to rename the patch_dv7 to dv6.. and use it

but I looked inside it.. and seen invidia patch.. and most dv6 (as mine) with sandybridge i7 hasn't invidia..
they have ATI HD

#77
NIXin

NIXin

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 114 posts
  • Gender:Male
  • Location:Krakow, Poland

sorry.. you mean to rename the patch_dv7 to dv6.. and use it

but I looked inside it.. and seen invidia patch.. and most dv6 (as mine) with sandybridge i7 hasn't invidia..
they have ATI HD

Yes, this is for the older version of DV6/DV7, without Sandy Bridge.
Just replace that part with your own DSDT fix for ATI (or whatever else). Make sure to add new line endings (\n) at the end of every line. There might be some other changes required, but I don't have the platform to test.
Also, guys, please don't OT, spamming and hijacking gsly's topic.

gsly, what about that beer? You said you don't turn down beer, so is there any way I can buy you one or two? :)

This patch doesn't make much sense to me, because if the original file had a missing or extra } the parser would fail

The parser does fail on the decompiled DV6 DSL, that's why that nasty hack is needed.

#78
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,712 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
ok. i'm not noob in scripting.. but prefer to do manually dsdt.
i'll check your patch.. only because I need to run audio!
i manually fixed 99% of my dsdt.. with experiences. lpc/smbus/hd3000/ati works.. but wlan 4313 and audio.. not.

to be not OT.. I'll test your patch to see the battery fixed!

see later

#79
leras

leras

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts
please can someone post the fix dsdt for dv 6 i have a dv 6543 with 10.6.8 and i dont have dsdt and i dont know hot to produce it

please can someone post the fix dsdt for dv 6 i have a dv 6543 with 10.6.8 and i dont have dsdt and i dont know hot to produce it

#80
verleihnix

verleihnix

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts
  • Gender:Male
Hello I tried to get your stuff into my dsdt.
But I do not know to put the things together.
May I ask you to help me?

Just in case I attached my dsdt.

Thanks in advance

Attached File  dsdt_6510b.aml.zip   32.53KB   6 downloads





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