暗影精灵2笔记本 黑苹果导致电池问题
本帖最后由 794767404 于 2017-8-30 17:42 编辑问题:暗影精灵2笔记本,安装OSX/MacOS后电池电量不变动,接通电源不充电。
配置:
cpu:i5-6300hq
集显:Intel(R) HD Graphics 530
独显GTX960M
主板:惠普8257
补充:因为DSDT未打补丁进MacOS会导致电池异常,所以下面第二步打补丁可以在重置电池前做;或者在Windows下装虚拟机,在虚拟机里打补丁.
解决方案:
第一步:重置电池状态(没有出现电量异常的可以跳过这骤)有三种方法:
方法1、拔掉充电线,长按电源键超过15秒钟
方法2、通过拆机断开电池的电线
方法3、完全耗尽电池的电(耗至电脑完全开不了机)
完成之后不要进osx/macOS,而是进Win10。如果成功的话电池是恢复正常状态的(电量会变动,接通电源正常充电)
第二步:修改ACPI文件,有两种方法:
方法1.用HotPatch文件“SSDT-BATT.aml”并配置config.plist,配合ACPIBatteryManager.kext正常显示电量
(同机型推荐,方便)
将SSDT-BATT.aml放入EFI/ACPI/patched里,并修改config.plist
SortedOrder加入条目"SSDT-BATT.aml";
DSDT Patches里添加如下patch(具体见附件):
change ADJT to XDJT for Battery Hotpatch
change CLRI to XLRI for Battery Hotpatch
change UPBS to XPBS for Battery Hotpatch
change UPBI to XPBI for Battery Hotpatch
change _BST to XBST for Battery Hotpatch
change SMWR to XMWR for Battery Hotpatch
change SMRD to XMRD for Battery Hotpatch
方法2.修改DSDT文件,配合ACPIBatteryManager.kext正常显示电量:
下面的MacIASL补丁是我自己写的,我可以正常使用,如果有错还请大神纠正...
补丁1:经测试,导致电池电量不变的罪魁祸首就是这个ADJT Method.
#Repalce ADJT method
into method label ADJT remove_entry;
into Device label ACEL insert
begin
Method (ADJT, 0, Serialized)\n
{\n
If (_STA ())\n
{\n
If (LEqual (^^LPCB.EC0.ECOK, One))\n
{\n
Store (^^LPCB.EC0.SW2S, Local0)\n
}\n
Else\n
{\n
Store (PWRS, Local0)\n
}\n
If (LAnd (LEqual (^^^LID0._LID (), Zero), LEqual (Local0, Zero)))\n
{\n
If (LNotEqual (CNST, One))\n
{\n
Store (One, CNST)\n
Sleep (0x0BB8)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x36, 0x14)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x37, 0x10)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x34, 0x2A)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x24, Zero)\n
Store (Zero, ^^LPCB.EC0.PLGS)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x22, 0x20)\n
}\n
}\n
ElseIf (LNotEqual (CNST, Zero))\n
{\n
Store (Zero, CNST)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x36, One)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x37, 0x50)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x34, 0x7F)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x24, 0x02)\n
Store (One, ^^LPCB.EC0.PLGS)\n
^^LPCB.EC0.SMWR (0xC6, 0x50, 0x22, 0x40)\n
}\n
}\n
}\n
end;
补丁2:更新了F.25版本的bios后提取DSDT,发现多了一个if语句,会导致osx/macOS里无法识别电池。直接把它删了{:5_278:}#Delete If statement
into method label _BST code_regex If\s+\(LEqual\s+\(BRTE,\s+Zero\)\)\s+\{\s+Store\s+\(0xFFFFFFFF,\s+Index\s+\(PBST,\s+One\)\)\s+\} replaceall_matched begin \n end;
补丁3:字段拆分,这个大家应该都熟悉
#Add B1B2 method for 16-Bit fields
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;
#Add RE1B RECB method for fields more than 32bit
into method label RE1B parent_label EC0 remove_entry;
into method label RECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (RE1B, 1, NotSerialized)\n
{\n
OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
Return(BYTE)\n
}\n
Method (RECB, 2, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
{\n
ShiftRight(Add(Arg1,7), 3, Arg1)\n
Name(TEMP, Buffer(Arg1) { })\n
Add(Arg0, Arg1, Arg1)\n
Store(0, Local0)\n
While (LLess(Arg0, Arg1))\n
{\n
Store(RE1B(Arg0), Index(TEMP, Local0))\n
Increment(Arg0)\n
Increment(Local0)\n
}\n
Return(TEMP)\n
}\n
end;
# utility methods to read/write buffers from/to EC
into method label WE1B parent_label EC0 remove_entry;
into method label WECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (WE1B, 2, NotSerialized)\n
{\n
OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
Store(Arg1, BYTE)\n
}\n
Method (WECB, 3, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
// Arg2 - value to write\n
{\n
ShiftRight(Add(Arg1,7), 3, Arg1)\n
Name(TEMP, Buffer(Arg1) { })\n
Store(Arg2, TEMP)\n
Add(Arg0, Arg1, Arg1)\n
Store(0, Local0)\n
While (LLess(Arg0, Arg1))\n
{\n
WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n
Increment(Arg0)\n
Increment(Local0)\n
}\n
}\n
end;
#Deal with the 16-bit EC fields
into device label EC0 code_regex BADC,\s+16, replace_matched begin ADC0,8,ADC1,8, end;
into device label EC0 code_regex BFCC,\s+16 replace_matched begin FCC0,8,FCC1,8 end;
into device label EC0 code_regex MCUR,\s+16 replace_matched begin CUR0,8,CUR1,8 end;
into device label EC0 code_regex MBRM,\s+16 replace_matched begin BRM0,8,BRM1,8 end;
into device label EC0 code_regex MBCV,\s+16 replace_matched begin BCV0,8,BCV1,8 end;
into device label EC0 code_regex SMW0,\s+16 replace_matched begin MW00,8,MW01,8 end;
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.BADC, replaceall_matched begin (B1B2(\^\^PCI0\.LPCB\.EC0\.ADC0,\^\^PCI0\.LPCB\.EC0\.ADC1), end;
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.BFCC, replaceall_matched begin (B1B2(\^\^PCI0\.LPCB\.EC0\.FCC0,\^\^PCI0\.LPCB\.EC0\.FCC1), end;
into method label UPBS code_regex \(\^\^PCI0\.LPCB\.EC0\.MCUR, replaceall_matched begin (B1B2(\^\^PCI0\.LPCB\.EC0\.CUR0,\^\^PCI0\.LPCB\.EC0\.CUR1), end;
into method label UPBS code_regex \(\^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(\^\^PCI0\.LPCB\.EC0\.BRM0,\^\^PCI0\.LPCB\.EC0\.BRM1), end;
into method label CLRI code_regex \(\^\^LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(\^\^LPCB\.EC0\.BRM0,\^\^LPCB\.EC0\.BRM1), end;
into method label UPBS code_regex \(\^\^PCI0\.LPCB\.EC0\.MBCV, replaceall_matched begin (B1B2(\^\^PCI0\.LPCB\.EC0\.BCV0,\^\^PCI0\.LPCB\.EC0\.BCV1), end;
into method label SMRD code_regex \(SMW0, replaceall_matched begin (B1B2(MW00,MW00), end;
into method label SMWR code_regex Store\s\(Arg3,\sSMW0\) replaceall_matched begin Store(Arg3, MW00)\nStore(ShiftRight(Arg3,8),MW01) end;
#Deal with the fields more than 32-Bit
into device label EC0 code_regex (SMD0,)\s+(256) replace_matched begin SMDY,%2,//%1%2 0x04 end;
into device label EC0 code_regex (FLD0,)\s+(64) replace_matched begin FLD4,%2,//%1%2 0x04 end;
into device label EC0 code_regex (FLD1,)\s+(128) replace_matched begin FLD5,%2,//%1%2 0x04 end;
into device label EC0 code_regex (FLD2,)\s+(192) replace_matched begin FLD6,%2,//%1%2 0x04 end;
into device label EC0 code_regex (FLD3,)\s+(256) replace_matched begin FLD7,%2,//%1%2 0x04 end;
into method label SMRD code_regex \(FLD0, replaceall_matched begin (RECB(0x04,64), end;
into method label SMRD code_regex \(FLD1, replaceall_matched begin (RECB(0x04,128), end;
into method label SMRD code_regex \(FLD2, replaceall_matched begin (RECB(0x04,192), end;
into method label SMRD code_regex \(FLD3, replaceall_matched begin (RECB(0x04,256), end;
into method label SMWR code_regex Store\s+\((.*),\s+SMD0\) replaceall_matched begin WECB(0x04,256,%1) end;
2017.6.1更新电池HotPatch文件:
本帖最后由 794767404 于 2017-2-7 19:10 编辑
补充:
因为DSDT未打补丁进MacOS会导致电池异常,所以第二步打补丁可以在重置电池前做;或者在Windows下装虚拟机,在虚拟机里打补丁.
win10下电池异常图片
把电池拆了就恢复了 Aimisoy糊涂 发表于 2016-7-20 08:49
把电池拆了就恢复了
哦,这是为什么?会损坏电池吗,挺担心的。 我的光影精灵也和楼主一样的情况。现在也没找到解决的方法。 会损伤电池的,我的索尼笔记本因为黑苹果坏了一块电池。
建议你用黑苹果时插电用。 absktv 发表于 2016-7-20 10:53
我的光影精灵也和楼主一样的情况。现在也没找到解决的方法。
好吧,找到方法请告诉我哦,谢谢啦 andyandy 发表于 2016-7-20 11:00
会损伤电池的,我的索尼笔记本因为黑苹果坏了一块电池。
建议你用黑苹果时插电用。
不是吧...只能谨慎点了,毕竟新机心疼啊 没办法,再次求助。
补充
本帖最后由 794767404 于 2016-7-21 09:18 编辑17F网友补充:DSDT+Kext,电池驱动后也没用。进WIN10电池还是没响应不掉电。 只能先拆机放电了,唉 WLS.pkg 发表于 2016-7-20 18:31
最好把电池驱动了
dsdt+kext
大神又是你哈,看了很多教程还是不会改dsdt,能不能帮我改改dsdt驱动电池呢? 没事,至少提供了思路。就是觉得奇怪,没驱动为什么会影响到win10的电量显示... 显示电量,只能DSDT+Kext,这个我已经实现了。只是进了黑苹果后,整个机器的电池会出现丢失状态的情况,退出黑果再进Win,会显示”未充电“,只到电池自己耗完,才可以在Win中找回。但一回黑果,又会丢失。 DSDT+Kext,电池驱动后也没用。还是会进WIN电池没响应。 absktv 发表于 2016-7-20 20:54
DSDT+Kext,电池驱动后也没用。还是会进WIN电池没响应。
~(>_<)~,还有什么思路吗?看来你折腾这个问题挺久了.. 论坛里面好像有电池的解决方案
liujie1024 发表于 2016-7-20 21:29
论坛里面好像有电池的解决方案
在哪?感觉这不是普通的电池问题,因为他影响到了win10的电量显示