zhoufeng1209 发表于 2019-4-30 21:24

联想小新潮7000-14 电池无法识别 电量显示0%!求高手修改DSDT

先上配置:

联想18款潮7000,i7 8550U处理器
目前睡眠唤醒都正常,就是识别不到电池信息!


原生DSDT及论坛的电池热补丁SSDT
希望高手帮我看下能否修改匹配的电池信息,万分感谢!

limurphy 发表于 2019-5-1 10:40


你的 hotpatch 應該沒問題,可能是 clover -> DSDT patches 有錯誤。


云朵有点甜 发表于 2019-5-1 10:41

#Created By Mison

#BML0,   16,
#BAV0,   16,
#BAC0,   16,
#BRC0,   16,
#BTP0,   16,
#BCC0,   16,
#FCC0,   16,
#BDC0,   16,
#BDV0,   16,
#BMD0,   16,
#MANA,   96,
#DENA,   64,
#CHEM,   32,
#ATE0,   16,
#ATF0,   16,
#FWIN,   64,
#BARC,   128,
#SMDA,   256,

#BAT0 on H_EC
#BAT1 on H_EC
#BAT2 on H_EC

into device label H_EC code_regex BML0,\s+16, replace_matched begin ML00,8,ML01,8, end;
into device label H_EC code_regex BAV0,\s+16, replace_matched begin AV00,8,AV01,8, end;
into device label H_EC code_regex BAC0,\s+16, replace_matched begin AC00,8,AC01,8, end;
into device label H_EC code_regex BRC0,\s+16, replace_matched begin RC00,8,RC01,8, end;
into device label H_EC code_regex BTP0,\s+16, replace_matched begin TP00,8,TP01,8, end;
into device label H_EC code_regex BCC0,\s+16, replace_matched begin CC00,8,CC01,8, end;
into device label H_EC code_regex FCC0,\s+16, replace_matched begin FC00,8,FC01,8, end;
into device label H_EC code_regex BDC0,\s+16, replace_matched begin DC00,8,DC01,8, end;
into device label H_EC code_regex BDV0,\s+16, replace_matched begin DV00,8,DV01,8, end;
into device label H_EC code_regex BMD0,\s+16, replace_matched begin MD00,8,MD01,8, end;
into device label H_EC code_regex CHEM,\s+32, replace_matched begin HEM0,8,HEM1,8,HEM2,8,HEM3,8, end;
into device label H_EC code_regex ATE0,\s+16, replace_matched begin TE00,8,TE01,8, end;
into device label H_EC code_regex ATF0,\s+16, replace_matched begin TF00,8,TF01,8, end;

into method label _BIF code_regex \(BML0, replaceall_matched begin (B1B2(ML00,ML01), end;

into method label _BST code_regex \(BML0, replaceall_matched begin (B1B2(ML00,ML01), end;

into method label _BST code_regex BAV0\), replaceall_matched begin B1B2(AV00,AV01)), end;

into method label _BST code_regex \(BAV0, replaceall_matched begin (B1B2(AV00,AV01), end;

into method label GSBI code_regex \(BAV0, replaceall_matched begin (B1B2(AV00,AV01), end;

into method label _BST code_regex \(BAC0\), replaceall_matched begin (B1B2(AC00,AC01)), end;

into method label _BST code_regex \(BAC0, replaceall_matched begin (B1B2(AC00,AC01), end;

into method label _BST code_regex \(BRC0, replaceall_matched begin (B1B2(RC00,RC01), end;

into method label GSBI code_regex \(BRC0, replaceall_matched begin (B1B2(RC00,RC01), end;

into method label GSBI code_regex \(BTP0, replaceall_matched begin (B1B2(TP00,TP01), end;

into method label GSBI code_regex \(BCC0, replaceall_matched begin (B1B2(CC00,CC01), end;

into method label _BIF code_regex \(FCC0, replaceall_matched begin (B1B2(FC00,FC01), end;

into method label _BIF code_regex \(FCC0\) replaceall_matched begin (B1B2(FC00,FC01)) end;

into method label GSBI code_regex \(FCC0, replaceall_matched begin (B1B2(FC00,FC01), end;

into method label _BIF code_regex \(BDC0, replaceall_matched begin (B1B2(DC00,DC01), end;

into method label GSBI code_regex \(BDC0, replaceall_matched begin (B1B2(DC00,DC01), end;

into method label _BIF code_regex \(BDV0, replaceall_matched begin (B1B2(DV00,DV01), end;

into method label GSBI code_regex \(BDV0, replaceall_matched begin (B1B2(DV00,DV01), end;

into method label GSBI code_regex \(BMD0, replaceall_matched begin (B1B2(MD00,MD01), end;

into method label GSBI code_regex \(MANA, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0x30,96), end;

into method label GSBI code_regex \(DENA, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0x8C,64), end;

into method label GSBI code_regex \(CHEM, replaceall_matched begin (B1B4(HEM0,HEM1,HEM2,HEM3), end;

into method label GSBI code_regex \(ATE0, replaceall_matched begin (B1B2(TE00,TE01), end;

into method label SMTF code_regex \(ATF0, replaceall_matched begin (B1B2(TF00,TF01), end;

into method label GSBI code_regex \(ATF0, replaceall_matched begin (B1B2(TF00,TF01), end;

into method label GSBI code_regex \(FWIN, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0xA0,64), end;

into method label MHIF code_regex \(FWIN, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0xA0,64), end;

into method label GSBI code_regex \(BARC, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0xA8,128), end;

into method label MHPF code_regex Store\s\(FB4,\sSMDA\) replaceall_matched begin \\_SB.PCI0.LPCB.H_EC.WECB(0x04,256,FB4) end;

into method label MHPF code_regex \(SMDA, replaceall_matched begin (\\_SB.PCI0.LPCB.H_EC.RECB(0x04,256), end;

into device label BAT1 parent_label H_EC remove_entry;
into device label BAT2 parent_label H_EC remove_entry;

into method label _STA parent_label BAT0 replace_content begin Return (0x1F) end;

#B1B2
#B1B3
#B1B4
#RECB
#WECB

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
end;

#For 24 bit registers
into method label B1B3 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B3, 3, NotSerialized)\n
{\n
    Store(Arg2, Local0)\n
    Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
    Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
    Return(Local0)\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;

# utility methods to read/write buffers from/to EC
into method label RE1B parent_label H_EC remove_entry;
into method label RECB parent_label H_EC remove_entry;
into device label H_EC 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(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 H_EC remove_entry;
into method label WECB parent_label H_EC remove_entry;
into device label H_EC 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;

# utility methods to read/write buffers from/to EC
into method label RE1B parent_label EC remove_entry;
into method label RECB parent_label EC remove_entry;
into device label EC 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(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 EC remove_entry;
into method label WECB parent_label EC remove_entry;
into device label EC 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;

# 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
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\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;

#Fix Battery 0% Status
#Maintained by: RehabMan for: Laptop Patches
#system_Mutex.txt

#
# Some DSDTs use Mutex objects with non-zero a SyncLevel.Evidently,
# OS X has some difficulty with this part of the ACPI spec, either that
# or the DSDTs are, in fact, codec incorrectly and Windows is ignoring
# it.

# The common result of a non-zero SyncLevel is failure of methods at the
# point of Acquire on the mutext in question.This can result in strange
# behavior, failed battery status, or other issues.
#
# This patch corrects all Mutex objects declared with a non-zero
# SyncLevel to use zero.
#

# 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;

#Logic bug with charging/discharging status (AC adapter detection)
#Some DSDTs suffer from a logic bug where at the point of 100% capacity (fully charged battery), an incorrect #status is returned from _BST. This mostly affects certain ASUS laptops, but also a few others.
#Here is a patch to correct this problem:
into method label FBST code_regex If\s\(CHGS\s\(Zero\)\)[\s]+\{[\s]+Store\s\(0x02,\sLocal0\)[\s]+\}[\s]+Else[\s]+\{[\s]+Store\s\(One,\sLocal0\)[\s]+\} replaceall_matched begin
If (CHGS (Zero))\n
{\n
   Store (0x02, Local0)\n
}\n
Else\n
{\n
   Store (Zero, Local0)\n
}
end;

#Fix HP OMEN Laptop Baterry to enabled percentage and discharge time
into method label SMWR code_regex If\s\(LNot\s\(ECOK\)\)\s+\{\s+Return\s\(0xFF\)\s+\} replaceall_matched begin
If (LEqual (ECOK, One))\n
{\n
   Return (0xFF)\n
}\n
end;

#Fix Hasee YOUYA Laptop Baterry to enabled percentage and discharge time
into method label SMWR code_regex If\s\(LNot\s\(ECON\)\)\s+\{\s+Return\s\(0xFF\)\s+\} replaceall_matched begin
If (LEqual (ECON, One))\n
{\n
   Return (0xFF)\n
}\n
end;

#into definitionblock code_regex . insert
#begin
#External (_SB.PCI0.BATC, DeviceObj)
#end

zhoufeng1209 发表于 2019-5-1 13:00

limurphy 发表于 2019-5-1 10:40 https://www.pcbeta.com/static/image/common/back.gif
你的 hotpatch 應該沒問題,可能是 clover -> DSDT patches 有錯誤。

感谢大神!

zhoufeng1209 发表于 2019-5-1 16:02

云朵有点甜 发表于 2019-5-1 10:41 https://www.pcbeta.com/static/image/common/back.gif


大神,这段代码要如何操作,请指教!感谢!

云朵有点甜 发表于 2019-5-1 18:28

zhoufeng1209 发表于 2019-5-1 16:02
大神,这段代码要如何操作,请指教!感谢!

给dsdt打补丁

penghubingzhou 发表于 2019-5-2 17:41

https://bbs.pcbeta.com/forum.php? ... &extra=#pid49174899已经添加热补丁版本

939872740 发表于 2019-5-25 01:13

楼主的电脑和我的一样,你是换了16G的内存吗

zhoufeng1209 发表于 2019-5-25 15:15

939872740 发表于 2019-5-25 01:13 https://www.pcbeta.com/static/image/common/back.gif
楼主的电脑和我的一样,你是换了16G的内存吗

是的换了16G内存没问题!

939872740 发表于 2019-5-25 20:12

zhoufeng1209 发表于 2019-5-25 15:15 https://www.pcbeta.com/static/image/common/back.gif
是的换了16G内存没问题!

电脑温度怎样?我的啥都不干就快50度了

mcgrylin 发表于 2019-7-9 14:16

limurphy 发表于 2019-5-1 10:40 https://www.pcbeta.com/static/image/common/back.gif
你的 hotpatch 應該沒問題,可能是 clover -> DSDT patches 有錯誤。

大神你好,小弟需要帮助

limurphy 发表于 2019-7-9 17:16

mcgrylin 发表于 2019-7-9 14:16 https://www.pcbeta.com/static/image/common/back.gif
大神你好,小弟需要帮助

你要說明配備及要幫什麼忙,並貼上原生 dsdt +ssdt

mcgrylin 发表于 2019-7-9 18:16

limurphy 发表于 2019-7-9 17:16 https://www.pcbeta.com/static/image/common/back.gif
你要說明配備及要幫什麼忙,並貼上原生 dsdt +ssdt

小弟是新手,装了个黑苹果,华硕K401L,i5-5200u,HD5500显卡,现在电量显示为零,看论坛说要改DSDT,自己提取的原生的DSDT,可自己看了教程直接不会啊,求大神帮忙

mcgrylin 发表于 2019-7-9 18:18

mcgrylin 发表于 2019-7-9 18:16 https://www.pcbeta.com/static/image/common/back.gif
小弟是新手,装了个黑苹果,华硕K401L,i5-5200u,HD5500显卡,现在电量显示为零,看论坛说要改DSDT,自己 ...

10.13.4的系统

limurphy 发表于 2019-7-9 21:54

mcgrylin 发表于 2019-7-9 18:16 https://www.pcbeta.com/static/image/common/back.gif
小弟是新手,装了个黑苹果,华硕K401L,i5-5200u,HD5500显卡,现在电量显示为零,看论坛说要改DSDT,自己 ...


qiuxiangzhi 发表于 2019-7-9 22:26

云朵有点甜 发表于 2019-5-1 10:41 https://www.pcbeta.com/static/image/common/back.gif


你这个是那个热补丁吧,通用的那个?

mcgrylin 发表于 2019-7-10 10:55

limurphy 发表于 2019-7-9 21:54 https://www.pcbeta.com/static/image/common/back.gif


大神,我先试下

mcgrylin 发表于 2019-7-10 11:57

limurphy 发表于 2019-7-9 21:54 https://www.pcbeta.com/static/image/common/back.gif


大神还是不行啊,这个是我从win下提取的,求帮忙

limurphy 发表于 2019-7-10 14:16

mcgrylin 发表于 2019-7-10 11:57 https://www.pcbeta.com/static/image/common/back.gif
大神还是不行啊,这个是我从win下提取的,求帮忙

有安裝 acpibatterymanager.kext ?

mcgrylin 发表于 2019-7-10 15:09

limurphy 发表于 2019-7-10 14:16 https://www.pcbeta.com/static/image/common/back.gif
有安裝 acpibatterymanager.kext ?

有的,但不是最新版
页: [1] 2
查看完整版本: 联想小新潮7000-14 电池无法识别 电量显示0%!求高手修改DSDT