Jump to content

ASUS Zenbook Prime UX31A-DB51 Ultrabook - fixes, mods, tweaks, etc


nhart12
 Share

1,056 posts in this topic

Recommended Posts

Thank you very much for your help x68.

 

my crazy screen problem, it may be because the bios configuration? Atm i change the graphichs capacity for 128mb instead 64mb

 

I try with Mountain Lion and not have any problem,bonly with mavericks  :(

 

Diagnosing these are quite hard, the BIOS setting should be 64MB, do not set it higher.

 

What DSDT are you using? If you are using 68x's DSDT, remember that his DSDT is amazingly well made and perfect for UX32VD users who have the EXACT same hardware as him, it WON'T work for UX31A users. The UX32VD and UX31A have completely different hardware and BIOSes, even though they are using mostly the same kexts.

 

What SMBios are you using? Try MacBookPro8,1.

 

Try changing the ig-platform-id as I mentioned before if that doesn't work at all and none of them change anything, try some of the kexts in the zip. They're simply differently patched AppleIntelFramebufferCapri kexts with different LVDS (internal screen) for the platform-id 09 00 66 01. Do remember that it might make the screen hang at the Apple "circle" boot screen and forces you to Safe Mode / Single-User remove the kext and replace it with a working one.

 

05 03 00 00 02 00 00 00 30 02 00 00

05 03 00 00 02 00 00 00 30 00 00 00

01 00 00 00 02 00 00 00 30 00 00 00 <-- This is what the original normal AppleIntelFramebufferCapri kext is sat as.

01 00 00 00 02 00 00 00 30 02 00 00

 

If the above doesn't work either, try this thread: http://www.insanelymac.com/forum/topic/208410-fixing-scrambledstretched-or-wrong-resolution-laptop-display-problems/

 

If that doesn't work either, then I'm not exactly sure.

 

I sort of have the same problems, but on a quite different scale. Mine usually covers the entire screen and are likely hurting the screen if left that way for a long period of time as the "glitches" get burned into the screen as severe ghosting (even in BIOS) and disappears only after using the screen for quite some time while the screen isn't glitching. I solve this by sleeping the display and waking it again which always solves the problem without glitches, thus no ghosts or screen destruction. I wish there were something more permanent for my own issue, but I'm still searching for an answer to my own problem. I'll post the solution if I find any.

AppleIntelFramebufferCapri.zip

Link to comment
Share on other sites

For fan speeds to be reported by FakeSMC you must add this DSDT device:

                Device (SMCD)
                {
                    Name (_HID, "FAN00000")  // _HID: Hardware ID
                    Method (FAN0, 0, NotSerialized)
                    {
                        Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)
                        Return (Local0)
                    }

                    Name (TACH, Package (0x02)
                    {
                        "System Fan", 
                        "FAN0"
                    })
                }

FakeSMC will display the fan speed in RPMs. Credit goes to Rehabman for the FakeSMC fix.

 

Edit:

 

Here is the DSDT patch.

into device label SMCD remove_entry;
into definitionblock code_regex . insert
begin
Device (SMCD)\n
{\n
Name (_HID, "FAN00000")\n
Method (FAN0, 0, NotSerialized)\n
{\n
Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)\n
Return (Local0)\n
}\n
Name (TACH, Package (0x02)\n
{\n
  "System Fan", \n
  "FAN0"\n
})\n
}\n
end;
  • Like 2
Link to comment
Share on other sites

For fan speeds to be reported by FakeSMC you must add this DSDT device:

        [Snip]

FakeSMC will display the fan speed in RPMs. Credit goes to Rehabman for the FakeSMC fix.

 

This worked perfectly, thank you! I was wondering why we didn't get any fan speed measurements at all. This did the trick!

 

 

I was wondering, usually in this thread the "MacBookPro8,1" SMBIOS has been recommended (I saw your post at T**y's regarding the SSDT generation and if 800MHz / 1200 MHz lowest frequency was a good choice), but is that still the case? The MacBookAir5,2 is made for the i5-3427U and i7-3667U which according to Wikipedia is A LOT closer to the i7-3517U which the UX32VD has, than what the 8,1 has to offer (Sandy Bridge i5-34xxM and i7-36xxM). Plus it has the integrated HD4000 card instead of the HD3000. I know SMBIOSes have a lot of hidden "under the hood" settings, so I was wondering if you're still recommending the 8,1 or if that it has been deprecated in favour of another one? 

Link to comment
Share on other sites

This worked perfectly, thank you! I was wondering why we didn't get any fan speed measurements at all. This did the trick!

 

 

I was wondering, usually in this thread the "MacBookPro8,1" SMBIOS has been recommended (I saw your post at T**y's regarding the SSDT generation and if 800MHz / 1200 MHz lowest frequency was a good choice), but is that still the case? The MacBookAir5,2 is made for the i5-3427U and i7-3667U which according to Wikipedia is A LOT closer to the i7-3517U which the UX32VD has, than what the 8,1 has to offer (Sandy Bridge i5-34xxM and i7-36xxM). Plus it has the integrated HD4000 card instead of the HD3000. I know SMBIOSes have a lot of hidden "under the hood" settings, so I was wondering if you're still recommending the 8,1 or if that it has been deprecated in favour of another one? 

 

I personally use MBA5,1 (it enables the use of Ivy Bridge PM, which in turn allows better battery life). I used Clover to generate states and I just dumped them using MacIASL. I now have states ranging from 800Mhz to 3Ghz; this is the approximately the range of the Intel CPU. I have also attached the SSDT tables I am currently using (this is for Intel i7-3517U on  the UX32VD). It has the Asus SSDT tables as well.

SSDT.zip

  • Like 1
Link to comment
Share on other sites

I personally use MBA5,1 (it enables the use of Ivy Bridge PM, which in turn allows better battery life). I used Clover to generate states and I just dumped them using MacIASL. I now have states ranging from 800Mhz to 3Ghz; this is the approximately the range of the Intel CPU. I have also attached the SSDT tables I am currently using (this is for Intel i7-3517U on  the UX32VD). It has

 

Hmm, so pretty much like I thought. That's perfect, thank you!

 

I'll generate a new SSDT with ssdtPRGen script taking that into consideration, plus the dumps I did from my Linux installation, editing ssdtPRGen to go from a minimum of 800MHz, as I think I generated it with "0" (default) which I believe is "unknown/unconfirmed".

 

Edit:

Actually, screw ssdtPRGen. It causes kernel panics all the way, while yours works 100% perfectly when GenerateP/CStates=No and DropSSDT=Yes. Thanks again! 

  • Like 1
Link to comment
Share on other sites

For fan speeds to be reported by FakeSMC you must add this DSDT device:

                Device (SMCD)
                {
                    Name (_HID, "FAN00000")  // _HID: Hardware ID
                    Method (FAN0, 0, NotSerialized)
                    {
                        Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)
                        Return (Local0)
                    }

                    Name (TACH, Package (0x02)
                    {
                        "System Fan", 
                        "FAN0"
                    })
                }

FakeSMC will display the fan speed in RPMs. Credit goes to Rehabman for the FakeSMC fix.

 

Can you explain me how to add device SMCD in DSDT? Please.

 

Thank you.

Link to comment
Share on other sites

Hi 68x,

 

Im Using a UX301LA, i've got my fans working too, since rehab released his patch for the hp xD

and modified my code, and rehab asked me, i should look in this thread :-)

 

I found out you are using exactly the same code xD

 

Here is my Code (i Have 2 fans, and one chip "i7-4558u+Iris5100"):

    Device (SMCD)
    {
        Name (_HID, "FAN00000")
        Name (TACH, Package (0x04)
        {
            "Left Fan", "FAN1",
            "Right Fan", "FAN0"
        })
        Method (FAN0, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)
            Return (Local0)
        }
        Method (FAN1, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (One), Local0)
            Return (Local0)
        }
    }

And so far its working very well :-)

I attached a picture at the buttom :-)

 

-----------------

 

Okay, what i found out, we have a way to control our fans too!

You can try yourself with linux and acpi kernel call module.

 

Here is the code (for me (2 Fans)):

\_SB.PCI0.LPCB.EC0.SFNV 1 0x7D //set FAN0 speed to 0x7D (125 = Half Speed)
\_SB.PCI0.LPCB.EC0.SFNV 2 0x00 //set FAN1 speed to 0x00 (0 = OFF)
\_SB.PCI0.LPCB.EC0.SFNV 0 0 //reset fans back to Automatic fan control

With 0xFF you can set the FAN to max RPM....

 

Thats about the control fans part..., next part:

 

-------------------

 

Okay, I seen, FakeSMC have a option to Control FAN Speed...

 

I just don't know how the method needs to be called for FakeSMC and how FakeSMC needs to invoke it...

But i already asked Kozlek, im just waiting for his answer...

 

I Attached a picture of FakeSMC Fan Control...

 

-------------------

 

Rehab asked me, you are working on this too...

 

So maybe we can work together here :-)

 

I have a GitHub for my Laptop, you can scroll through my Changes, that are DSDT Related, maybe you find something usefull for you...

https://github.com/Ramalama2/UX301_DSDT

 

Cheers :-)

post-735125-0-32706600-1391978035_thumb.png

post-735125-0-34293600-1391978497_thumb.png

  • Like 2
Link to comment
Share on other sites

Installation with [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] USB and deleting some kext (AppleIntelHD* AppleIntelSNB* ATI* GeForce* NVDA*) on my UX32VD was succesfully.

clover bootloader installation went good but it can't boot my Mac OS X.

can someone help me?

Link to comment
Share on other sites

Hi 68x,

 

Im Using a UX301LA, i've got my fans working too, since rehab released his patch for the hp xD

and modified my code, and rehab asked me, i should look in this thread :-)

 

I found out you are using exactly the same code xD

 

Here is my Code (i Have 2 fans, and one chip "i7-4558u+Iris5100"):

    Device (SMCD)
    {
        Name (_HID, "FAN00000")
        Name (TACH, Package (0x04)
        {
            "Left Fan", "FAN1",
            "Right Fan", "FAN0"
        })
        Method (FAN0, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)
            Return (Local0)
        }
        Method (FAN1, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (One), Local0)
            Return (Local0)
        }
    }

And so far its working very well :-)

I attached a picture at the buttom :-)

 

-----------------

 

Okay, what i found out, we have a way to control our fans too!

You can try yourself with linux and acpi kernel call module.

 

Here is the code (for me (2 Fans)):

\_SB.PCI0.LPCB.EC0.SFNV 1 0x7D //set FAN0 speed to 0x7D (125 = Half Speed)
\_SB.PCI0.LPCB.EC0.SFNV 2 0x00 //set FAN1 speed to 0x00 (0 = OFF)
\_SB.PCI0.LPCB.EC0.SFNV 0 0 //reset fans back to Automatic fan control

With 0xFF you can set the FAN to max RPM....

 

Thats about the control fans part..., next part:

 

-------------------

 

Okay, I seen, FakeSMC have a option to Control FAN Speed...

 

I just don't know how the method needs to be called for FakeSMC and how FakeSMC needs to invoke it...

But i already asked Kozlek, im just waiting for his answer...

 

I Attached a picture of FakeSMC Fan Control...

 

-------------------

 

Rehab asked me, you are working on this too...

 

So maybe we can work together here :-)

 

I have a GitHub for my Laptop, you can scroll through my Changes, that are DSDT Related, maybe you find something usefull for you...

https://github.com/Ramalama2/UX301_DSDT

 

Cheers :-)

HWMonitor cannot control the fan (something to the with LPC kext).

 

This is the fan control I have come up with:

                Device (SMCD)
                {
                    Name (_HID, "FAN00000")  // _HID: Hardware ID
                    Method (FAN0, 0, NotSerialized)
                    {
                        If (LEqual (FANE, One))
                        {
                            Multiply (FSPD, 0x02, Local0)
                            If (LNotEqual (Local0, Zero))
                            {
                                Divide (0x0041CDB4, Local0, Local1, Local0)
                                \RMDT.P2 ("FAN0: ", Local0)
                                Return (Local0)
                            }
                        }

                        Store (^^EC0.TACH (Zero), Local0)
                        Return (Local0)
                    }

                    Method (FAN1, 0, NotSerialized)
                    {
                        Store (^^EC0.TACH (One), Local0)
                        Return (Local0)
                    }

                    Method (TCPU, 0, Serialized)
                    {
                        Store (\_TZ.RTMP (), Local0)
                        Return (Local0)
                    }

                    Name (TACH, Package (0x04)
                    {
                        "System Fan", 
                        "FAN0", 
                        "GPU Fan", 
                        "FAN1"
                    })
                    Name (FTAB, Buffer (0x56)
                    {
                        /* 0000 */   0x23, 0x6E, 0x24, 0x71, 0x25, 0x73, 0x26, 0x76,
                        /* 0008 */   0x27, 0x78, 0x28, 0x7A, 0x29, 0x7D, 0x2A, 0x80,
                        /* 0010 */   0x2B, 0x83, 0x2C, 0x86, 0x2D, 0x89, 0x2E, 0x8C,
                        /* 0018 */   0x2F, 0x8F, 0x30, 0x91, 0x31, 0x94, 0x32, 0x96,
                        /* 0020 */   0x33, 0x99, 0x34, 0x9B, 0x35, 0x9E, 0x36, 0xA1,
                        /* 0028 */   0x37, 0xA4, 0x38, 0xA7, 0x39, 0xAA, 0x3A, 0xAD,
                        /* 0030 */   0x3B, 0xAF, 0x39, 0xB2, 0x3C, 0xB4, 0x3D, 0xB7,
                        /* 0038 */   0x3E, 0xB9, 0x3F, 0xBC, 0x40, 0xC8, 0x41, 0xCB,
                        /* 0040 */   0x42, 0xCD, 0x43, 0xD0, 0x44, 0xD2, 0x45, 0xD5,
                        /* 0048 */   0x46, 0xD7, 0x47, 0xDA, 0x48, 0xDC, 0x49, 0xDF,
                        /* 0050 */   0x4A, 0xE1, 0x4B, 0xFF, 0xFF, 0xFF
                    })
                    Name (FHST, Buffer (0x10)
                    {
                        /* 0000 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                        /* 0008 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                    })
                    Name (FIDX, Zero)
                    Name (FNUM, Zero)
                    Name (FSUM, Zero)
                    Name (FLST, 0xFF)
                    Name (FCNT, Zero)
                    Name (FCTU, 0x14)
                    Name (FCTD, 0x28)
                    Name (FSPD, Zero)
                    Name (FANE, Zero)
                    Method (FCPU, 0, Serialized)
                    {
                        Store (One, FANE)
                        Store (TCPU (), Local0)
                        Add (Local0, FSUM, Local1)
                        Store (FIDX, Local2)
                        Subtract (Local1, DerefOf (Index (FHST, Local2)), Local1)
                        Store (Local0, Index (FHST, Local2))
                        Store (Local1, FSUM)
                        Increment (Local2)
                        If (LGreaterEqual (Local2, SizeOf (FHST)))
                        {
                            Store (Zero, Local2)
                        }

                        Store (Local2, FIDX)
                        Store (FNUM, Local2)
                        If (LNotEqual (Local2, SizeOf (FHST)))
                        {
                            Increment (Local2)
                            Store (Local2, FNUM)
                        }

                        Divide (Local1, Local2, , Local0)
                        If (LGreater (Local0, 0xFF))
                        {
                            Store (0xFF, Local0)
                        }

                        Store (Zero, Local2)
                        While (LGreater (Local0, DerefOf (Index (FTAB, Local2))))
                        {
                            Add (Local2, 0x02, Local2)
                        }

                        If (LGreater (Local2, FLST))
                        {
                            Subtract (Local2, FLST, Local1)
                            Store (FCTU, Local4)
                        }
                        Else
                        {
                            Subtract (FLST, Local2, Local1)
                            Store (FCTD, Local4)
                        }

                        If (LEqual (Local1, Zero))
                        {
                            Store (Zero, FCNT)
                        }
                        Else
                        {
                            Store (FCNT, Local3)
                            Increment (Local3)
                            Store (Local3, FCNT)
                            Divide (ShiftLeft (Local4, One), Local1, , Local1)
                            If (LGreaterEqual (Local3, Local1))
                            {
                                Store (Local2, FLST)
                                Increment (Local2)
                                Store (DerefOf (Index (FTAB, Local2)), FSPD)
                                ^^EC0.SFNV (One, FSPD)
                                Store (Zero, FCNT)
                            }
                        }

                        Return (Local0)
                    }

                    Method (TCPP, 0, Serialized)
                    {
                        Store (FNUM, Local0)
                        If (LNotEqual (Local0, Zero))
                        {
                            Store (FSUM, Local1)
                            Divide (Local1, Local0, , Local0)
                        }

                        Return (Local0)
                    }

                    Method (TSYS, 0, Serialized)
                    {
                        Return (FCNT)
                    }
                }

The above DSDT code is highly experiemntal and buggy. I highly recommend against using, unless you are willing to test it. You will need to use Rehabman's ACPIPoller kext. I also suggest that you mess around with FTAB (these are the temperature, fan speed values).

 

In _PTS you will have to add a call to SNFV(Zero, Zero) to disable the fan. Otherwise, the fan will be turned on during sleep. This post has everything you need to start, http://forum.notebookreview.com/asus/705656-fan-control-asus-prime-ux31-ux31a-ux32a-ux32vd.html

Link to comment
Share on other sites

I have it much simpler, but its for ux302:

Device (SMCD)
    {
        Name (_HID, "FAN00000")
        Name (TACH, Package (0x04)
        {
            "Left Fan", "FAN1",
            "Right Fan", "FAN0"
        })
        Name (TEMP, Package (0x02)
        {
            "CPU Heatsink", "TCPU"
        })
        Method (FAN0, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (Zero), Local0)
            If (LGreaterEqual (\_SB.PCI0.LPCB.EC0.ECPU, 0x41)) { Store (0x1770, Local0) } // If CPU > 65C, Show 6000RPM
            Return (Local0)
        }
        Method (FAN1, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.TACH (One), Local0)
            If (LGreaterEqual (\_SB.PCI0.LPCB.EC0.ECPU, 0x41)) { Store (0x1770, Local0) } // If CPU > 65C, Show 6000RPM
            Return (Local0)
        }
        Method (TCPU, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.ECPU, Local0)      // Get current CPU Temperature
            If (LLessEqual (Local0, 0x32)) {             // If CPU is < 50C, disable both Fans
                \_SB.PCI0.LPCB.EC0.SFNV (One, Zero)
                \_SB.PCI0.LPCB.EC0.SFNV (0x02, Zero) } Else {
            If (LOr (LGreater (Local0, 0x32), LLess (Local0, 0x41))) {
                \_SB.PCI0.LPCB.EC0.SFNV (Zero, Zero) } } // If CPU is > 50C and < 65C, set to Automatic
            If (LGreaterEqual (Local0, 0x41)) {          // If CPU is > 65C, set to max RPM
                \_SB.PCI0.LPCB.EC0.SFNV (One, 0xFF)
                \_SB.PCI0.LPCB.EC0.SFNV (0x02, 0xFF) }
            Return (Local0)
        }
    }

WARNING:

NO ONE SHOULD USE IT, IF HWMON IS CLOSED!!!

YOU CAN BURN UP YOUR CPU! IF YOU CLOSE HWMON AND FANS ARE OFF!

THEY DOESNT TURN ON AGAIN IF HWMON IS CLOSED!!

This only working if hwmon is running and you need to put CPU-Heatsink Temperature to status bar!

 

BUT the better way is, not to use it! This is only a sample!

 

---------------

 

PS: You should use ^^EC0.ECPU instead of \_TZ.RTMP,  \_TZ.RTMP is more "expensive"...

 

How the fan control from FakeSMC is working on the picture of my previous post?

Only with the LPC devices, that are supported in hwmon?

There is really not much support for laptops...

 

One other question, do you have an idea, why a laptop is immediately waked from sleep on ac power?

Without ac plugged in, it sleeps without problems...

This is just my last bug the nervs me :-)

 

And you should try the new élan touchpad driver from emlydinesh, its awesome :-)

 

Cheers :-)

Link to comment
Share on other sites

Here is a another example, you only need for this the FakeSMC kext with ACPISensor kext plugin...

There is ACPIProbe already built in...

You don't need hwmon running or sth else :-)

 

1. you need to change in the info.plist of ACPISensors.kext "PROB0000" to "PRB0000" and Polling timeout to "0"!!!!

 

2. Use this code (It's only a example!!)

    Device (PROB) // ACPIProbe virtual device (c) TimeWalker
    {
        Name (_HID, EisaId ("PNP0C02")) // Expose PLLD to IORegistry
        Name (_CID, EisaId ("PRB0000")) // device compatible name allows ACPIProbe matching
        Name (INVL, 0x3E8)          // Set Polling interval 1 sec
        Name (TOUT, Zero)           // Set Polling timeout  0 sec (continuous polling)
        Name (LOGG, One)            // Enable Console logging of values returned by methods
        Name (LIST, Package (One)  // Define methods to poll
        { "SFNS" })
        
        Method (SFNS, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.ECPU, Local0)      // Get current CPU Temperature
            If (LLessEqual (Local0, 0x32)) {             // If CPU is < 50C, disable both Fans
                \_SB.PCI0.LPCB.EC0.SFNV (One, Zero)
                \_SB.PCI0.LPCB.EC0.SFNV (0x02, Zero)
                Store ("Fans are OFF", Local1) } Else {
                \_SB.PCI0.LPCB.EC0.SFNV (Zero, Zero)     // If CPU is > 50C, set to Automatic
                Store ("Fans are AUTO", Local1) }
            Return (Local1)
        }
    }

Put into SB Scope or the Main Scope... Up to you...

 

Cheers :-)

Link to comment
Share on other sites

Installation with ##### USB and deleting some kext (AppleIntelHD* AppleIntelSNB* ATI* GeForce* NVDA*) on my UX32VD was succesfully.

clover bootloader installation went good but it can't boot my Mac OS X.

can someone help me?

 

If you deleted AppleIntelHD* and AppleIntelSNB* you've deleted the graphics driver for the internal graphics card. AppleIntelHD* is a requirement, while AppleIntelSNB* is for the HD3000 so it most likely isn't loaded I think with the UX32VD HD4000, probably won't hurt keeping so I wouldn't delete that either. You might also need to delete some of the Bluetooth drivers like IOBluetoothFamily.kext, so try that if recovering AppleIntelHD* and AppleIntelSNB* doesn't work.

 

If you don't have a PMPatched BIOS, you need NullCPUPowerManagement.kext (maybe Clover can inject the MSR unlock, not sure).

 

You probably need to boot with -x the first few times to fix these. Remember no npci=0x3000 or 0x2000, and disable intel virtualization technology in BIOS (or use dart=0).

Link to comment
Share on other sites

Here is a another example, you only need for this the FakeSMC kext with ACPISensor kext plugin...

There is ACPIProbe already built in...

You don't need hwmon running or sth else :-)

 

1. you need to change in the info.plist of ACPISensors.kext "PROB0000" to "PRB0000" and Polling timeout to "0"!!!!

 

2. Use this code (It's only a example!!)

    Device (PROB) // ACPIProbe virtual device (c) TimeWalker
    {
        Name (_HID, EisaId ("PNP0C02")) // Expose PLLD to IORegistry
        Name (_CID, EisaId ("PRB0000")) // device compatible name allows ACPIProbe matching
        Name (INVL, 0x3E8)          // Set Polling interval 1 sec
        Name (TOUT, Zero)           // Set Polling timeout  0 sec (continuous polling)
        Name (LOGG, One)            // Enable Console logging of values returned by methods
        Name (LIST, Package (One)  // Define methods to poll
        { "SFNS" })
        
        Method (SFNS, 0, NotSerialized)
        {
            Store (\_SB.PCI0.LPCB.EC0.ECPU, Local0)      // Get current CPU Temperature
            If (LLessEqual (Local0, 0x32)) {             // If CPU is < 50C, disable both Fans
                \_SB.PCI0.LPCB.EC0.SFNV (One, Zero)
                \_SB.PCI0.LPCB.EC0.SFNV (0x02, Zero)
                Store ("Fans are OFF", Local1) } Else {
                \_SB.PCI0.LPCB.EC0.SFNV (Zero, Zero)     // If CPU is > 50C, set to Automatic
                Store ("Fans are AUTO", Local1) }
            Return (Local1)
        }
    }

Put into SB Scope or the Main Scope... Up to you...

 

Cheers :-)

I personally would like to use Rehabman's ACPIPoller due to the fact that I can set the method name and the IOProperty; and a huge plus, the code is also documented.

 

Anyways, after testing the below code the fan is silent and quiet. SO far, fan reporting is not possible due to the manual fan control. The below DSDT code allows for a quieter and "efficient" fan (both fans on the UX32VD will be used).

 

Replace your SMCD with:

                Device (SMCD)
                {
                    Name (_HID, "FAN00000")  // _HID: Hardware ID
                    Method (FAN0, 0, NotSerialized)
                    {
                        Store (\_TZ.RFAN (Zero), Local0)
                        Return (Local0)
                    }

                    Method (FAN1, 0, NotSerialized)
                    {
                        Store (\_TZ.RFAN (One), Local0)
                        Return (Local0)
                    }

                    Method (TCPU, 0, Serialized)
                    {
                        Store (^^EC0.ECPU, Local0)
                        Return (Local0)
                    }

                    Method (TIGC, 0, Serialized)
                    {
                        Store (^^EC0.TH0R, Local0)
                        Return (Local0)
                    }

                    Name (TACH, Package (0x04)
                    {
                        "System Fan", 
                        "FAN0", 
                        "GPU Fan", 
                        "FAN1"
                    })
                    Name (FTAB, Buffer (0x12)
                    {
                        /* 0000 */   0x1E, 0x28, 0x28, 0x46, 0x36, 0x50, 0x32, 0x64,
                        /* 0008 */   0x37, 0x73, 0x3C, 0x80, 0x41, 0x96, 0x46, 0xC8,
                        /* 0010 */   0xFF, 0xFF
                    })
                    Name (FHST, Buffer (0x10)
                    {
                        /* 0000 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                        /* 0008 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                    })
                    Name (FIDX, Zero)
                    Name (FNUM, Zero)
                    Name (FSUM, Zero)
                    Name (FLST, 0xFF)
                    Name (FCNT, Zero)
                    Name (FCTU, 0x14)
                    Name (FCTD, 0x28)
                    Name (FSPD, Zero)
                    Name (FANE, Zero)
                    Method (FCPU, 0, Serialized)
                    {
                        Store (One, FANE)
                        Store (TCPU (), Local0)
                        Add (Local0, FSUM, Local1)
                        Store (FIDX, Local2)
                        Subtract (Local1, DerefOf (Index (FHST, Local2)), Local1)
                        Store (Local0, Index (FHST, Local2))
                        Store (Local1, FSUM)
                        Increment (Local2)
                        If (LGreaterEqual (Local2, SizeOf (FHST)))
                        {
                            Store (Zero, Local2)
                        }

                        Store (Local2, FIDX)
                        Store (FNUM, Local2)
                        If (LNotEqual (Local2, SizeOf (FHST)))
                        {
                            Increment (Local2)
                            Store (Local2, FNUM)
                        }

                        Divide (Local1, Local2, , Local0)
                        If (LGreater (Local0, 0xFF))
                        {
                            Store (0xFF, Local0)
                        }

                        Store (Zero, Local2)
                        While (LGreater (Local0, DerefOf (Index (FTAB, Local2))))
                        {
                            Add (Local2, 0x02, Local2)
                        }

                        If (LGreater (Local2, FLST))
                        {
                            Subtract (Local2, FLST, Local1)
                            Store (FCTU, Local4)
                        }
                        Else
                        {
                            Subtract (FLST, Local2, Local1)
                            Store (FCTD, Local4)
                        }

                        If (LEqual (Local1, Zero))
                        {
                            Store (Zero, FCNT)
                        }
                        Else
                        {
                            Store (FCNT, Local3)
                            Increment (Local3)
                            Store (Local3, FCNT)
                            Divide (ShiftLeft (Local4, One), Local1, , Local1)
                            If (LGreaterEqual (Local3, Local1))
                            {
                                Store (Local2, FLST)
                                Increment (Local2)
                                Store (DerefOf (Index (FTAB, Local2)), FSPD)
                                ^^EC0.SFNV (One, FSPD)
                                ^^EC0.SFNV (0x02, FSPD)
                                Store (Zero, FCNT)
                            }
                        }

                        Return (Local0)
                    }

                    Method (TCPP, 0, Serialized)
                    {
                        Store (FNUM, Local0)
                        If (LNotEqual (Local0, Zero))
                        {
                            Store (FSUM, Local1)
                            Divide (Local1, Local0, , Local0)
                        }

                        Return (Local0)
                    }

                    Method (TSYS, 0, Serialized)
                    {
                        Return (FCNT)
                    }
                }

Replace SFNV:

        Name (DEC1, Zero)
        Name (DEC2, Zero)
        Method (SFNV, 2, Serialized)
        {
            If (LEqual (Arg0, Zero))
            {
                If (LEqual (DEC1, One))
                {
                    Store (RRAM (0x0521), Local0)
                    Or (Local0, 0x80, Local0)
                    WRAM (0x0521, Local0)
                }

                If (LEqual (DEC2, One))
                {
                    Store (RRAM (0x0522), Local0)
                    Or (Local0, 0x80, Local0)
                    WRAM (0x0522, Local0)
                }

                Store (Zero, DEC1)
                Store (Zero, DEC2)
                Return (Zero)
            }

            If (LEqual (Arg0, One))
            {
                Store (RRAM (0x0521), Local0)
                And (Local0, 0x7F, Local0)
                WRAM (0x0521, Local0)
                Store (One, DEC1)
                ST84 (Zero, Arg1)
                Return (Zero)
            }

            If (LEqual (Arg0, 0x02))
            {
                Store (RRAM (0x0522), Local0)
                And (Local0, 0x7F, Local0)
                WRAM (0x0522, Local0)
                Store (One, DEC2)
                ST84 (One, Arg1)
                Return (Zero)
            }

            Return (Zero)
        }

I added support to make both fans go automatic.

 

Add this to _PTS:

            If (\_SB.PCI0.LPCB.SMCD.FANE)
            {
                \_SB.PCI0.LPCB.EC0.SFNV (Zero, Zero)
            }

This will shut the fans off before going to sleep by putting in "Auto Mode".

 

Again, this is for the UX32VD and use at your own risk.

  • Like 2
Link to comment
Share on other sites

I personally would like to use Rehabman's ACPIPoller due to the fact that I can set the method name and the IOProperty; and a huge plus, the code is also documented.

 

Anyways, after testing the below code the fan is silent and quiet. SO far, fan reporting is not possible due to the manual fan control. The below DSDT code allows for a quieter and "efficient" fan (both fans on the UX32VD will be used).

 

Replace your SMCD with:

 


 

This will shut the fans off before going to sleep by putting in "Auto Mode".

 

Again, this is for the UX32VD and use at your own risk.

 

Compiled and running perfectly fine right now. Looks like it works very well.

 

I'll be testing this most of the day and come back with a report on how well it worked throughout.

 

By the way, 68x, I hope it won't be too much of a bother, but could you please post your original unmodified DSDT (214 if possible)? I'd like to compare my own extracted DSDT with your original unmodified, as I couldn't find any big differences except intentional replacements and patches when comparing my original and your modified.

 

I'm impressed by how well your modified one is documented with comments, it helps extremely much when trying to understand what the methods do.

 

Thanks a lot!

Link to comment
Share on other sites

Compiled and running perfectly fine right now. Looks like it works very well.

 

I'll be testing this most of the day and come back with a report on how well it worked throughout.

 

By the way, 68x, I hope it won't be too much of a bother, but could you please post your original unmodified DSDT (214 if possible)? I'd like to compare my own extracted DSDT with your original unmodified, as I couldn't find any big differences except intentional replacements and patches when comparing my original and your modified.

 

I'm impressed by how well your modified one is documented with comments, it helps extremely much when trying to understand what the methods do.

 

Thanks a lot!

The above code will disable fan reporting. Honestly, I am unsure of how to read the fan speed when it's in manual mode.

 

I have comments in my patched DSDT :surpriseface:? It honestly is just a dump of the past years work. I'll post my dumped DSDT asap.

 

The major ones I did were:

Broadcom BCM4352 patch

GFX0 -> IGPU

PNLF (Rehabman's version)

PINI

FN Keys

 

There are few others, but I cannot recall anymore. I will revise and make a proper how to install for the Zenbook Primes soon.

  • Like 2
Link to comment
Share on other sites

I personally would like to use Rehabman's ACPIPoller due to the fact that I can set the method name and the IOProperty; and a huge plus, the code is also documented.

Another advantage in using ACPIPoller.kext instead of ACPIProbe in FakeSMC is that it does not require HwMonitor to be running. I would never want a critical system function (fan control) tied to a particular application.

 

Note: It was a while since I looked at the ACPIProbe functionality (I wrote ACPIPoller an entire year prior to kozlek implementing ACPIProbe), so maybe things have changed... Even looking at it now, it seems overly complex for what really needs to happen.

  • Like 1
Link to comment
Share on other sites

The above code will disable fan reporting. Honestly, I am unsure of how to read the fan speed when it's in manual mode.

 

I have comments in my patched DSDT :surpriseface:? It honestly is just a dump of the past years work. I'll post my dumped DSDT asap.

 

There are few others, but I cannot recall anymore. I will revise and make a proper how to install for the Zenbook Primes soon.

 

Hmm, unlike the ones I've dumped myself, your Reference_DSDT.dsl includes short comments to what the different methods do. Like //_PRW: Power Resources for Wake, // _CRT: Critical Temperature, // _ALI: Ambient Light Illuminance (loads of more examples, but that's a few of them). I don't have any of those in my extracted and decompiled DSDT, even though the methods are completely identical. Maybe it has something to do with how I dumped it? They're at least very helpful when trying to get the whole picture, even if you didn't make the comments yourself.

 

Here is my raw DSDT.

 

Thanks a lot for taking your time doing this, and your dedication to this computer. I don't have words how much I appreciate your work here (and everyone else who has made this computer just perfect for OS X). Keep it up!

 

Edit: As expected, yours and mine unmodified are 1:1 copies. They're completely 100% identical to each other. Which means the graphical issue I'm having at boot and wake is something not related to the DSDT, so that makes it easier to debug and find out what it might be.

Edited by P5QMac
Link to comment
Share on other sites

Hmm, unlike the ones I've dumped myself, your Reference_DSDT.dsl includes short comments to what the different methods do. Like //_PRW: Power Resources for Wake, // _CRT: Critical Temperature, // _ALI: Ambient Light Illuminance (loads of more examples, but that's a few of them). I don't have any of those in my extracted and decompiled DSDT, even though the methods are completely identical. Maybe it has something to do with how I dumped it? They're at least very helpful when trying to get the whole picture, even if you didn't make the comments yourself.

 

 

Thanks a lot for taking your time doing this, and your dedication to this computer. I don't have words how much I appreciate your work here (and everyone else who has made this computer just perfect for OS X). Keep it up!

Those are automatically generated by the MaciASL. I will try to make a more comprehensive list of patches that I use.

  • Like 1
Link to comment
Share on other sites

Those are automatically generated by the MaciASL. I will try to make a more comprehensive list of patches that I use.

Actually they are not generated by MaciASL, but rather the iasl disassembler.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...