Jump to content

How to get Intel 7 Series USB 3.0 fully working - Step by Step guide


giacomoleopardo
 Share

101 posts in this topic

Recommended Posts

Hi!

 

I have gone thru the guide twice, once under OS X, once under Windows, but I still get the same error. Would you mind to fix that for me?

attachicon.gif2014-04-06_003134.png

 

My DSDT.aml after Step #2

 

https://drive.google.com/file/d/0B5zjC7YfJ1ZNdEFrVm8ybXkwRmM/edit?usp=sharing

You must add patch for dtgp

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

 

I'm trying this on my laptop. In my dsdt there isn't any Device (HUBN) so neither PR1x's.. Any tips?

 

 

I was trying to follow the guide for my laptop (Asus UX32A) and I'm in the same situation. 

Does anyone know what to do?

Link to comment
Share on other sites

  • 4 months later...

Thank you to the OP for this guide, it perfectly fixes all my problems with USB!

My platform is Intel native and I was using Zenith kext to enable multiplexing on 10.10.

 

Looooots of bugs with that kext, including:

 

- Very often devices do not work when first plugged, and have to be plugged again in another port to work

- USB devices very slow to be recognised sometimes (usb audio cards, for example)

- Delayed shutdown (computer shuts down but stays powered for another 10 secs with black screen before shutting down)

- Sudden wake from sleep in certain conditions

 

This DSDT patch, instead, is perfect. Thank you!

Link to comment
Share on other sites

Hi, i have a doubt...

The part about PR11 and following I find it under the device EHC1 both in device EHC2, I must add "Name (MUXS, "XHCA")" even in device PR11 and following under EHC2?

Now i've applied the code under EHC1 section only, and all works well.. 

Link to comment
Share on other sites

  • 2 weeks later...

A question for you all:

This patch works perfectly, but sometimes when I go into standby the USB ports remain powered.

It seems that if I put the computer to sleep early after boot, the ports stay powered, and if I put it after some time they correctly power down during sleep.

 

Any ideas?

Link to comment
Share on other sites

good news people, I was able to patch the DSDT (lacking HUBN) of an HM76 laptop (asus) to enable usb 3.0 super speed, however when I tried to plug an usb 2.0 device into the usb 3.0 port the system freezed, maybe it's a problem related to what ports I named MUXS. I will make a new post regarding this patch so maybe someone can look into it and help.

Link to comment
Share on other sites

  • 4 weeks later...

good news people, I was able to patch the DSDT (lacking HUBN) of an HM76 laptop (asus) to enable usb 3.0 super speed, however when I tried to plug an usb 2.0 device into the usb 3.0 port the system freezed, maybe it's a problem related to what ports I named MUXS. I will make a new post regarding this patch so maybe someone can look into it and help.

How did you get to work without without HUBN? I tried to get it to work but couldn't and the kext is too buggy for me. USB 3.0 is the last thing I need to get my fully working hackintosh. :D I'd like to see how you did it to get to work at least, maybe together we could dig deeper and get it working for both of us properly. That'd be great. :D

Link to comment
Share on other sites

Thanks to the Op for this guide. These dsdt edits helped get rid of the 'not enough power to usb port' error message in the boot log. Though I was wondering about the structure of OS specific conditional statements as I plan on multibooting and want a different code path for Darwin vs Windows. Is this for instance correct:

            Store (0x07D0, OSYS)
            If (CondRefOf (\_OSI, Local0))
            {
                If (_OSI ("Darwin"))
                {
                    //darwin code
                }

                If (_OSI ("Linux"))
                {
                    //linux code
                }

                If (_OSI ("Windows 2001"))
                {
                    //windows code
                }

Is there also an 'if else' way of putting it?

 

Thanks.

Link to comment
Share on other sites

I integrated my dsdt into my rom bios so not just OS X would see it or use it.

 

Extremely bad idea! Looks like you are looking for trouble with your computer...  :no:

 

Mieze

Link to comment
Share on other sites

I have dual bios and I'm not afraid to test the limits of what can be done!

 

For what it's worth been playing around with ozmosis..

 

I feel like the other Rob Lowe whose looking for trouble. Don't be like the other me..

Link to comment
Share on other sites

  • 3 months later...

My usb issues are strange. 

 

On a Z77x-UD3H. 

Using the genericusb kext, and the gux-dever-usb/gux-no-idle flags. Other than that it's a pretty minimal config with Clover I believe (new to Clover). I'll attach it in case anyone wants to look at it =P.

 

But anyways, sometimes a port just stops working, even though they all can work. Furthermore after sleep it's very likely one will stop working. Also, after sleep some stuff unmounts, mainly my kb/mouse which is annoying. The latest revelation is that moving my mouse to my monitor's hub allowed to remain connected, which is strange because it's still connected to a USB 3 connection at the back of the board (My board has no rear USB 2.0 ports). Ugh... USB should not be this hard to get it work haha.

 

Other notable settings:

In bios: CPU PLL overvoltage disabled. XHCI auto and also tried enabled. XHCI/EHCI hand-off enabled. 

Tried sudo pmset - a standby 0

and sudo pmset -a hibernatemode 0

 

Not sure what else to try next besides the dsdt edits in the OP. 

config.txt

Link to comment
Share on other sites

GA-Z77X-UD3H has both Intel USB3 & VIA VL800 USB3. Have you tried using a patched AppleUSBXHCI kext instead of GenericUSBXHCI (you can use Clover patching): http://www.insanelymac.com/forum/files/file/150-patched-appleusbxhci/

 

Also, can you post an IOReg dump using IORegistryExplorer?

Alright, trying patching the Apple kext instead, will post results ( fingers crossed).

 

IOReg dump, I think I did it right:

EnzoFXIOReg.zip

Link to comment
Share on other sites

Alright, well I *think* things are a bit better...

 

At first I thought it was working great, no crashes. Peripherals such as kb/mouse and USB sound card were working immediately after wake (not disconnecting). So I thought it was a great sign. However USB flash drives still disconnect. I've also realized there's a difference between the Intel USB ports vs the VIA ones. The VIA ones at one point weren't detecting any usb drives. Weird. Furthermore once I started actually using my USB HDD enclosure it caused a USB sound issue I had before. Where sound went out suddenly with Quicktime. Though this time relaunching QT seemed to fix it, as before I had to completely restart as it was system wide...

 

My only takeaway thus far: USB Drives are a different animal than just getting my peripherals to work. I think peripherals are mostly working as intended so that's great. My USB enclosure caused 2 crashes in the short time it was connected. The KP report doesn't seem to suggest to it was USB related:

*** Panic Report ***
panic(cpu 1 caller 0xffffff80225448fb): "thread_invoke: preemption_level 1, possible cause: blocking while holding a spinlock, or within interrupt context"@/SourceCache/xnu/xnu-2782.30.5/osfmk/kern/sched_prim.c:2213
Backtrace (CPU 1), Frame : Return Address
0xffffff8134d9b230 : 0xffffff802252bda1 
0xffffff8134d9b2b0 : 0xffffff80225448fb 
0xffffff8134d9b340 : 0xffffff80225421af 
0xffffff8134d9b380 : 0xffffff7fa344db77 
0xffffff8134d9b3a0 : 0xffffff7fa4da78e8 
0xffffff8134d9b3f0 : 0xffffff7fa344e2a8 
0xffffff8134d9b430 : 0xffffff8022ad73b4 
0xffffff8134d9b480 : 0xffffff7fa344e388 
0xffffff8134d9b4a0 : 0xffffff7fa344d776 
0xffffff8134d9b510 : 0xffffff7fa344d9a2 
0xffffff8134d9b550 : 0xffffff80227a2d0c 
0xffffff8134d9b690 : 0xffffff80228739dd 
0xffffff8134d9ba10 : 0xffffff8022884bcb 
0xffffff8134d9bb20 : 0xffffff8022884776 
0xffffff8134d9bd40 : 0xffffff802288e8d8 
0xffffff8134d9bda0 : 0xffffff8022a152c0 
0xffffff8134d9be90 : 0xffffff80229f2eb6 
0xffffff8134d9bec0 : 0xffffff80229ed3ab 
0xffffff8134d9bf10 : 0xffffff80229ed2fc 
0xffffff8134d9bf50 : 0xffffff8022a4bc56 
0xffffff8134d9bfb0 : 0xffffff8022635376 
      Kernel Extensions in backtrace:
         com.apple.iokit.IONetworkingFamily(3.2)[247581D8-DFC5-3AAE-B079-3D13F5514C2B]@0xffffff7fa343c000->0xffffff7fa3467fff
         com.insanelymac.ALXEthernet(1.0.2)[6348F8DB-1233-3D33-A7FD-66E3ED3E7EB6]@0xffffff7fa4da6000->0xffffff7fa4db3fff
            dependency: com.apple.iokit.IONetworkingFamily(3.2)[247581D8-DFC5-3AAE-B079-3D13F5514C2B]@0xffffff7fa343c000
            dependency: com.apple.iokit.IOPCIFamily(2.9)[D8F585E8-2EE9-3135-8E37-A034123FE45C]@0xffffff7fa2c47000

BSD process name corresponding to current thread: smbd
Boot args: -gux_defer_usb2 -gux_no_idle kext-dev-mode=1 UseKernelCache 

Mac OS version:
14E46

Kernel version:
Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64
Kernel UUID: E3C26B2F-8B97-3F1D-B193-690F7E34F830
Kernel slide:     0x0000000022200000
Kernel text base: 0xffffff8022400000
__HIB  text base: 0xffffff8022300000
System model name: iMac13,2 (Mac-FC02E91DDD3FA6A4)

System uptime in nanoseconds: 64072361428672
last loaded kext at 63575446310857: com.apple.iokit.SCSITaskUserClient	3.7.5 (addr 0xffffff7fa4e2f000, size 36864)
last unloaded kext at 63639239226814: com.apple.driver.AppleUSBCDC	4.3.3b1 (addr 0xffffff7fa4e23000, size 16384)
loaded kexts:
jp.plentycom.driver.SteerMouse	4.2.4
com.insanelymac.ALXEthernet	1.0.2
org.netkas.driver.FakeSMC	1372
com.apple.iokit.IOUSBAttachedSCSI	1.1.1
com.apple.filesystems.smbfs	3.0.1
com.apple.filesystems.autofs	3.0
com.apple.driver.AppleUpstreamUserClient	3.6.1
com.apple.driver.AppleMCCSControl	1.2.12
com.apple.kext.AMDFramebuffer	1.3.2
com.apple.iokit.IOBluetoothSerialManager	4.3.5f8
com.apple.driver.AGPM	110.19.6
com.apple.driver.X86PlatformShim	1.0.0
com.apple.driver.ApplePlatformEnabler	2.2.0d4
com.apple.driver.AppleOSXWatchdog	1
com.apple.driver.AppleLPC	1.7.3
com.apple.iokit.IOUserEthernet	1.0.1
com.apple.AMDRadeonX3000	1.3.2
com.apple.Dont_Steal_Mac_OS_X	7.0.0
com.apple.driver.AppleHWAccess	1
com.apple.kext.AMD6000Controller	1.3.2
com.apple.driver.AppleHV	1
com.apple.driver.AppleIntelSlowAdaptiveClocking	4.0.0
com.apple.driver.AppleIntelFramebufferCapri	10.0.6
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless	1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib	1.0.0
com.apple.BootCache	36
com.apple.driver.XsanFilter	404
com.apple.iokit.IOAHCIBlockStorage	2.7.1
com.apple.driver.AppleUSBHub	705.4.2
com.apple.driver.AppleUSBXHCI	710.4.11
com.apple.driver.AppleUSBEHCI	705.4.14
com.apple.driver.AppleAHCIPort	3.1.2
com.apple.driver.AppleRTC	2.0
com.apple.driver.AppleACPIButtons	3.1
com.apple.driver.AppleHPET	1.8
com.apple.driver.AppleSMBIOS	2.1
com.apple.driver.AppleAPIC	1.7
com.apple.driver.AppleIntelCPUPowerManagementClient	218.0.0
com.apple.nke.applicationfirewall	161
com.apple.security.quarantine	3
com.apple.security.TMSafetyNet	8
com.apple.driver.AppleIntelCPUPowerManagement	218.0.0
com.apple.kext.triggers	1.0
com.apple.driver.AppleSMBusController	1.0.13d1
com.apple.iokit.IOSMBusFamily	1.1
com.apple.iokit.IOSerialFamily	11
com.apple.driver.IOBluetoothHIDDriver	4.3.5f8
com.apple.driver.X86PlatformPlugin	1.0.0
com.apple.iokit.IONDRVSupport	2.4.1
com.apple.driver.IOPlatformPluginFamily	5.9.1d7
com.apple.iokit.IOSurface	97.4
com.apple.iokit.IOBluetoothFamily	4.3.5f8
com.apple.kext.AMDSupport	1.3.2
com.apple.driver.AppleSMC	3.1.9
com.apple.iokit.IOSCSIBlockCommandsDevice	3.7.5
com.apple.iokit.IOUSBUserClient	705.4.0
com.apple.iokit.IOSlowAdaptiveClockingFamily	1.0.0
com.apple.iokit.IOAcceleratorFamily2	156.16
com.apple.AppleGraphicsDeviceControl	3.10.24
com.apple.iokit.IOGraphicsFamily	2.4.1
com.apple.iokit.IOUSBMassStorageClass	3.7.2
com.apple.driver.AppleUSBAudio	295.23
com.apple.iokit.IOAudioFamily	203.3
com.apple.vecLib.kext	1.2.0
com.apple.iokit.IOSCSIArchitectureModelFamily	3.7.5
com.apple.driver.AppleUSBMergeNub	705.4.0
com.apple.iokit.IOUSBHIDDriver	705.4.0
com.apple.driver.AppleUSBComposite	705.4.9
com.apple.iokit.IONetworkingFamily	3.2
com.apple.iokit.IOUSBFamily	720.4.4
com.apple.iokit.IOAHCIFamily	2.7.5
com.apple.driver.AppleEFINVRAM	2.0
com.apple.iokit.IOHIDFamily	2.0.0
com.apple.driver.AppleEFIRuntime	2.0
com.apple.security.sandbox	300.0
com.apple.kext.AppleMatch	1.0.0d1
com.apple.driver.AppleKeyStore	2
com.apple.driver.AppleMobileFileIntegrity	1.0.5
com.apple.driver.AppleCredentialManager	1.0
com.apple.driver.DiskImages	397
com.apple.iokit.IOStorageFamily	2.0
com.apple.iokit.IOReportFamily	31
com.apple.driver.AppleFDEKeyStore	28.30
com.apple.driver.AppleACPIPlatform	3.1
com.apple.iokit.IOPCIFamily	2.9
com.apple.iokit.IOACPIFamily	1.4
com.apple.kec.Libm	1
com.apple.kec.pthread	1
com.apple.kec.corecrypto	1.0
Model: iMac13,2, BootROM IM131.010A.B05, 4 processors, Intel Core i5, 3.40 GHz, 8 GB, SMC 2.11f14
Graphics: AMD Radeon HD 6850 X2, AMD Radeon HD 6850 X2, PCIe, 1024 MB
Memory Module: BANK0/DIMM1, 4 GB, DDR3, 1333 MHz, Corsair, CMZ8GX3M2A1600C9
Memory Module: BANK1/DIMM1, 4 GB, DDR3, 1333 MHz, Corsair, CMZ8GX3M2A1600C9
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: Crucial_CT240M500SSD1, 240.06 GB
Serial ATA Device: WDC WD6400AAKS-75A7B0, 640.14 GB
Serial ATA Device: ST3500320AS, 500.11 GB
Serial ATA Device: Crucial_CT240M500SSD3, 240.06 GB
USB Device: Hub
USB Device: Hub
USB Device: Hub
USB Device: Logitech Camera
USB Device: Hub
USB Device: USB Receiver
USB Device: Ultra Fast Media Reader
USB Device: Creative Xmod
USB Device: USB2.0 Hub
USB Device: daskeyboard
Thunderbolt Bus: 

It just seems unstable when USB drives are connected at this time.

Could it be power related? I noticed Clover has a setting to give devices more voltage or something. Not sure what to try next. 

Link to comment
Share on other sites

  • 2 weeks later...

Ok so further testing... (just takes me a while as I rarely have the time)

 

USB 2.0 Flash drive works in the VIA USB 3.0 ports. However USB 3.0 External Enclosure doesn't mount when connected to the same VIA ports.

 

USB 3.0 Enclosure works with Intel USB 3.0 ports. However USB 2.0 Flash drives does not.... 

 

Again, USB Mouse/All Peripherals? Work fine in all ports... This is just strange to me. At least I now have enough ports working (Bought a 4 ports USB 2.0 Header PCI bracket) that I can get anything to work one way or another. Stability.. I'll get back on testing that.

 

 

I did switch Atheros kext, thanks @TheRacerMaster. 

 

Edit: Well no crashes so far, so overall solid. 

Link to comment
Share on other sites

  • 4 months later...

 

 

GUIDE UPDATED! SEE AT THE BOTTOM OF THIS POST UPDATE #2 and #3!!!

Hello hackintoshers!

This thread will help you to enable USB 3.0 on 7 Series motherboards with Ivy Bridge CPUs. This editing work is based on forum member Mieze's job; she's the mind behind all of this stuff. It's important to note that is a work in progress, I personally tested it with full success on Gigabyte GA-Z77N-WiFi, Zotac Z77- ITX WiFi and Asrock Z77E-ITX, so hopefully most of Z77 and H77 boards can support this.

Due to the fact that on pre-7 series motherboards USB 3.0 was not always fully supported, this method allows Intel chipset USB 3.0 ports to work properly with any kind of device (3.0 and backward to 2.0 and 1.0)
Assuming that you have a Z77 or H77 board with Ivy Bridge processor (Sandy Bridge CPUs or older don't support USB 3.0, so this guide is not for you, sorry <--- Bad guess!) I guess you already have a dsdt to get HDMI Audio working properly. If yes, skip the step #1 and step # 2 and jump directly on step #3. If not, follow this guide from step #1.


Tools

All you need is:
- Internet access
- A program to extract and edit DSDT like DSDT Editor
- A working Mac or Hackintosh
- Coffee, cigarettes, time and patience: I did need all of them!




Step #1 - Getting DSDT patches
This first step allow you to get the patches in order to have a clean DSDT with HDMI Audio patch. Forum member Toleda has done a great job about this, generating just two patches.
- Go to toleda's repository and click on ib1-ami_efi_clean_compile.txt
- In the top right corner click on Raw command, the browser window will now show only text: that's the patch
- Save the windows as a file text in Desktop (generating
ib1-ami_efi_clean_compile.txt)
- Go back to the previous repository page and select AMI-HD4000-7_Series, then you'll have two options:

  • ib2-hdmi_audio_ami_efi_hd4000-1.txt if you have a discrete graphic card
  • ib3-hdmi_audio_ami_efi_hd4000-3.txt if you have only Intel HD 4000 onboard graphic
​- Choose whatever you need and save a text file as previous explained for the first patch. Now on desktop you'll have two text files, and we're going to use with DSDT Editor (from now DE)


Step #2 - Extract, patch and compile DSDT for HDMI Audio
- Open DE and in Menu bar click on File/Extract DSDT, a fresh DSDT will be generated.
NOTE: If you already have a DSDT in System/Extra folder reboot the system typing at Chameleon-Chimera screen DSDT=Null then proceed extracting DSDT
- In DE Menu bar click on Patch/Open and choose the first text file you saved in Step 1 of this thread (
ib1-ami_efi_clean_compile.txt)
- In the new window just appeared click on Apply, wait the end of the process (a few seconds) and Close
- In DE Menu bar click on IASL/Compile: a new window will appear reporting compiling results. It's possible that it will report some Warnings or Remarks, the important thing is that MUST BE 0 Errors! Warning or Remarks will disappear applying the next patch.
- Repeat patch procedure choosing ib3-hdmi_audio_ami_efi_hd4000-X.txt (Patch/Open/Apply/Close and IASL/Compile)
- Now, after compiling, compile window should report 0 Errors, 0 Warnings, 0 Remarks, XX Optimizations, so in DE Menu bar Click on IASL/Save AML as and name it DSDT.aml. You're ready to edit (manually, for now) DSDT in order to fix USB 3.0 backward port. Drink a cup of coffee, feed your cats, kiss your wife, smoke a cigarette and lock the door.


Step #3 - USB 3.0 fix

- Open DSDT just saved and find
Device (XHC)
- Select the entire block from Device (XHC) to Device (HDEF)
Device (XHC)
...............................
Device (HDEF)
and replace with this
Device (XHC1)
	 {
		 Name (_ADR, 0x00140000)
		 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
		 }

		 OperationRegion (XH1C, PCI_Config, 0xD0, 0x10)
		 Field (XH1C, ByteAcc, NoLock, Preserve)
		 {
			 PAHC, 1,
			 PBHC, 1,
			 PCHC, 1,
			 PDHC, 1,
					 Offset (0x08),
			 PASS, 1,
			 PBSS, 1,
			 PCSS, 1,
			 PDSS, 1
		 }

		 OperationRegion (XHC2, PCI_Config, 0x44, 0x04)
		 Field (XHC2, ByteAcc, NoLock, Preserve)
		 {
					 Offset (0x01),
			 MIAI, 2
		 }

		 Name (XRST, Zero)
		 Method (_INI, 0, NotSerialized)
		 {
			 If (OSDW ())
			 {
				 Store (Zero, MIAI)
			 }

			 If (LAnd (LGreaterEqual (OSYS, 0x07DC), LLess (OSYS, 0x2710)))
			 {
				 Store (One, PASS)
				 Store (One, PAHC)
				 Store (One, PBSS)
				 Store (One, PBHC)
				 Store (One, PCSS)
				 Store (One, PCHC)
				 Store (One, PDSS)
				 Store (One, PDHC)
			 }
		 }

		 Method (_S3D, 0, NotSerialized)
		 {
			 Return (0x02)
		 }

		 Method (_S4D, 0, NotSerialized)
		 {
			 Return (0x02)
		 }

		 Device (RHUB)
		 {
			 Name (_ADR, Zero)
			 Device (PRT1)
			 {
				 Name (_ADR, One)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 0x03,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }

				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }

				 Name (MUXS, "EHCA")
			 }

			 Device (PRT2)
			 {
				 Name (_ADR, 0x02)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 0x03,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }

				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }

				 Name (MUXS, "EHCB")
			 }

			 Device (PRT3)
			 {
				 Name (_ADR, 0x03)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 0x03,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }

				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }

				 Name (MUXS, "EHCC")
			 }

			 Device (PRT4)
			 {
				 Name (_ADR, 0x04)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 0x03,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }

				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }

				 Name (MUXS, "EHCD")
			 }
		 }

		 Method (_PRW, 0, NotSerialized)
		 {
			 Return (GPRW (0x0D, 0x04))
		 }

		 Method (_DSM, 4, NotSerialized)
		 {
			 Store (Package (0x0B)
				 {
					 "AAPL,current-available",
					 0x0834,
					 "AAPL,current-extra",
					 0x0898,
					 "AAPL,current-extra-in-sleep",
					 0x0640,
					 "AAPL,max-port-current-in-sleep",
					 0x0834,
					 "AAPL,device-internal",
					 Zero,
					 Buffer (One)
					 {
						 0x00
					 }
				 }, Local0)
			 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
			 Return (Local0)
		 }

		 Method (XHCA, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (One, PASS)
			 }

			 Store (One, PAHC)
		 }

		 Method (XHCB, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (One, PBSS)
			 }

			 Store (One, PBHC)
		 }

		 Method (XHCC, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (One, PCSS)
			 }

			 Store (One, PCHC)
		 }

		 Method (XHCD, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (One, PDSS)
			 }

			 Store (One, PDHC)
		 }

		 Method (EHCA, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (Zero, PASS)
			 }

			 Store (Zero, PAHC)
		 }

		 Method (EHCB, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (Zero, PBSS)
			 }

			 Store (Zero, PBHC)
		 }

		 Method (EHCC, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (Zero, PCSS)
			 }

			 Store (Zero, PCHC)
		 }

		 Method (EHCD, 0, NotSerialized)
		 {
			 If (LNot (OSDW ()))
			 {
				 Store (Zero, PDSS)
			 }

			 Store (Zero, PDHC)
		 }
	 }

	 Device (HDEF)
- Find
Name (_ADR, 0x001D0000)
under that you'll find
Device (HUBN)
here you have to look for the devices that don't have "Method (_DSM". In my case they are Device (PR11), Device (PR12), Device (PR13), Device (PR18), skipping Device (PR01). Those devices - without "Method (_DSM" - have to be modified adding Name (MUXS, "XHCA") to Device (PR11), Name (MUXS, "XHCB") to Device (PR12), Name (MUXS, "XHCC") to Device (PR13), Name (MUXS, "XHCD") to Device (PR18).
Here is the first case, that's the same for the other three
from
Device (PR11)
				 {
					 Name (_ADR, One)
					 Method (_UPC, 0, Serialized)
					 {
						 Name (UPCP, Package (0x04)
						 {
							 0xFF,
							 0xFF,
							 Zero,
							 Zero
						 })
						 Return (UPCP)
					 }

					 Method (_PLD, 0, Serialized)
					 {
						 Name (PLDP, Package (0x01)
						 {
							 Buffer (0x10)
							 {
								 /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								 /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
							 }
						 })
						 Return (PLDP)
					 }
				 }
into
Device (PR11)
				 {
					 Name (_ADR, One)
					 Method (_UPC, 0, Serialized)
					 {
						 Name (UPCP, Package (0x04)
						 {
							 0xFF,
							 0xFF,
							 Zero,
							 Zero
						 })
						 Return (UPCP)
					 }

					 Method (_PLD, 0, Serialized)
					 {
						 Name (PLDP, Package (0x01)
						 {
							 Buffer (0x10)
							 {
								 /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								 /* 0008 */ 0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
							 }
						 })
						 Return (PLDP)
					 }

					 Name (MUXS, "XHCA")
				 }
-Find
Method (_OSC, 4, Serialized)
and replace the entire block from this
Method (_OSC, 4, Serialized)
		 {
			 Store (Arg3, Local0)
			 CreateDWordField (Local0, Zero, CDW1)
			 CreateDWordField (Local0, 0x04, CDW2)
			 CreateDWordField (Local0, 0x08, CDW3)
			 If (^XHC.CUID (Arg0))
			 {
				 Return (^XHC.POSC (Arg1, Arg2, Arg3))
			 }
			 Else
			 {
				 If (_OSI ("Windows 2012"))
				 {
					 If (LEqual (XCNT, Zero))
					 {
						 ^XHC.XSEL ()
						 Increment (XCNT)
					 }
				 }
			 }

			 If (LEqual (Arg0, GUID))
			 {
				 Store (CDW2, SUPP)
				 Store (CDW3, CTRL)
				 If (LEqual (NEXP, Zero))
				 {
					 And (CTRL, 0xFFFFFFF8, CTRL)
				 }

				 If (NEXP)
				 {
					 If (Not (And (CDW1, One)))
					 {
						 If (And (CTRL, One))
						 {
							 NHPG ()
						 }

						 If (And (CTRL, 0x04))
						 {
							 NPME ()
						 }
					 }
				 }

				 If (LNotEqual (Arg1, One))
				 {
					 Or (CDW1, 0x08, CDW1)
				 }

				 If (LNotEqual (CDW3, CTRL))
				 {
					 Or (CDW1, 0x10, CDW1)
				 }

				 Store (CTRL, CDW3)
				 Store (CTRL, OSCC)
				 Return (Local0)
			 }
			 Else
			 {
				 Or (CDW1, 0x04, CDW1)
				 Return (Local0)
			 }
		 }

		 Scope (\_SB.PCI0)
to this
Method (_OSC, 4, Serialized)
		 {
			 Store (Arg3, Local0)
			 CreateDWordField (Local0, Zero, CDW1)
			 CreateDWordField (Local0, 0x04, CDW2)
			 CreateDWordField (Local0, 0x08, CDW3)
			 Store (CDW2, SUPP)
			 Store (CDW3, CTRL)
			 If (LEqual (One, OSDW ()))
			 {
				 If (LAnd (LEqual (Arg0, GUID), NEXP))
				 {
					 If (Not (And (CDW1, One)))
					 {
						 If (And (CTRL, 0x02))
						 {
							 NHPG ()
						 }

						 If (And (CTRL, 0x04))
						 {
							 NPME ()
						 }
					 }

					 If (LNotEqual (Arg1, One))
					 {
						 Or (CDW1, 0x08, CDW1)
					 }

					 If (LNotEqual (CDW3, CTRL))
					 {
						 Or (CDW1, 0x10, CDW1)
					 }

					 Store (CTRL, CDW3)
					 Store (CTRL, OSCC)
					 Return (Local0)
				 }
				 Else
				 {
					 Or (CDW1, 0x04, CDW1)
					 Return (Local0)
				 }
			 }
			 Else
			 {
				 If (LEqual (Arg0, Buffer (0x10)
						 {
							 /* 0000 */ 0xA9, 0x12, 0x95, 0x7C, 0x05, 0x17, 0xB4, 0x4C,
							 /* 0008 */ 0xAF, 0x7D, 0x50, 0x6A, 0x24, 0x23, 0xAB, 0x71
						 }))
				 {
					 Store (One, ^XHC1.PASS)
					 Store (One, ^XHC1.PAHC)
					 Store (One, ^XHC1.PBSS)
					 Store (One, ^XHC1.PBHC)
					 Store (One, ^XHC1.PCSS)
					 Store (One, ^XHC1.PCHC)
					 Store (One, ^XHC1.PDSS)
					 Store (One, ^XHC1.PDHC)
				 }

				 Return (Local0)
			 }
		 }

		 Scope (\_SB.PCI0)
-Find this block
Scope (_SB.PCI0)
{
	 Method (_INI, 0, NotSerialized)
	 {
		 Store (0x07D0, OSYS)
		 If (CondRefOf (_OSI, Local0))
		 {
			 If (_OSI ("Windows 2001"))
			 {
				 Store (0x07D1, OSYS)
			 }

			 If (_OSI ("Windows 2001 SP1"))
			 {
				 Store (0x07D1, OSYS)
			 }

			 If (_OSI ("Windows 2001 SP2"))
			 {
				 Store (0x07D2, OSYS)
			 }

			 If (_OSI ("Windows 2001.1"))
			 {
				 Store (0x07D3, OSYS)
			 }

			 If (_OSI ("Windows 2006"))
			 {
				 Store (0x07D6, OSYS)
			 }

			 If (_OSI ("Windows 2009"))
			 {
				 Store (0x07D9, OSYS)
			 }

			 If (_OSI ("Windows 2012"))
			 {
				 Store (0x07DC, OSYS)
			 }
		 }
	 }
add this
If (_OSI ("Darwin"))
			 {
				 Store (0x2710, OSYS)
			 }
and the result will be
Scope (_SB.PCI0)
{
	 Method (_INI, 0, NotSerialized)
	 {
		 Store (0x07D0, OSYS)
		 If (CondRefOf (_OSI, Local0))
		 {
			 If (_OSI ("Darwin"))
			 {
				 Store (0x2710, OSYS)
			 }

			 If (_OSI ("Windows 2001"))
			 {
				 Store (0x07D1, OSYS)
			 }

			 If (_OSI ("Windows 2001 SP1"))
			 {
				 Store (0x07D1, OSYS)
			 }

			 If (_OSI ("Windows 2001 SP2"))
			 {
				 Store (0x07D2, OSYS)
			 }

			 If (_OSI ("Windows 2001.1"))
			 {
				 Store (0x07D3, OSYS)
			 }

			 If (_OSI ("Windows 2006"))
			 {
				 Store (0x07D6, OSYS)
			 }

			 If (_OSI ("Windows 2009"))
			 {
				 Store (0x07D9, OSYS)
			 }

			 If (_OSI ("Windows 2012"))
			 {
				 Store (0x07DC, OSYS)
			 }
		 }
	 }
Please note that the block above may result different from board to board: leave as it is DON'T COPY MY RESULT posted up here, just adding Darwin block is the important thing!

- At the end of DSDT add this block just before the last "}"
Method (OSDW, 0, NotSerialized)
{
	 If (LEqual (OSYS, 0x2710))
	 {
		 Return (One)
	 }
	 Else
	 {
		 Return (Zero)
	 }
}
this is the result
<<<<<<<DSDT stuff>>>>>>>
Store ("ib3-hdmi_audio_ami_efi_hd4000-3.txt_v1.0 dsdt edits, github.com/toleda", Debug)
Method (OSDW, 0, NotSerialized)
{
	 If (LEqual (OSYS, 0x2710))
	 {
		 Return (One)
	 }
	 Else
	 {
		 Return (Zero)
	 }
}
}
- Now the Compiler Summary windows should be clean (0 Errors, 0 Warning, 0 Remarks, XX Optimizations). Done.
- If not, maybe it's necessary to resolve some references to the XHC that could generate compile error (it's about XHC to be replaced with XHC1), it depends by the error message.

Your DSDT will make Intel USB 3.0 fully working
Please note that I'm not a DSDT or ACPI expert.
I take NO CREDITS for all this amazing work! I simply gathered infos from web and from Mieze.
Anyway, feel free to report success, errors, advices etc.
Mieze: you're the one! Thank you!



UPDATE April 15th, 2013
As stated by Mieze in post #24, some System Definitions don't work with USB 3.0 backwards.
So, if you're using Ivy Bridge cpu and 7 series motherboard (Z77, H77, B75 etc.) probably the best SysDef choice is MacMini 6,1 (i5 cpu) or 6,2 (i7 cpu, with the most pstates regarding Ivy Bridge Power Management). It also be pretty good iMac 13,1 (i5 cpu) iMac 13,2 (i7 cpu). Anyhow, any Ivi Bridge SysDef make usb 3.0 working properly with the editing above here.
You can also choose Sandy Bridge SysDef (it depends by your components, of course) MacMini 5,1 or Mac Pro 3,1. Cheers!



UPDATE 2 April 21st, 2013
Awsome news! (not so new, as a matter of fact)
Forum member Zenith432 has created a GenericUSBXHCI.kext that makes Intel Z77 usb hub controller working properly without all the editing work above reported. And more: GenericUSBXHCI.kext makes my ASMedia usb 3 controller working, as well.
  • Download "Binaries v.1.1.4" from his thread
  • Remove any kext installed to make (partially?) usb 3.0 working from System/Library/Extensions (in my case CalDigitUSBxHCI.kext and CalDigitFastIO.kext)
  • Install GenericUSBXHCI.kext with Kext Utility or whatever you like
  • Show hidden files typing in terminal window defaults write com.apple.finder AppleShowAllFiles TRUE then press enter and type killall Finder and press enter again
  • Paste xhcdump in /usr/local/bin
  • Repair permissions and rebuilt cache
  • Hide hidden files typing in terminal window defaults write com.apple.finder AppleShowAllFiles FALSE then press enter and type killall Finder and press enter again
  • Reboot
Here is my test with an external HDD USB 3.0 and flash drive 2.0. Asrock Z77E-ITX motherborad and Intel core i7 3770S

PART 1 - Mieze's DSDT patch + ASMedia kexts (CalDigitFastIO.kext and CalDigitUSBxHCI.kext) downloaded here

- HDD connected to Intel usb 3, recognized as Super Speed Bus up to 5 Gb/sec and stays connected after wake from sleep
- HDD connected to ASMedia usb 3, recognized as Super Speed Bus up to 480 Mb/sec and auto remounted after wake from sleep
- HDD connected to usb 2 recognized as High Speed Bus up to 480 Mb/sec and stays connected after wake from sleep
- Flash drive recognized properly everywhere, but in ASMedia usb 3 auto remounted after wake from sleep



PART 2 - No Mieze's DSDT patch, no ASMedia kexts, just GenericUSBXHCI.kext

- HDD connected to Intel usb 3, recognized as Super Speed Bus up to 5 Gb/sec and stays connected after wake from sleep
- HDD connected to ASMedia usb 3, recognized as Super Speed Bus up to 5 Gb/sec and auto remounted after wake from sleep
- HDD connected to usb 2 recognized as High Speed Bus up to 480 Mb/sec and stays connected after wake from sleep
- Flash drive recognized properly everywhere, but in ASMedia usb 3 auto remounted after wake from sleep
- "-gux_nosleep" kernel flag caused unmount remount in Intel usb3 without solving remount in ASMedia ports
- "-gux_nomsi" kernel flag doesn't affect Intel ports after wake from sleep, but doesn't solve unmount on ASMedia ports.


Conclusion
Regarding ASMedia USB 3.0 Controller, GenericUSBXHCI.kext works better than CalDigitFastIO.kext + CalDigitUSBxHCI.kext
Regarding Intel Z77 USB 3.0 Controller, GenericUSBXHCI.kext does the same job as Mieze's DSDT patches


Using DSDT with Mieze's patch doesn't affect GenericUSBXHCI.kext job. Not necessary, I know, but for the sake of curiosity...


UPDATE 3 April 22nd, 2013
Tested on Gigabyte Z77N-ITX WiFi + Intel i7 3770K and on Zotac Z77-ITX WiFi + Intel i7 3770T

Since these motherboards have only Intel Controller I couln't say these results are for all mobos.
  • On Zotac everything went well: tested both methods DSDT patch and just GenericUSBXHCI.kext. Also wake from sleep doesn't affect hdd or flash drive connection. So I decided to keep DSDT editing, I prefer not to add extra kexts, but it's definetly the same result.
  • On Gigabyte I had some issues. Basically every device is properly recognized, but with both methods they're disconnected after wake from sleep. This happens in every usb port: 2.0 and 3.0 as well. Furthermore GenericUSBXHCI.kext method seems to compromise my apple usb keyboard hub until I unplug the device connected and remounted after sleep (hdd or flash drive). That doesn't happen when applying DSDT patch. So in this case DSDT patch has my +1. I can't really say why it happens, maybe something in Gigabyte Uefi Bios has to be set in another way, or maybe some other dsdt string to be changed...really don't know.
Carbo178 reported best results with DSDT patch method on his ASUS mobo (i.e. no sleep issues), what about you, guys?
I think that our community needs testers. So come on, report results!

Unfortunately this is my last day with Gigabyte Z77N-ITX WiFi. So my tests stop here. Until some other friend or relative will ask me to build him/her a hack! Ah ah!
Cheers
g.

 

 


Hello! I have a GA-Z77N-WiFi with ivy bridge cpu and all usb ports working without patch. GA-Z77N-WiFi users really need this patch??????

Edited by Micky1979
please use bbcode to enclose a long post
Link to comment
Share on other sites

 Share

×
×
  • Create New...