Method (_OFF, 0, Serialized)
{
Store (VGAR, VGAB)
Store (One, LNKD)
While (LNotEqual (LNKS, Zero))
{
Sleep (One)
}
Store (Zero, GO50)
Store (Zero, GO54)
Store (Zero, ^^^LPCB.EC0.NVPR)
Return (Zero)
}
while循环删掉
Method (_OFF, 0, Serialized)
{
Store (VGAR, VGAB)
Store (One, LNKD)
Store (Zero, GO50)
Store (Zero, GO54)
Store (Zero, ^^^LPCB.EC0.NVPR)
Return (Zero)
}
解决了问题 由此突发奇想 修改了我的SSDT 由于我的是IF语句 都同样起到循环的效果
第一步
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
If (LEqual (CTXT, Zero))
{
\_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero)
If (LNotEqual (GPRF, One))
{
Store (VGAR, VGAB) /* \_SB_.PCI0.PEG0.PEGP.VGAB */
}
Store (One, CTXT) /* \_SB_.PCI0.PEG0.PEGP.CTXT */
}
SGOF ()
}
删掉了红色部分的IF判断语句 直接运行结果 改为如下
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
\_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero)
Store (VGAR, VGAB) /* \_SB_.PCI0.PEG0.PEGP.VGAB */
Store (One, CTXT) /* \_SB_.PCI0.PEG0.PEGP.CTXT */
SGOF ()
}
第二步
然后修改_PS3函数 如图同样的方法不进行判断 直接运行
未修改
Method (_PS3, 0, NotSerialized)
{
If (LEqual (OPCE, 0x03))
{
If (LEqual (DGPS, Zero))
{
Store (One, DGPS)
}
Store (0x02, OPCE)
}
Store (0x03, _PSC)
}
修改为这样 再所有语句之前加入_OFF() 如果有的话就不用加 自己判断 大同小异
修改后
Method (_PS3, 0, NotSerialized)
{
_OFF ()
Store (One, DGPS)
Store (0x02, OPCE)
Store (0x03, _PSC)
}
# sometimes there is already IGPU used for other things
into_all all code_regex IGPU, replaceall_matched begin IGFX, end;
# rename GFX0 -> IGPU for better power management
into_all all code_regex GFX0\. replaceall_matched begin IGPU. end;
into_all all code_regex \.GFX0 replaceall_matched begin .IGPU end;
into_all all code_regex \sGFX0, replaceall_matched begin IGPU, end;
into_all all code_regex \(GFX0 replaceall_matched begin (IGPU end;
into_all all label GFX0 set_label begin IGPU end;
into_all all label _SB.PCI0.GFX0 set_label begin _SB.PCI0.IGPU end;
into_all all label \_SB.PCI0.GFX0 set_label begin \_SB.PCI0.IGPU end;
into_all all label _SB.PCI0.GFX0.DD02 set_label begin _SB.PCI0.IGPU.DD02 end;
into_all all label \_SB.PCI0.GFX0.DD02 set_label begin \_SB.PCI0.IGPU.DD02 end;
into_all all label ^^GFX0 set_label begin ^^IGPU end;
into_all all label ^GFX0 set_label begin ^IGPU end;
# Use this patch if your laptop has Haswell graphics
#
into device name_adr 0x00020000 insert
begin
OperationRegion (RMPC, PCI_Config, 0x10, 4)\n
Field (RMPC, AnyAcc, NoLock, Preserve)\n
{\n
BAR1,32,\n
}\n
Device (PNLF)\n
{\n
// normal PNLF declares (note some of this probably not necessary)\n
Name (_ADR, Zero)\n
Name (_HID, EisaId ("APP0002"))\n
Name (_CID, "backlight")\n
Name (_UID, 10)\n
Name (_STA, 0x0B)\n
//define hardware register access for brightness\n
// you can see BAR1 value in RW-Everything under Bus00,02 Intel VGA controler PCI\n
// Note: Not sure which one is right here... for now, going with BAR1 masked\n
//OperationRegion (BRIT, SystemMemory, Subtract(^BAR1, 4), 0xe1184)\n
OperationRegion (BRIT, SystemMemory, And(^BAR1, Not(0xF)), 0xe1184)\n
Field (BRIT, AnyAcc, Lock, Preserve)\n
{\n
Offset(0x48250),\n
LEV2, 32,\n
LEVL, 32,\n
Offset(0x70040),\n
P0BL, 32,\n
Offset(0xc8250),\n
LEVW, 32,\n
LEVX, 32,\n
Offset(0xe1180),\n
PCHL, 32,\n
}\n
Method (_INI, 0, NotSerialized)\n
{\n
// If the BIOS actually sets the values prior to boot, this would be\n
// how (maybe) to capture them. My Envy does not have the capability\n
// to set brightness and I find these values are not set.\n
// The current value could also be in LEVL, and probably is even\n
// though OS X seems to manipulate only the low 16-bits of LEVX to\n
// change brightness.\n
// Because the low-order 16-bits are set to zero on the Envy, enabling\n
// this code causes a blank screen before the login screena appears.\n
//\n
//Store(LEVX, Local0)\n
//Store(ShiftRight(Local0,16), Local1)\n
//Store(And(Local0,0xFFFF), Local2)\n
//Divide(Multiply(Local2, 0xad9), Local1, Local0)\n
//Or(Local0, 0xad90000, Local0)\n
//\n
//REVIEW: wait for vblank to change things\n
//While(LEqual (P0BL, Local1)) {}\n
//\n
// This is part of the "keep startup level"...\n
// see comment above.\n
//Store(Local0, LEVX)\n
//\n
// This 0xC value comes from looking what OS X initializes this\n
// register to after display sleep (using ACPIDebug/ACPIPoller)\n
Store(0xC0000000, LEVW)\n
// Because this laptop starts at full brightness, I just set it right\n
// here. This is to insure _BQC and XBQC return the correct level\n
// at startup.\n
Store(0xad90ad9, LEVX)\n
}\n
// _BCM/_BQC: set/get for brightness level\n
Method (_BCM, 1, NotSerialized)\n
{\n
// store new backlight level\n
Store(Match(_BCL, MGE, Arg0, MTR, 0, 2), Local0)\n
If (LEqual(Local0, Ones)) { Subtract(SizeOf(_BCL), 1, Local0) }\n
Store(Or(DerefOf(Index(_BCL,Local0)),And(LEVX,0xFFFF0000)), LEVX)\n
}\n
Method (_BQC, 0, NotSerialized)\n
{\n
Store(Match(_BCL, MGE, And(LEVX, 0xFFFF), MTR, 0, 2), Local0)\n
If (LEqual(Local0, Ones)) { Subtract(SizeOf(_BCL), 1, Local0) }\n
Return(DerefOf(Index(_BCL, Local0)))\n
}\n
Method (_DOS, 1, NotSerialized)\n
{\n
// Note: Some systems have this defined in DSDT, so uncomment\n
// the next line if that is the case.\n
//External(^^_DOS, MethodObj)\n
^^_DOS(Arg0)\n
}\n
// extended _BCM/_BQC for setting "in between" levels\n
Method (XBCM, 1, NotSerialized)\n
{\n
// store new backlight level\n
If (LGreater(Arg0, XRGH)) { Store(XRGH, Arg0) }\n
If (LAnd(Arg0, LLess(Arg0, XRGL))) { Store(XRGL, Arg0) }\n
Store(Or(Arg0,And(LEVX,0xFFFF0000)), LEVX)\n
}\n
Method (XBQC, 0, NotSerialized)\n
{\n
Store(And(LEVX,0xFFFF), Local0)\n
If (LGreater(Local0, XRGH)) { Store(XRGH, Local0) }\n
If (LAnd(Local0, LLess(Local0, XRGL))) { Store(XRGL, Local0) }\n
Return(Local0)\n
}\n
// Use XOPT=1 to disable smooth transitions\n
Name (XOPT, Zero)\n
// XRGL/XRGH: defines the valid range\n
Name (XRGL, 25)\n
Name (XRGH, 2777)\n
// _BCL: returns list of valid brightness levels\n
// first two entries describe ac/battery power levels\n
Name (_BCL, Package()\n
{\n
2777,\n
748,\n
0,\n
35, 39, 44, 50,\n
58, 67, 77, 88,\n
101, 115, 130, 147,\n
165, 184, 204, 226,\n
249, 273, 299, 326,\n
354, 383, 414, 446,\n
479, 514, 549, 587,\n
625, 665, 706, 748,\n
791, 836, 882, 930,\n
978, 1028, 1079, 1132,\n
1186, 1241, 1297, 1355,\n
1414, 1474, 1535, 1598,\n
1662, 1728, 1794, 1862,\n
1931, 2002, 2074, 2147,\n
2221, 2296, 2373, 2452,\n
2531, 2612, 2694, 2777,\n
})\n
}\n
end;