- 积分
- 321
- 最后登录
- 2021-1-1
- 精华
- 0
- 阅读权限
- 30
- 主题
- 82
- UID
- 4704294
- 帖子
- 802
- PB币
- 1145
- 威望
- 0
- 贡献
- 0
- 技术
- 6
- 活跃
- 1161
( ̄ω ̄=)二萌萌~~
- UID
- 4704294
- 帖子
- 802
- PB币
- 1145
- 贡献
- 0
- 技术
- 6
- 活跃
- 1161
|
发表于 2017-3-28 23:54:21
IP属地天津
来自手机
|显示全部楼层
本帖最后由 ailick 于 2017-3-29 18:09 编辑
zhongbuxiao 发表于 2017-3-28 23:09
在加载了ACPIBatteryManager.kext这个驱动后有电量显示,但是节能设置选项里还是没有变化,是什么情况?还 ...
和电源有关的就是BAT ,LPC , RTC,最好是修改DSDT的方式。按理说只要BAT有了,电源管理就能用,只是需要LPC和RTC保证睡眠和唤醒。你用看IO设备的那个软件看下有没有BAT0这个东西,如果没有那就需要DSDT电源补丁了,要是有的话,你可能遇到一个{需要来回修改dsdt或者更换驱动并且多次测试才能解决的}问题了
DSDT电源补丁:(来自派奇由 dxxs 制作 )
- # ==== Field devide 字段拆分 ====
- #DSCP
- into device label EC0 code_regex DSCP,\s+16 replace_matched begin DSC0,8,DSC1,8 end;
- #LACP
- into device label EC0 code_regex LACP,\s+16 replace_matched begin LAC0,8, LAC1,8 end;
- #DSVG
- into device label EC0 code_regex DSVG,\s+16 replace_matched begin DSV0,8, DSV1,8 end;
- #MCUR
- into device label EC0 code_regex MCUR,\s+16 replace_matched begin MCU0,8, MCU1,8 end;
- #MBRM
- into device label EC0 code_regex MBRM,\s+16 replace_matched begin MBR0,8, MBR1,8 end;
- #MBCV
- into device label EC0 code_regex MBCV,\s+16 replace_matched begin MBC0,8, MBC1,8 end;
- #VERN
- into device label EC0 code_regex VERN,\s+32 replace_matched begin VER0,8,VER1,8,VER2,8,VER3,8 end;
- #SMW0
- into device label EC0 code_regex SMW0,\s+16 replace_matched begin SMW0,8, SMW1,8 end;
- # ==== Replace called method 替换调用方法 ====
- #DSCP
- into method label UPBI code_regex \(\^\^PCI0.LPCB.EC0.DSCP replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.DSC0,^^PCI0.LPCB.EC0.DSC1) end;
- into method label UPBS code_regex \(\^\^PCI0.LPCB.EC0.DSCP replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.DSC0,^^PCI0.LPCB.EC0.DSC1) end;
- #LACP
- into method label UPBI code_regex \(\^\^PCI0.LPCB.EC0.LACP replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.LAC0,^^PCI0.LPCB.EC0.LAC1) end;
- #DSVG
- into method label UPBI code_regex \(\^\^PCI0.LPCB.EC0.DSVG replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.DSV0,^^PCI0.LPCB.EC0.DSV1) end;
- #MCUR
- into method label UPBS code_regex \(\^\^PCI0.LPCB.EC0.MCUR replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.MCU0,^^PCI0.LPCB.EC0.MCU1) end;
- #MBRM
- into method label UPBS code_regex \(\^\^PCI0.LPCB.EC0.MBRM replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.MBR0,^^PCI0.LPCB.EC0.MBR1) end;
- into method label UPBS code_regex ,\s\^\^PCI0.LPCB.EC0.MBRM replaceall_matched begin , B1B2(^^PCI0.LPCB.EC0.MBR0,^^PCI0.LPCB.EC0.MBR1) end;
- #MBCV
- into method label UPBS code_regex \(\^\^PCI0.LPCB.EC0.MBCV replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.MBC0,^^PCI0.LPCB.EC0.MBC1) end;
- #BANA
- into method label UPBI code_regex \(\^\^PCI0.LPCB.EC0.BANA replaceall_matched begin (^^PCI0.LPCB.EC0.RECB(0xD2,64) end;
- into method label IVBI code_regex Store\s\(Zero,\s\^\^PCI0.LPCB.EC0.BANA\) replaceall_matched begin ^^PCI0.LPCB.EC0.WECB(0xD2,64,Zero) end;
- #VERN
- into method label WMAB code_regex \(\^\^EC0.VERN replaceall_matched begin (B1B4(^^EC0.VER0,^^EC0.VER1,^^EC0.VER2,^^EC0.VER3) end;
- into method label WMBB code_regex \(\^\^EC0.VERN replaceall_matched begin (B1B4(^^EC0.VER0,^^EC0.VER1,^^EC0.VER2,^^EC0.VER3) end;
- #SMD0
- into method label SMWR code_regex Store\s\(Arg3,\sSMD0\) replaceall_matched begin WECB(0x1C,256,Arg3) end;
- #SMW0
- into method label SMRD code_regex \(SMW0 replaceall_matched begin (B1B2(SMW0, SMW1) end;
- into method label SMWR code_regex Store\s\(Arg3,\sSMW0\) replaceall_matched begin Store(ShiftRight(Arg3,8), SMW1)\nStore(Arg3, SMW0) end;
- #FLD0
- into method label SMRD code_regex \(FLD0 replaceall_matched begin (RECB(0x04, 64) end;
- #FLD1
- into method label SMRD code_regex \(FLD1 replaceall_matched begin (RECB(0x04, 128) end;
- #FLD2
- into method label SMRD code_regex \(FLD2 replaceall_matched begin (RECB(0x04, 192) end;
- #FLD3
- into method label SMRD code_regex \(FLD3 replaceall_matched begin (RECB(0x04, 256) end;
- # ==== Data handling method 数据处理方法 ====
- # utility methods to read/write buffers from/to EC
- 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
- {\n
- ShiftRight(Arg1, 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;
- 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(Arg1, 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;
- into method label B1B2 remove_entry;
- into definitionblock code_regex . insert
- begin
- Method (B1B2, 2, NotSerialized)\n
- {\n
- Return(Or(Arg0, ShiftLeft(Arg1, 8)))\n
- \n
- }\n
- end;
- into method label B1B4 remove_entry;
- into definitionblock code_regex . insert
- begin
- Method (B1B4, 4, NotSerialized)\n
- {\n
- Store(Arg3, Local0)\n
- Or(Arg2, ShiftLeft(Local0, 8), Local0)\n
- Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
- Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
- Return(Local0)\n
- }\n
- end;
复制代码
0%电量补丁:(来自派奇由 dxxs 参考Rehabman制作 )
- # 2x as there is some sort of MaciASL bug...
- # (code_regex_not seems broken)
- #into_all all code_regex_not Mutex\s+\([^,]*,\s+0x00\) code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- #into_all all code_regex_not Mutex\s+\([^,]*,\s+0x00\) code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- # 10x as workaround for MaciASL bug...
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
- into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
复制代码
|
|