Jump to content

Asus N76VZ workaround


Flayv
 Share

43 posts in this topic

Recommended Posts

Hello, 

 

I'm trying to understand how to patch a DSDT with my Asus N76VZ. Until now, I used to boot with an already patched DSDT found a year ago, and I can't remember where. Maybe on http://ukrainianiphone.com/ because I called it "russian_dsdt".  eagerness.png

 

So I already applied a lot of patch but I can't get sleep and WiFi to work. 

 

 

 

Here are the problems I got : 

 

- When I click the sleep button from Apple's menu, it just turns off the screen and sound, but does nothing else (even the keyboard backlight doesn't turn off). If I press Fn+F1 (Sleep shortcut), sleep seems to work but when it should turn off the fan and the power button light. With exactly the same config but with the russian DSDT, Fn+F2 work OOB (except the GUI freeze at wake up, I can only move the mouse cursor) but it doesn't from Apple's menu (it just turns the screen and sound off).

 

WiFi (AR9285) work OOB with russian DSDT (if I patch the kext because it doesn't have the DSDT patch), but does not detect any network if I use my patched DSDT with AR9285 WLAN patch from RehabMan. WiFi seems to work and searching for available network but just not detect anything. I tried with and without DSDT patch, and with and without kext patch (and with both or without both, even if it's seems useless to me).

 

 

 

About the WiFi, I really don't understand because both DSDT are identical for this device. I can't get what makes the difference in the russian DSDT because some parts are really differents, for exemple, the guy who write it used a OSDW method that check if the actual OS is darwin, and used it in a lot of method I haven't in my OEM DSDT/SSDTs.

Here are the patches I applied to mine : 

#   [Graphics Patches]
#     —> [NVidia] Disable from _INI                          (Disable Nvidia Card on startup)
#     —> [NVidia] Disable/Enable on _WAK/_PTS        (Disable Nvidia Card on wake)
#     —> [intel] Rename GFX0 to IGPU                      (Rename GFX0 to IGPU for better power management)
#     —> [intel] HD4000 High Resolution                   (Enable HD4000 for High Res)
#     —> [intel] Brightness Fix                                  (Enable Brightness management from OS X System Pref)
#
#   [Audio patches]
#     —> [Audio] HDEF Audio Layout 28                     (Enable audio management through layout 28)
#
#   [system patches]
#     —> [system] AC Adapter Fix                             (Enable AC Adapter to be recognised in OS X)
#
#   [WiFi patches]
#     —> [WiFi] AR9285                                            (Inject AR9285 WiFi card into OS X for native support)
 
I also applied some patch from EmlyDynesh to get battery and keyboard to work correctly : 
- Battery patch
- BrightnessKeys_patch
- KeyboardBacklight_patch
- Optional_Fn_Key_Patches_Alt
- WiFi/Bluetooth Toggle patch (4 toggles)
 
And some common patch from Clover boot-loader : 
- Fix New Way
- Fix HPET
- Add MCHC
- Fix SBUS
- Fix Darwin
- Fix RTC
- Fix WAK
- Add IMEI
 
 
 
I already tried to boot with the OEM DSDT with only disable NVidia patch, HD4000 high res patch, and clover patches, but doesn't seems to change anything about sleep or WiFi. I also tried to apply the content of SSDTs (IDE0 and IDE1 methods and devices) but didn't change anything.
 
I'd really like to get them to work because my actual DSDT brings a lot of improvements over the russian, like 4 levels for keyboard backlight, or the Asus specific button to work, or the battery level. Also I'd be proud having my own working DSDT  biggrin.png
 
 
 
Less important but if anyone could answer me, that would be awesome : 
I found this post : http://www.insanelym...abled-via-bios/
I already brick a laptop (Acer V3-771G) disabling the IGPU with a modded BIOS, two years ago (today, I'm sure it won't work anymore because I burn the screen, I thought maybe I just connected the display in the wrong way but the smoke that goes out of the screen confirms me I didn't  whistling.gif ).
Today, I know that you only can deactivate if you have a muxed connection, but I'd like to know if N76VZ is also muxed ? 
Or if anyone could tell me how to test it the safer I can ?
 
I'm an experienced user, I already broke what I had to broke, and I won't make the same mistakes wink.png I'm learning computer science since 2 years and I love hacking on Linux and OS X, I learned a lot with hackintosh and DSDT andthis is why I'm trying to fully understand how to make a complete DSDT.
 
Hope I didn't made too spelling mistakes in this post, I'm French wink.png Thanks !
 


If needed, here are my specs : 

Software : 
- OS X Yosemite 10.10.3
- Clover Bootloader (revision 3202)
- UEFI laptop


Hardware : 
Laptop : Asus N76VZ 
Graphics : Intel HD 4000 / NVidia 650M (Optimus)
Sound : ALC 663
Touchpad : Elan touchpad V4 hardware
WiFi : AR9285
Bluetooth : AR3011

I joined some files : 
config.plist : my actual Clover's config 
untouched_dsdt.dsl : the DSDT just extracted from Linux with ACPIDump
patched_dsdt.dsl : the DSDT I extracted patched personally
russian_dsdt.aml : the DSDT found a year ago with google (seems to be for N56VZ which is very similar)

files.zip

Link to comment
Share on other sites

I just can't figure out how it works...

Only rehabMan's patch is working for intel GPU. If I replace it with DTGP + sourceforge patch, it doesn't work anymore (boot process stop after X86PlatformShim... lines, except if I inject an ID for Intel GFX within Clover before selecting yosemite boot entry but it breaks QE/CI).

 

 

 

The patch are slightly similar, RehabMan just replaced DTGP with an if statement : 

SourceForge patch : 

Method (_DSM, 4, NotSerialized)\n
{\n
    Store (Package (0x04)\n
        {\n
            "AAPL,ig-platform-id", \n
            Buffer (0x04)\n
            {\n
                0x0A, 0x00, 0x66, 0x01\n
            }, \n
            "hda-gfx", \n
            Buffer (0x0A)\n
            {\n
                "onboard-1"\n
            }\n
        }, Local0)\n
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
    Return (Local0)\n
}

RehabMan patch : 

Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,ig-platform-id", Buffer() { 0x04, 0x00, 0x66, 0x01 },\n
        "hda-gfx", Buffer() { "onboard-1" },\n
    })\n
}\n
Link to comment
Share on other sites

I just can't figure out how it works...

Only rehabMan's patch is working for intel GPU. If I replace it with DTGP + sourceforge patch, it doesn't work anymore (boot process stop after X86PlatformShim... lines, except if I inject an ID for Intel GFX within Clover before selecting yosemite boot entry but it breaks QE/CI).

 

 

 

The patch are slightly similar, RehabMan just replaced DTGP with an if statement : 

 

SourceForge patch : 

Method (_DSM, 4, NotSerialized)\n
{\n
    Store (Package (0x04)\n
        {\n
            "AAPL,ig-platform-id", \n
            Buffer (0x04)\n
            {\n
                0x0A, 0x00, 0x66, 0x01\n
            }, \n
            "hda-gfx", \n
            Buffer (0x0A)\n
            {\n
                "onboard-1"\n
            }\n
        }, Local0)\n
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
    Return (Local0)\n
}
RehabMan patch : 

Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,ig-platform-id", Buffer() { 0x04, 0x00, 0x66, 0x01 },\n
        "hda-gfx", Buffer() { "onboard-1" },\n
    })\n
}\n

 

DTGP is not needed, but the two patches differ in a very obvious way.

 

The first uses 0x166000a, where my patch is using 0x1660004.

Link to comment
Share on other sites

Thanks ! I spent so much time comparing the working DSDTs I didn't even notice the difference between A and 4...

This is very similar to the ig-platform-id (0x01660004) I use in Clover, is there a relation between both or is it only a coincidence ?

By the way, I maybe found what makes the WiFi to work.
I'm using DSDT found here : http://www.hackintoshosx.com/files/file/3690-asus-n56-n76-mavericks-kextsdsdtapplehda/
WiFi works with it, I'll tell you more when I found the exact part that fix the problem.

Link to comment
Share on other sites

Thanks ! I spent so much time comparing the working DSDTs I didn't even notice the difference between A and 4...

 

This is very similar to the ig-platform-id (0x01660004) I use in Clover, is there a relation between both or is it only a coincidence ?

 

By the way, I maybe found what makes the WiFi to work.

I'm using DSDT found here : http://www.hackintoshosx.com/files/file/3690-asus-n56-n76-mavericks-kextsdsdtapplehda/

WiFi works with it, I'll tell you more when I found the exact part that fix the problem.

Clover's config.plist/Graphics/ig-platform-id (assuming you have Inject/Intel=true) does the same as the _DSM method.

 

DSDT _DSM overrides Clover's setting.

Link to comment
Share on other sites

That explains why I didn't need ig-platform-id when I was using already patched dsdt  ^_^

If I understand, Clover covers almost every existing patch (except disabling NVidia and hardware specific patch like AR9285 or EmlyDynesh patches for Elan touchpad) ? 

As for WiFi, the problem has solved itself... When I thought I found the piece of code that would make it work, I tried to restart from my OEM untouched DSDT and it worked without changes.

Link to comment
Share on other sites

Well, I suppose I'm just lucky having most of my required patch already inside Clover  :D

 

I finally found that my WiFi problems happens when I apply EmlyDynesh patch for Wifi/BT toogle. I suppose I did something wrong when I tried my dsdt with only graphic patches. 

Edit : sleep seems to work better now. With Fn+F2, it goes sleep until the fan and power button light turn off. But I have the same problems than with other DSDTs : at wake, GUI freezes, except mouse cursor. I must shut down with power button. At boot, from clover screen, Yosemite is marked as hibernated.

Link to comment
Share on other sites

Fixing my DSDT seems to have fix sleep problem from Apple's Menu. Now I'm facing another problem : at wake, OS X react like if my HDDs were not responding : apps that already are opened are responding, as well as Mission Control and Launchpad from hot corners, but Finder, Launchpad search or open apps with the Dock don't do anything (mouse cursor is just spinning).

I have IDE0 and IDE1 in SSDT1 and SSDT2, I extracted them, replaced IDE0 with SATA in my SSDT1 and DSDT and replaced IDE1 with SAT1 in SSDT2 and removed IDE1 from my DSDT. It doesn't seems to correct anything. I'm searching for another similar case because I don't know how to fix that.

As for Fn+F2, it's still calling a different sleep than pmset sleepnow. Maybe I could patch this if I find the ACPI method called by Fn+F2.


Edit : I confirm : even a cd ../ from Terminal doesn't work.
I have hibernatemode=0.

With hibernatemode=29, it does the same thing as Fn+F2 : fans and power button light don't turn off.

Link to comment
Share on other sites

I really need help about this hard drive problem after sleep... Even with others DSDTs, I have the exact same problem. I can't find any answer with Google. Tried to play with Clover options, to restart from clean OEM dsdt but nothing change... The only change between this dsdt (http://www.hackintoshosx.com/files/file/3690-asus-n56-n76-mavericks-kextsdsdtapplehda/) and the one I've made is with mine, I can't even select anything on desktop (selection rectangle doesn't work) whereas I have it with the other dsdt (but I can't open folders or app, it just hang OS X with spinning cursor).

Link to comment
Share on other sites

I finally fixed it ! It wasn't a DSDT problem, it was PUIS (Power-up in standby) function of my hard drive.

I just opened a Console before going to sleep and it showed up some error messages at wake :

SATA WARNING: Enable auto-activate failed.
disk0s3: I/0 error

I googled for it and found this thread : http://www.insanelymac.com/forum/topic/304304-freeze-after-waking-up-from-sleep-disk-i0-error/

 

But I didn't used HDAT2 to disable PUIS. I hate DOS so I searched for Linux tool and found "hdparm" (http://sourceforge.net/projects/hdparm/), already in Ubuntu repositories (I think, cause it was already installed in my Elementary OS Freya).

It's as simple as that : 

sudo hdparm -s 0 /dev/sda

Now sleep is almost working fine, I get some common problems (bluetooth/wifi/usb after sleep).
I just keep this thread opened until I get everything working, just in case.

 


Edit : Everything seems to work except deep hibernate (hibernatemode=25) and Fn+F9 that should disable the touchpad. I'll try to fix that, and finish to write patches I used, and I'll post everything here.

I still want to optimise some minor things, actually, I use 8 kexts in Clover and 1 in SLE (Apple HDA). I'd like to use DummyHDA in Clover to avoid patching the kext each time I reinstall OS X properly (and to have access from USB...) but DummyHDA cause kernel panic the way I filled it.
I replaced GenericUSBXHCI with some DSDT patches, now I only have non replaceable kext (I think : ACPIBatteryManager, ALXEthernet, ApplePS2SmartTouchPad, AsusNBFnKeys, BTFirmwareUploader, CodecCommander, DisableTurboBoostBattery and FakeSMC).

But maybe I should open another thread in adapted forum (other than "DSDT") for kexts problems ?

Anyway, thanks for everything, I'm glad having working sleep without any issues ! :)

Link to comment
Share on other sites

Hi Flayv,

Very interesting topics you are on. Since I got the same Asus N76VZ I'd be more than interested and grateful if I could try your files myself. Would you mind to post them :-) ?

hello

i have the same laptop

all is working fine with yosemite

but i can't install seven

only 8

Link to comment
Share on other sites

Hi Flayv,

Very interesting topics you are on. Since I got the same Asus N76VZ I'd be more than interested and grateful if I could try your files myself. Would you mind to post them :-) ?

 

Yes of course.

 

I did a lot of research to improve everything I could :

  • I successfully made a DummyHDA but it seems to not work inside Clover/kexts, only in S/L/E. I tried making AppleHDALoader but same result. Seems HDA have to be inside S/L/E until now.
Subwoofer doesn't work but I didn't success to made my own AppleHDA patch (I made DummyHDA from this kext : http://www.hackintoshosx.com/files/file/3947-alc-663-ml-mavericks-yosemite/?st=10#commentsStart)

  • Fn+F9 now disable touchpad correctly (It was my fault : I renamed the method "_WED" inside DSDT to correct warning but this one should not be corrected.


  • Deep sleep still doesn't work.
As for video outputs, HDMI can't work because it's linked to NVidia card, and VGA can't work since Mavericks.

About Fn+F9, I just figured out why that didn't works, but it causes all other Fn keys to not work. I'm working on this right now, I don't know what I did about my working dsdt (I replaced it with a lot of patches).

 

Here are my kexts and config.plist but I suggest you to take the DSDT of my first post (patched_dsdt.dsl and compile it to aml with MaciASL) until I figure out how to correct Fn keys (cause right now, my laptop has just Fn+F9/Fn+F7 working and make a airplane noise because I also modified a method of NVidia card  :rolleyes: )

 

I put all the patches I used and the native DSDT inside for your own purpose but be warned : my patch "optimize DSDT" correct the _STA method in the wrong way (it delete the first return and keep the rest, but you should keep the first return and delete what's below if you don't want your laptop to be an airplane) and doesn't correct _WED method name so only Fn+F9 and Fn+F7 are working (you should rename it to WED and rename all _WDG occurences to WDG).

 

Can't figure out how to attach file from a reply so here there are from my dropbox : https://www.dropbox.com/s/6iqwzr7lxpo7b4w/Files.zip?dl=0

 

 

 

Edit : I almost forgot : 

 

About DSDT patches,  you must use USB patches in this order : 

- USB_7_8_series.txt

- USB3_PRW(0x0D).txt

- USB3_Multiplex.txt

Else you'll have errors.

 

As for kexts, I use BTFirmwareUploader inside Clover for native support when I reinstall OS X but I also install it inside S/L/E to get BT to work after a long sleep. Having it only in S/L/E suffice to get it to work OOB for your actual install.

Link to comment
Share on other sites

I sent a request directly to Emlydynesh at OSXLatitude for Fn+F9 cause it seems to be really complicated... _WED method is called automatically (I don't know by what, I suppose by the driver... What's sure is it's called automatically by the system) to get more infos about the request.

If it's not present (or renamed), Fn+F9 doesn't do anything (I don't know why, it sends the same message to the system as others Fn keys. If it's present, it blocks every others Fn keys that uses the driver (F3, F4, F5, F6, F10, F11, F12, maybe F2 and F8). If the renamed method is called directly from _Q12 method (which is called on Fn+F9), it does nothing (the value returned by WED is lost, it should be returned to the system).

 

Here is the actual patched dsdt, if you don't want to apply patches. (Yes I finally found how to attach files :))

dsdt.zip

Link to comment
Share on other sites

Did you get the Subwoofer working with N76XX and the AppleHDA they provide ? I mean I thought I already tested it and that didn't work to me (I couldn't see subwoofer in system preferences nor midi settings) but I'm not sure it was that one. I always thought subwoofer could only work with N56XX.

I'll give a try with making a DummyHDA from this kext.

 

Edit : I confirm it, I just made a DummyHDA and subwoofer is not showing anywhere on my laptop. What's the exact name of your laptop ?

Link to comment
Share on other sites

I'm working over USB devices and I'd need some help.
 
All of my USB are working really nice, except I get the message "disk was not ejected properly" when the laptop wakes. Until now, I've applied patch without really understand why they are needed.Today, I'm trying to understand how the all thing work.
 
Here are the USB related devices in my OEM dsdt : 

Device (XHC1)
{
    Name (_ADR, 0x00140000)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x0D, 0x03))
    }
}

Device (EHC1)
{
    Name (_ADR, 0x001D0000)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x0D, 0x03))
    }
}

Device (USB1)
{
    Name (_ADR, 0x001D0001)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x03, 0x03))
    }
}

Device (USB2)
{
    Name (_ADR, 0x001D0002)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x04, 0x03))
    }
}

Device (USB3)
{
    Name (_ADR, 0x001D0003)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x0C, 0x03))
    }
}

Device (USB4)
{
    Name (_ADR, 0x001D0004)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x0E, 0x03))
    }
}

Device (EHC2)
{
    Name (_ADR, 0x001A0000)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x0D, 0x03))
    }
}

Device (USB5)
{
    Name (_ADR, 0x001A0001)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x05, 0x03))
    }
}

Device (USB6)
{
    Name (_ADR, 0x001A0002)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x20, 0x03))
    }
}

Device (USB7)
{
    Name (_ADR, 0x001A0003)  // _ADR: Address
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (GPRW (0x25, 0x03))
    }
}

 
I also have a XHC device
 

Device (XHC)
        {
            Name (_ADR, 0x00140000)  // _ADR: Address
            OperationRegion (XPRT, PCI_Config, 0x74, 0x6C)
            Field (XPRT, DWordAcc, NoLock, Preserve)
            {
                Offset (0x01), 
                PMEE,   1, 
                    ,   6, 
                PMES,   1, 
                Offset (0x5C), 
                PR2,    32, 
                PR2M,   32, 
                PR3,    32, 
                PR3M,   32
            }

            Name (XRST, Zero)
            Method (CUID, 1, Serialized)
            {
                If (LEqual (Arg0, Buffer (0x10)
                        {
                            /* 0000 */   0xA9, 0x12, 0x95, 0x7C, 0x05, 0x17, 0xB4, 0x4C,
                            /* 0008 */   0xAF, 0x7D, 0x50, 0x6A, 0x24, 0x23, 0xAB, 0x71
                        }))
                {
                    Return (One)
                }

                Return (Zero)
            }

            Method (POSC, 3, Serialized)
            {
                CreateDWordField (Arg2, Zero, CDW1)
                CreateDWordField (Arg2, 0x08, CDW3)
                If (LNotEqual (Arg1, One))
                {
                    Or (CDW1, 0x08, CDW1)
                }

                If (LEqual (XHCI, Zero))
                {
                    Or (CDW1, 0x02, CDW1)
                }

                If (LNot (And (CDW1, One)))
                {
                    If (And (CDW3, One))
                    {
                        ESEL ()
                    }
                    Else
                    {
                        XSEL ()
                    }
                }

                Return (Arg2)
            }

            Method (XSEL, 0, Serialized)
            {
                If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03)))
                {
                    Store (One, XUSB)
                    Store (One, XRST)
                    Store (Zero, Local0)
                    And (PR3, 0xFFFFFFF0, Local0)
                    Or (Local0, XHPM, Local0)
                    And (Local0, PR3M, PR3)
                    Store (Zero, Local0)
                    And (PR2, 0xFFFFFFF0, Local0)
                    Or (Local0, XHPM, Local0)
                    And (Local0, PR2M, PR2)
                }
            }

            Method (ESEL, 0, Serialized)
            {
                If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03)))
                {
                    And (PR3, 0xFFFFFFF0, PR3)
                    And (PR2, 0xFFFFFFF0, PR2)
                    Store (Zero, XUSB)
                    Store (Zero, XRST)
                }
            }

            Method (XWAK, 1, Serialized)
            {
                If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
                {
                    If (LOr (LEqual (XUSB, One), LEqual (XRST, One)))
                    {
                        XSEL ()
                    }
                }
            }

            Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
            {
                Return (0x02)
            }

            Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
            {
                Return (0x02)
            }

            Device (RHUB)
            {
                Name (_ADR, Zero)  // _ADR: Address
                Device (HSP1)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR2, One)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, Zero)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, Zero)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR2, One)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (HSP2)
                {
                    Name (_ADR, 0x02)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR2, 0x02)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, One)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, One)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR2, 0x02)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (HSP3)
                {
                    Name (_ADR, 0x03)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR2, 0x04)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, 0x02)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, 0x02)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR2, 0x04)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (HSP4)
                {
                    Name (_ADR, 0x04)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR2, 0x08)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, 0x03)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, 0x03)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR2, 0x08)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (SSP1)
                {
                    Name (_ADR, 0x05)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR3, One)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, Zero)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, Zero)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR3, One)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (SSP2)
                {
                    Name (_ADR, 0x06)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR3, 0x02)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, One)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, One)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR3, 0x02)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (SSP3)
                {
                    Name (_ADR, 0x07)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR3, 0x04)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, 0x02)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, 0x02)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR3, 0x04)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

                Device (SSP4)
                {
                    Name (_ADR, 0x08)  // _ADR: Address
                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        If (LNot (And (PR3, 0x08)))
                        {
                            Store (Zero, Index (UPCP, Zero))
                        }

                        Store (DerefOf (Index (CNTB, 0x03)), Local0)
                        Store (Local0, Index (UPCP, Zero))
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */   0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */   0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Store (DerefOf (Index (VISB, 0x03)), Local0)
                        Store (DerefOf (Index (DerefOf (Index (PLDP, Zero)), 0x08)), 
                            Local1)
                        And (Local1, 0xFE, Local1)
                        Or (Local1, Local0, Local1)
                        Store (Local1, Index (DerefOf (Index (PLDP, Zero)), 0x08))
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR3, 0x08)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }
            }

            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x0D, 0x03))
            }
        }

I've applied some patches that I don't fully understand and I need your light : 

 

- How could I know if I have serie 7 or serie 8 motherboard ? I think I have one of it because the patches from RehabMan seems to apply without problems.

 

- The patch "Replace Names" from sourceforge replaces USB1-USB7 to UHC2-UHC8. I don't have a USBE device and so UHC1 doesn't exists. Instead I have EHC1 (I suppose it is instead because it has adress 0x001D0000 when USB1 has adress 0x001D0001).

In IORegistryExplorer, all of my devices are under EHC1, EHC2 or XHC1. I also tried to apply the patch ICH9 USB sleep from Olarila, which injects a _DSM method with device id from 0x00003A34 to 0x003A39 in EHC1, USB1, USB2, EHC2, USB5, USB6. I also tried to modify it to apply device id from 0x00003A34 to 0x00003A42 for each USB device (EHC1, USB1 - 4, EHC2, USB5 - 7).

--> Does that mean USB1 to 7 are useless in my dsdt or may I have missed something ?

--> How do I know if I have an ICH9  USB from a laptop ? (which motherboard card name is the same as laptop : N76VZ)

--> The ICH9 patch applied to all my devices seems to accelerate the retrieving of my USB after sleep, it's almost instant with that patch whereas it takes 1 - 5s without. Is that normal ?

 

- The patch "Fix EHCI Ownership" from Olarila adds two variables in an OperationRegion inside device adress 0x001D0007 and 0x001A0007 and interacts with it from a method PINI that stores Zero/One inside. I don't have 0x001D0007 (nor 0x001A0007) but the call from PINI is to _SB.PCI0.EHC1.varName, and, my EHC1 adress is 0x001D0000 (EHC2 --> 0x001A0000) so I can make the patch work. However, even with this patch, Clover still need "USB Ownership" in devices. It doesn't seems to have any effects.

--> Did I missed something or this patch is useless for my DSDT ?

 

- Is there a proper solution to fix Disk not ejected properly that I missed ? (By proper solution, I mean a solution without software or script)

 

Thanks !

Link to comment
Share on other sites

 Share

×
×
  • Create New...