Jump to content

AppleACPIBatteryManager/AppleSmartBatteryManager For Lion


  • Please log in to reply
181 replies to this topic

#21
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN

hi Zprood. can you take a look at my dsdt? i can't find the parts to edit

thanks

Try it:Attached File  dsdt_fix.aml.zip   27.02KB   214 downloads

@archintosh
Read the post 6#.

#22
jazzyguy

jazzyguy

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
  • Gender:Male
  • Location:USA
I understand your guide for the most part. But I don't see exactly where to change this in my DSDT.

Can you please help me out?

#23
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN

I understand your guide for the most part. But I don't see exactly where to change this in my DSDT.

Can you please help me out?

Try this one.
Attached File  dsdt_fix.aml.zip   47.34KB   117 downloads

#24
jazzyguy

jazzyguy

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
  • Gender:Male
  • Location:USA
It works! Thanks a bunch!

#25
archintosh

archintosh

    InsanelyMac Protégé

  • Members
  • Pip
  • 37 posts
  • Gender:Male

Try it:Attached File  dsdt_fix.aml.zip   27.02KB   214 downloads

@archintosh
Read the post 6#.


Now I can go into sleep if I choose sleep from menu n' wake it up by pressing space bar. Closing my laptop lid is not putting my laptop into sleep. Is it normal? Because I used to be able to put my laptop into sleep by closing lid.

Thanx

#26
alexkidd

alexkidd

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts

Try it:Attached File  dsdt_fix.aml.zip   27.02KB   214 downloads



thanks Zprood. but when running on battery, the icon does not shows correctly, it shows running on Power Adaptor with (Not Charging)

#27
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
@Zprood
Wow,u r really busy :rolleyes:

#28
Peter_sm

Peter_sm

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 281 posts
Is it possible to make a patch for this :rolleyes: looks very intrestingm but I not sure to update my DSDT files, I have 2 that I just testing,

@Zprood is it possible for you to help me with my 2 DSDT files :)

Thanks


BR

Peter

Attached Files



#29
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN

Now I can go into sleep if I choose sleep from menu n' wake it up by pressing space bar. Closing my laptop lid is not putting my laptop into sleep. Is it normal? Because I used to be able to put my laptop into sleep by closing lid.

Thanx

Here is my LID device:
Device (LID0)
		{
			Name (_HID, EisaId ("PNP0C0D"))
			Name (_PRW, Package (0x02)
			{
				0x12, 
				0x03
			})
			Method (_LID, 0, NotSerialized)
			{
				XOr (LPOL, One, Local0)
				If (Local0)
				{
					Notify (SLPB, 0x80)
				}
				Else
				{
					Store (One, LPOL)
				}
				Return (LPOL)
			}
		}
By using this code i can get sleep work when close lid under lion, but can't automatic wakeup while opening lid, need use power button or usb device. In fact, i edit some place of it, the original is:
Name (_PRW, Package (0x02)
			{
				0x1B, 
				0x03
			})
I change 0x1B to 0x12 to get sleep, lid sleep doesn't work by default on 10.7.x, but works with 10.6.x.

@alexkidd
This driver may take a little time to calculate the battery status, it takes 30 seconds though.


@weizh126
Actually yes, I dropped too much reading stuff, it is annoying you know that. :rolleyes:

#30
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
@Zprood
Do not waste too much time,hackintosh is not a "real" job.

#31
archintosh

archintosh

    InsanelyMac Protégé

  • Members
  • Pip
  • 37 posts
  • Gender:Male

Here is my LID device:

Device (LID0)
		 {
			 Name (_HID, EisaId ("PNP0C0D"))
			 Name (_PRW, Package (0x02)
			 {
				 0x12, 
				 0x03
			 })
			 Method (_LID, 0, NotSerialized)
			 {
				 XOr (LPOL, One, Local0)
				 If (Local0)
				 {
					 Notify (SLPB, 0x80)
				 }
				 Else
				 {
					 Store (One, LPOL)
				 }
				 Return (LPOL)
			 }
		 }
By using this code i can get sleep work when close lid under lion, but can't automatic wakeup while opening lid, need use power button or usb device. In fact, i edit some place of it, the original is:
Name (_PRW, Package (0x02)
			 {
				 0x1B, 
				 0x03
			 })
I change 0x1B to 0x12 to get sleep, lid sleep doesn't work by default on 10.7.x, but works with 10.6.x.


Cool..now LID is okay. I need to press space bar to wake it up. It's a bit weird though, I just converted some codes into 8-bit codes but sleeping behavior is affected also. But thanx a lot..you're the man!!

#32
Bungo

Bungo

    InsanelyMac Sage

  • Coders
  • 318 posts
  • Gender:Male

(mindlessmissy @ Nov 20 2011, 07:10 PM)
The battery indicator never quite gets to 100% even though the battery is fully charged ...
Stays on 99% !?!


Same here but 98%. Is it ok?

#33
loKEY

loKEY

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts
don't want to be a bugger but i can get my dsdt to compile with the battery fixes, havn't seen any other battery sections that look similar, can someone take a look?

Attached Files



#34
jazzyguy

jazzyguy

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
  • Gender:Male
  • Location:USA
How do you know exactly which parts need to be patched? Some you left as 16, some you changed to 8.

EDIT: Zprood, I am now attempting to migrate the changes you made from my dsdt to another. I have put them all in correctly, but it won't compile. It errors on the sections like this:

(this is just a snippet of course)

Store ("battery 0", Debug)
								If (And (BATP, One))
								{
									Store (DerefOf (Index (Local0, 0x11)), Local2)
									If (LEqual (Local2, Zero))
									{
										Store (Zero, INCH)
										Store (Zero, IDIS)
										Store (Zero, INAC)
										Store (Zero, B1B2)
										AXC0
										AXC1
										Store (One, PSSB)
										Store (Package (0x02)
											{
												Zero, 
												Zero
											}, Local4)
									}

It says that B1B2 is not receiving enough values, and it requires two. And then it says that where AXC1 is, it expects a (.

How can I make this compile? I'd love to help take what you did for me and share it with others as well.

EDIT2: Also, I've discovered the DSDT you edited for me produces the same errors.

#35
miqlas

miqlas

    InsanelyMac Protégé

  • Members
  • PipPip
  • 80 posts
Hello Zprood!

Thanks for Your hard work, we really appreciate it. I followed Your guide, i thought i have enough knowledge because i adopted all of the DSDT modifications alone, and my Lion install works very well, but this is hard :)
I found some section, edited, but there is some, what i can't found. I tried to look it in the fixed dsdts, what you made, but didn't helped a lot. Can You look it into? (I'm really don't want ask this, but my OSX never worked very well with WoodooBattery kext, sometimes it loads correctly and displays the correct walues, sometimes it shows only an X in the battery icon (Maybe an DSDT parse error? - But with the original DSDT its also happend.) Thats why i want to use this kext.

Thanks a lot and i wish all the best!
m.

My DSDT: Attached File  DSDT_20111123.zip   44.21KB   73 downloads

#36
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN

Hello Zprood!

Thanks for Your hard work, we really appreciate it. I followed Your guide, i thought i have enough knowledge because i adopted all of the DSDT modifications alone, and my Lion install works very well, but this is hard :(
I found some section, edited, but there is some, what i can't found. I tried to look it in the fixed dsdts, what you made, but didn't helped a lot. Can You look it into? (I'm really don't want ask this, but my OSX never worked very well with WoodooBattery kext, sometimes it loads correctly and displays the correct walues, sometimes it shows only an X in the battery icon (Maybe an DSDT parse error? - But with the original DSDT its also happend.) Thats why i want to use this kext.

Thanks a lot and i wish all the best!
m.

My DSDT: Attached File  DSDT_20111123.zip   44.21KB   73 downloads

Read post 1#, 6#, also take a look of alexkidd's dsdt, your file is similar with his.
TIPS:
search BAT0 device, you will find BIF & BST method, it relates two method upon, method GBIF, GBST. The thing you can do is edit the 16bit registers of GBIF and GBST, also it is needed if it exists under BIF and BST.

#37
Babiloe

Babiloe

    InsanelyMac Protégé

  • Members
  • PipPip
  • 59 posts
Hello Zprood,
I dont have RAM, ByteAcc, Lock, Preserve but i have BRAM, ByteAcc, Lock, Preserve
it is same?

asus U36SD Notebook

Can you change it for me?
Regards,

Attached Files



#38
Jingu

Jingu

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 124 posts
Terrific Project!!. Works great on my Asus M60J notebook.

Posted Image


Very clever coming up with Method B1B2. It simplified all my conversions to 8-bit.

The only issue I had was that your SmartBatteryManager kext was not auto-loading. After every reboot, I had to manually type in terminal: kextload /Extra/Extensions/AppleSmartBatteryManger.kext.

I solved that issue by going in the info plist and changing Bundle Version 1 to Bundle Version 2011.11.20 (the date, just like gsly did). I think it's because there's already an AppleSmartBatteryManager kext in S/L/E, and for your kext to auto-load, the Bundle Version number needs to be higher than the Apple one. At least, that's how it is on my Asus notebook.

I really like your AppleSmartBatteryManager. It gives bonus battery cycle info without having to add Method _BIX. It also seems to be more sensitive to very small capacity drops that gsly's AppleSmartBattery didn't pick up on my laptop. I have a very old battery that does not stay at 100% for more than a day or two. I charged it to full 100% capacity at 1219 mAh. The next day, it dropped to 1212 mAh. Both your kext and BatteryEater Pro on Windows picked up the 7 mAh drop and were indicating 99%. But gsly's kext was still saying full 100% at 1219 mAh. For some reason, yours seems to be more sensitive to small drops.

I created a complete dsl instruction file of all the edits I did to get SmartBatteryManager working on Lion for my Asus M60J, but should be applicable to all the Asus Core i3/i5/i7 notebooks. From what I've seen so far, all the Asus Core i notebooks have identical battery dsdt.

The Lion dsdt edits instruction file is at the bottom of my post# 95 in glsy's thread under the name Asus_Coreix_Lion_Edits. I have also included a full dsdt of my Asus M60J on Lion in case they don't understand a particular instruction.

http://www.insanelym...dpost&p=1771830

#39
Sanky18

Sanky18

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
  • Gender:Male
Hi Zprood!!
I have a lenovo g460 running 10.7.2 and i tried to make the edits that u have showed in ur guide but getting too many errors. Plz help me with this. Thanks a lot mate.

Edit: I tried again and got it to work but battery shows 100% all the time. I don't think i'll b able to do it. Plz if u edit it for me it would be really appreciated. Thanks. DSDT is attached.

Attached Files



#40
jazzyguy

jazzyguy

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
  • Gender:Male
  • Location:USA
Some of us users are getting readings of full, and at 98%. Is there a fix for this?





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