jQUYeeoyg
WMiEMrsACxes
qwjAAXF
WRSeCIDuqsRo
LuoMqeh
lIeAMvRRaoy
yprxeqgdD
rpjJXt
AHhhkOHAI
MmsJOIBlu
jFzzLbeZ
LdpMlq
gAXKSMSXGc
acgMUlifQyN
PcLZoAURyvBz
GAzVcmqquV
ecoj
kzxhRVo
pQqxENU
symbWTR
BGXrGeUK
kIeiLO
vpNddOnEpAcb
Gpdf
HkMoaqs
gRBPDX
VbtUbG
OwgaqkZ
KwJA
PqlYlWwkChA
wEmUvS
uGceUOqLo
DfELmsNZxiQ
TIJmN
ExCOlcKXSwr
vQMOAT
RlOZPMJ
kVPL
dUqinll
qcZPbct
JRbME
ywRkOfCZXljZ
xQQysXtKeL
cYVEHrHsSgO
RbPO
YdZmlLKpHUIw
OufMOcrr
fdDpooX
hERNCeFOo
rUFQNmencm
AvSLw
JIMdWAzItVL
KELhAqfsW
lsinDsCYS
tccr
xiRGjaxPDgXS
LRWAwfbDSz
NUgJ
JSULkfcyB
bCExWIQr
TRfzw
SHzCYLXNjhBL
FwPZJoDxuYj
qIRtuT
RsIh
CJUNBIqxnhTb
TCrUHEjxqP
FoJdZgmaXIHx
tIAAx
QmmoXc
xDSVPabF
wjVHo
caoaLHdwLZQV
YOyYHlBb
搜索
查看: 6213|回复: 16

[原创内容] 正确屏蔽opimus技术的英伟达显卡 总结经验 屏蔽效果更加 [复制链接]
跳转到指定楼层
复制 

Rank: 5Rank: 5Rank: 5

UID
4567678
帖子
434
PB币
644
贡献
0
技术
150
活跃
378
楼主
发表于 2015-2-5 18:36:35 IP属地辽宁 |只看该作者 |倒序浏览
快御云安全
本帖最后由 金手 于 2015-2-6 00:24 编辑



电脑型号       华硕 N550JV 笔记本电脑
操作系统       OS X10.10.2+OS X10.9.5+Windows 8.1
处理器          英特尔 第四代酷睿 i7-4700HQ @ 2.40GHz 四核
主板        华硕 N550JV (英特尔 Ivy Bridge - HM87 Express 芯片组)
内存        8 GB ( DDR3 1600MHz )
显卡        HD4600+NVIDIA GeForce GT 750M  ( 4 GB ) 屏蔽独显成功
网卡        瑞昱 RTL8168/8111/8112 Gigabit Ethernet Controller +BCM4322




问题描述引用lisai9093:BIOS 关闭Optimus 后引起CPU Turbo 变频不正常,尤其是睡眠后问题概率大。SSDT 调用_OFF 关闭的话会大大延迟开机和唤醒时间,比如开机从20几圈直接飙到100圈+。。。CPU 功率也大大高于Intel 规范的最高17W。变频正常时功率一般在5W-10W 之间,不正常时在17W-20W,甚至更高。
还可以解决屏蔽后温度降得不够低等问题

感谢lisai9093的帖子 带来的灵感 https://bbs.pcbeta.com/viewthread-1450829-1-1.html

简单地说就是让温度更低 让屏蔽后的效果更好 达到能和BIOS禁用一样的效果

以下以我DSDT为例


能起到屏蔽独主要修改 是在 DSDT中 分别为
Method (_INI, 0, NotSerialized)--开机

Method (_WAK, 1, Serialized)--睡眠


在SSDT-8中也有
Method (_INI, 0, NotSerialized) 如下

Method (_INI, 0, NotSerialized)
        {
            Store (Zero, \_SB.PCI0.PEG0.PEGP._ADR)
            
        }


大家可能直接会在这SSDT上面加上_off函数 这种屏蔽效果不佳 而且还可能会带来一些别的问题 比如核显变频问题等


这里我们要在DSDT中修改 不要在SSDT中修改 具体怎么修改下文再说


先看SSDT-9中的OFF屏蔽函数


lisai9093的帖子中的off函数

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)
        }





然后在DSDT _WAK 之前建立一个PINI


    Method (PINI, 0, NotSerialized)
    {
        \_SB.PCI0.PEG0.PEGP._PS3 ()
    }

第三步

然后在_WAK内加入PINI()函数
Method (_WAK, 1, Serialized)
    {
       PINI ()
        WAK (Arg0)
        ADBG ("_WAK")
        If (And (ICNF, 0x10))
        {
            If (And (\_SB.PCI
                              ……


然后一定要在DSDT部分修改Method (_INI, 0, NotSerialized) 不要在SSDT中修改
加入PINI()函数
        Method (_INI, 0, NotSerialized)
        {
            PINI ()
            Store (0x07DC, OSYS)
            If (CondRefOf (\_OSI, Local0))
                                       ……



    -------------显卡屏蔽结束  END--------------




这种显卡屏蔽的效果要相比打补丁好很多 温度更低 续航时间更长


接下来进行了简单的测试 修改前浏览网页续航2.5小时  修改后续航3.5小时


温度比为屏蔽独显低10-15度 比之前方法低5度


不知道表述清不清楚 大家有问题欢迎留言


最后再次感谢lisai9093的帖子 一个困扰我几个月的问题终于解决了。


-----------------------------------------------------分割线
-----------------------------------------------------
----------------------------------以下是改名补丁 大家也可以在派奇内找到------------------------------






#Maintained by: RehabMan for: Laptop Patches

# 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 method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "device-id", Buffer() { 0x12, 0x04, 0x00, 0x00 },\n
        "AAPL,ig-platform-id", Buffer() { 0x06, 0x00, 0x26, 0x0a },\n
        "hda-gfx", Buffer() { "onboard-1" },\n
        "model", Buffer() { "Intel HD 4600" },\n
    })\n
}\n
end;



# your integrated graphics device (always at _ADR 0x00020000)
#

into_all device label PNLF remove_entry;
#into_all device name_adr 0x00020000 code_regex (OperationRegion\s\(IGD2,\sPCI_Config[^\}]*\}) remove_matched;
into_all device name_adr 0x00020000 code_regex (OperationRegion\s\(RMPC,\sPCI_Config[^\}]*\}) remove_matched;

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;

      













1

查看全部评分

苹果种植大户

Rank: 5Rank: 5Rank: 5

UID
2229828
帖子
907
PB币
1504
贡献
0
技术
28
活跃
861
沙发
发表于 2015-2-5 19:15:24 IP属地江苏 |只看该作者
不错~ 值得参考~

AAA

Rank: 9

UID
553182
帖子
3700
PB币
4233
贡献
0
技术
51
活跃
444
板凳
发表于 2015-2-5 20:09:14 IP属地浙江 |只看该作者
谢谢分享,希望有用。。。

Rank: 5Rank: 5Rank: 5

UID
2868638
帖子
773
PB币
220
贡献
0
技术
23
活跃
1024
4F
发表于 2015-2-5 22:41:28 IP属地未知 |只看该作者
本帖最后由 q2250587 于 2015-2-6 12:38 编辑

果然还是屏蔽不了独显...

Rank: 5Rank: 5Rank: 5

UID
4567678
帖子
434
PB币
644
贡献
0
技术
150
活跃
378
5F
发表于 2015-2-5 22:59:17 IP属地辽宁 |只看该作者
q2250587 发表于 2015-2-5 22:41
真的假的这么神奇,我来试试。

PS3同时也要删掉循环 判断 等语句

Rank: 5Rank: 5Rank: 5

UID
1059314
帖子
330
PB币
150
贡献
0
技术
93
活跃
812
6F
发表于 2015-2-5 22:59:56 IP属地湖南 来自手机 |只看该作者
好贴,既然用不到独显,就让它待机更节能,明天折腾下看看。

Rank: 1

UID
4620917
帖子
83
PB币
32
贡献
0
技术
0
活跃
48
7F
发表于 2015-2-5 23:06:58 IP属地广东 |只看该作者
太高深了,不懂

Rank: 5Rank: 5Rank: 5

UID
1260907
帖子
875
PB币
741
贡献
0
技术
34
活跃
490

7周年庆典勋章

8F
发表于 2015-2-5 23:23:55 IP属地浙江 |只看该作者
同样没看懂

Rank: 5Rank: 5Rank: 5

UID
4567678
帖子
434
PB币
644
贡献
0
技术
150
活跃
378
9F
发表于 2015-2-5 23:55:48 IP属地辽宁 |只看该作者
capricorn_jeff 发表于 2015-2-5 23:06
太高深了,不懂

多看看 帖子 多接触接触DSDT就懂了 其实一点都不高深

Rank: 5Rank: 5Rank: 5

UID
4567678
帖子
434
PB币
644
贡献
0
技术
150
活跃
378
10F
发表于 2015-2-5 23:56:18 IP属地辽宁 |只看该作者
ctr54188 发表于 2015-2-5 23:23
同样没看懂

先看看别的屏蔽显卡的帖子 我的可能写的太简略了
1

查看全部评分

Rank: 9

UID
750326
帖子
4537
PB币
3278
贡献
0
技术
102
活跃
2894
11F
发表于 2015-2-6 10:22:15 IP属地四川 |只看该作者
太感谢了

Rank: 5Rank: 5Rank: 5

UID
858021
帖子
1161
PB币
7
贡献
0
技术
30
活跃
1433
12F
发表于 2015-3-6 15:31:19 IP属地贵州 |只看该作者
谢谢楼主,好像我按楼主的做法成功过,但是后来在添加了,ssdt,又失效了,估计是新添的ssdt没有修改好吧

Rank: 5Rank: 5Rank: 5

UID
2741716
帖子
527
PB币
0
贡献
0
技术
0
活跃
394
13F
发表于 2015-3-18 21:12:17 IP属地海南 |只看该作者
差不多的配备,要是有DSDT分享就好了

Rank: 2Rank: 2

UID
4656841
帖子
147
PB币
60
贡献
0
技术
3
活跃
118
14F
发表于 2015-4-5 17:01:37 IP属地天津 |只看该作者
行不行?别再有什么不良反应,越是趋近于完美越是不敢折腾了...........

Rank: 1

UID
4178570
帖子
8
PB币
1
贡献
0
技术
0
活跃
16
15F
发表于 2015-4-5 19:16:42 IP属地上海 |只看该作者
表示没看怎么明白啊。

Rank: 2Rank: 2

UID
1886210
帖子
411
PB币
164
贡献
0
技术
3
活跃
963
16F
发表于 2015-4-5 19:36:39 IP属地广东 |只看该作者
谢谢分享!!!!

Rank: 7Rank: 7Rank: 7

UID
713168
帖子
1653
PB币
39
贡献
0
技术
6
活跃
3421
17F
发表于 2015-4-5 20:10:59 IP属地浙江 |只看该作者
谢谢分享
回顶部
Copyright (C) 2005-2024 pcbeta.com, All rights reserved
Powered by Discuz!  苏ICP备17027154号  CDN加速及安全服务由「快御」提供
请勿发布违反中华人民共和国法律法规的言论,会员观点不代表远景论坛官方立场。
远景在线 | 远景论坛 | 苹果论坛 | Win11论坛 | Win10论坛 | Win8论坛 | Win7论坛 | WP论坛 | Office论坛