Jump to content
19 posts in this topic

Recommended Posts

Archive.zip

Can u guys help me guide how to disable OPTIMUS in this laptop.

there its no bios option for doing this.

I read many threads about DSDT edits but there its no aio guide how to do it.

I have attached all acpi tables in archive.zip.

I found method OFF in ssdt-6 but cannot compile it becouse of errors.

 

This dell seems to be too complicated for me.

 

Specs

Intel® Core™ i7-3632QM

 

  • Intel® HM77
  • NVIDIA® GeForce® GT 640M with 2GB GDDR5 VRAM
  •  

 

DarwinDumper_2.7.8_INSYDE_Corp._ML_dell.zip

Link to comment
https://www.insanelymac.com/forum/topic/290743-disable-optimus-on-xps-15-l521x/
Share on other sites

hello

 

take a look here

 

http://olarila.com/forum/viewtopic.php?f=7&t=3084

 

good hack

Hi,

 

The images are not working somehow, and it is in Spanish i think? 

 

Adding the information as described in the topic, will produce uncommon errors, i'll see if i manage to create a guide this evening. Will edit this dsdt first. 

The card should be disabled now. 

I have only fixed the errors to compile the DSDT, so you will have to patch it to function with OS X.

The _T_ patch has been applied, that is it, you will need to do the rest yourself, or request it :) 

 

I'll start working on a guide for this now. 

 

PS: If you want to know what has been done, search for PINI, and look under PEGP.

DSDT.aml.zip

Hi Lejenk,

 

Looking at your DSDT, it seems you were calling PINI inside PEGP's _INI. I don't know if _INI there is called on every boot; however, _SB.PCI0._INI definitely is (I forcibly enable my laptop's Wi-Fi LED in _INI and it turns on some milliseconds after I see the Apple logo). (Also according to THe KiNG, PINI apparently stands for PCI0 Wake/Ini, although of course it's arbitrarily named.)

 

I was lazy compared to you: I didn't move the functions from PEG0 etc. into the DSDT proper (duplicate device definitions are ignored by the ACPI subsystem, which I learnt from reading this) but I declared the functions as External (if you can keep the DSDT size down, go for it as I think you make boot just a tiny bit faster). When dealing with External stuff, iasl always messes up something and I don't know how to forcibly override its flawed autodetection of things. In this case, it thought that the \_SB.PCI0.PEG0.PEGP._PS3 call was an additional argument to the _DSM call. The workaround I used this time was to put _PS3 in a "If (One)" call.

 

After reading this, I've also taken to turning off Optimus through the _DSM + _PS3 functions which is the "right" way to do it according to Lekensteyn here: http://unix.stackexchange.com/a/49932

 

EDIT: I looked again at your DSDT and realised that the _PS3 call doesn't do anything. It checks to see if OMPR == 0x03 but OMPR (which is a named variable, not a register, so it's not going to get changed externally) is only changed through calls to _DSM.

Edited by qwerty12
  • Like 1

Hi Lejenk,

 

Looking at your DSDT, it seems you were calling PINI inside PEGP's _INI. I don't know if _INI there is called on every boot; however, _SB.PCI0._INI definitely is (I forcibly enable my laptop's Wi-Fi LED in _INI and it turns on some milliseconds after I see the Apple logo). (Also according to THe KiNG, PINI apparently stands for PCI0 Wake/Ini, although of course it's arbitrarily named.)

 

I was lazier than you: I didn't move the functions from PEG0 etc. into the DSDT proper (duplicate device definitions are ignored by the ACPI subsystem, which I learnt from reading this) but I declared the functions as External (if you can keep the DSDT size down, go for it as I think you make boot just a tiny bit faster). When dealing with External stuff, iasl always messes up something and I don't know how to forcibly override its flawed autodetection of things. In this case, it thought that the \_SB.PCI0.PEG0.PEGP._PS3 call was an additional argument to the _DSM call. The workaround I used this time was to put _PS3 in a "If (One)" call.

 

After reading this, I've also taken to turning off Optimus through the _DSM + _PS3 functions which is the "right" way to do it according to Lekensteyn here: http://unix.stackexchange.com/a/49932

Can you be a bit more specific on how you disabled it / post the code?? thanks!

Can you be a bit more specific on how you disabled it / post the code?? thanks!

cd ~/Downloads
mkdir Archive && cd Archive
unzip ../Archive.zip #from first post

#Decompile, recompile and decompile the dsdt to ensure we have a DSDT with iasl's optimisations applied
iasl -d dsdt.aml
iasl dsdt.dsl
iasl -d dsdt.aml

mv dsdt.dsl dsdt.orig.dsl
unzip ../DSDT.aml.zip #from my post
iasl -d dsdt.aml
iasl dsdt.dsl
iasl -d dsdt.aml

diff -u dsdt.orig.dsl DSDT.dsl #which produces:
--- dsdt.orig.dsl	2013-08-07 16:23:47.000000000 +0100
+++ DSDT.dsl	2013-08-07 16:26:04.000000000 +0100
@@ -3,23 +3,23 @@
  * AML Disassembler version 20130725-64 [Jul 31 2013]
  * Copyright (c) 2000 - 2013 Intel Corporation
  * 
- * Disassembly of DSDT.aml, Wed Aug  7 16:23:47 2013
+ * Disassembly of DSDT.aml, Wed Aug  7 16:26:04 2013
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x0000A0CC (41164)
+ *     Length           0x0000A11E (41246)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0x79
+ *     Checksum         0x03
  *     OEM ID           "DELL  "
  *     OEM Table ID     "CL09   "
  *     OEM Revision     0x00000000 (0)
- *     Compiler ID      "ASL "
- *     Compiler Version 0x00040000 (262144)
+ *     Compiler ID      "INTL"
+ *     Compiler Version 0x20130725 (538117925)
  */
 DefinitionBlock ("DSDT.aml", "DSDT", 1, "DELL  ", "CL09   ", 0x00000000)
 {
     /*
-     * iASL Warning: There were 6 external control methods found during
+     * iASL Warning: There were 8 external control methods found during
      * disassembly, but additional ACPI tables to resolve these externals
      * were not specified. This resulting disassembler output file may not
      * compile because the disassembler did not know how many arguments
@@ -30,6 +30,8 @@
      *     iasl -e <dsdt.aml,ssdt2.aml...> -d <ssdt1.aml>
      */
     External (_SB_.PCI0.IEIT.EITV, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
+    External (_SB_.PCI0.PEG0.PEGP._DSM, MethodObj)    // Warning: Unresolved Method, guessing 4 arguments (may be incorrect, see warning above)
+    External (_SB_.PCI0.PEG0.PEGP._PS3, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
     External (ECST, MethodObj)    // Warning: Unresolved Method, guessing 1 arguments (may be incorrect, see warning above)
     External (HDOS, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
     External (HNOT, MethodObj)    // Warning: Unresolved Method, guessing 1 arguments (may be incorrect, see warning above)
@@ -2850,8 +2852,25 @@
         If (LEqual (DBGS, Zero)) {}
     }
 
+    Method (PINI, 0, NotSerialized)
+    {
+        \_SB.PCI0.PEG0.PEGP._DSM (Buffer (0x10)
+            {
+                /* 0000 */   0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
+                /* 0008 */   0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0
+            }, 0x0100, 0x1A, Buffer (0x04)
+            {
+                 0x01, 0x00, 0x00, 0x03
+            })
+        If (One)
+        {
+            \_SB.PCI0.PEG0.PEGP._PS3 ()
+        }
+    }
+
     Method (_WAK, 1, Serialized)  // _WAK: Wake
     {
+        PINI ()
         If (LAnd (LEqual (\_SB.PCI0.LPCB.EC0.AAST, One), LEqual (\_SB.PCI0.LPCB.EC0.AAEN, One)))
         {
             Store (Zero, GP53)
@@ -3545,6 +3564,7 @@
         Method (_INI, 0, NotSerialized)  // _INI: Initialize
         {
             Store (0x07D0, OSYS)
+            PINI ()
             If (CondRefOf (\_OSI, Local0))
             {
                 If (_OSI ("Windows 2001"))
  • Like 4
cd ~/Downloads
mkdir Archive && cd Archive
unzip ../Archive.zip #from first post

#Decompile, recompile and decompile the dsdt to ensure we have a DSDT with iasl's optimisations applied
iasl -d dsdt.aml
iasl dsdt.dsl
iasl -d dsdt.aml

mv dsdt.dsl dsdt.orig.dsl
unzip ../DSDT.aml.zip #from my post
iasl -d dsdt.aml
iasl dsdt.dsl
iasl -d dsdt.aml

diff -u dsdt.orig.dsl DSDT.dsl #which produces:
--- dsdt.orig.dsl	2013-08-07 16:23:47.000000000 +0100
+++ DSDT.dsl	2013-08-07 16:26:04.000000000 +0100
@@ -3,23 +3,23 @@
  * AML Disassembler version 20130725-64 [Jul 31 2013]
  * Copyright (c) 2000 - 2013 Intel Corporation
  * 
- * Disassembly of DSDT.aml, Wed Aug  7 16:23:47 2013
+ * Disassembly of DSDT.aml, Wed Aug  7 16:26:04 2013
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x0000A0CC (41164)
+ *     Length           0x0000A11E (41246)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0x79
+ *     Checksum         0x03
  *     OEM ID           "DELL  "
  *     OEM Table ID     "CL09   "
  *     OEM Revision     0x00000000 (0)
- *     Compiler ID      "ASL "
- *     Compiler Version 0x00040000 (262144)
+ *     Compiler ID      "INTL"
+ *     Compiler Version 0x20130725 (538117925)
  */
 DefinitionBlock ("DSDT.aml", "DSDT", 1, "DELL  ", "CL09   ", 0x00000000)
 {
     /*
-     * iASL Warning: There were 6 external control methods found during
+     * iASL Warning: There were 8 external control methods found during
      * disassembly, but additional ACPI tables to resolve these externals
      * were not specified. This resulting disassembler output file may not
      * compile because the disassembler did not know how many arguments
@@ -30,6 +30,8 @@
      *     iasl -e <dsdt.aml,ssdt2.aml...> -d <ssdt1.aml>
      */
     External (_SB_.PCI0.IEIT.EITV, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
+    External (_SB_.PCI0.PEG0.PEGP._DSM, MethodObj)    // Warning: Unresolved Method, guessing 4 arguments (may be incorrect, see warning above)
+    External (_SB_.PCI0.PEG0.PEGP._PS3, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
     External (ECST, MethodObj)    // Warning: Unresolved Method, guessing 1 arguments (may be incorrect, see warning above)
     External (HDOS, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
     External (HNOT, MethodObj)    // Warning: Unresolved Method, guessing 1 arguments (may be incorrect, see warning above)
@@ -2850,8 +2852,25 @@
         If (LEqual (DBGS, Zero)) {}
     }
 
+    Method (PINI, 0, NotSerialized)
+    {
+        \_SB.PCI0.PEG0.PEGP._DSM (Buffer (0x10)
+            {
+                /* 0000 */   0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
+                /* 0008 */   0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0
+            }, 0x0100, 0x1A, Buffer (0x04)
+            {
+                 0x01, 0x00, 0x00, 0x03
+            })
+        If (One)
+        {
+            \_SB.PCI0.PEG0.PEGP._PS3 ()
+        }
+    }
+
     Method (_WAK, 1, Serialized)  // _WAK: Wake
     {
+        PINI ()
         If (LAnd (LEqual (\_SB.PCI0.LPCB.EC0.AAST, One), LEqual (\_SB.PCI0.LPCB.EC0.AAEN, One)))
         {
             Store (Zero, GP53)
@@ -3545,6 +3564,7 @@
         Method (_INI, 0, NotSerialized)  // _INI: Initialize
         {
             Store (0x07D0, OSYS)
+            PINI ()
             If (CondRefOf (\_OSI, Local0))
             {
                 If (_OSI ("Windows 2001"))

 

Thanks Pal, got it to work this way too, this really seems the right way to do this... Altought I don't know it's advantages than just calling OFF function =p.

  • Like 1

After "fixing" your SSDT-6 so that iasl will actually produce an aml file from the dsl, I put a print statement in the _PS3 method telling me if it's actually going to call _OFF, turning off the card, which would only happen if OMPR equals 0x03. Lo and behold, it does (the first instance of the message is due to being called from _INI and the second from me telling acpiexec to call it again):

 

post-112740-0-31926400-1375935662_thumb.png

 

After looking at your ACPI tables, the *only* way OMPR can be changed is through _DSM (when calling it with the specific arguments that are in the PINI method) and _PS3 itself. OMPR is a named variable; it is not pointing to a register and cannot be changed externally. In addition, it is initialised with 0x02 so _PS3 will not work until the call to _DSM has been made from PINI.

 

This means that the _DSM way is the right way for your laptop because all other ways would've just made _PS3 not call _OFF. (You could, of course, skip _PS3 and call _OFF directly but you don't really want to do that according to Lekensteyn.) I didn't mess up with the External declarations - they are indeed for the right functions in the right place - because acpiexec is finding the _PS3 function fine (and we know it's found _DSM because of OMPR changing).

 

The only reason I can think of as to why it's failing is perhaps SSDT tables are being dropped?

  • Like 1

Hey, mind if I add in a little statement? For me, despite whether having a DSDT or not, somehow my boot process overrides edits in my DSDT related to graphics. When I boot to OS X from Windows, my Nvidia 525M is enabled, when I restart to OS X again, its gone... So no matter what I do to my DSDT, this has stuck.. Just some info from my experience.

If you Drop your SSDT as I do, you need to copy all the needed methods from your SSDT and patch them into DSDT (In the right section) this is what I do...

thx for info,but i dont know to do that.

I am using clover and it automaticaly drop all ssdt becouse it generate a new one for powermanagment.

If u guys can make dsdt with methods from ssdt-6 that would be perfect.

×
×
  • Create New...