Jump to content

USB-Port is source for wake - Where to edit dsdt.aml ?


31 posts in this topic

Recommended Posts

Hi there,

 

I'm running Mountain Lion on a Gigabyte GA-Z77X-UD5H.

Sleep is not yet working properly. Right after going to sleep it wakes again.

Via console I found out, that my external soundcard (USB) is the reason for the wakeup.

On my last Hackintosh I used the same external soundcard and had the same problem.

Back then I was told in this forum to deactivate wakeup for this certain usb-port in the dsdt.aml - it worked out wonderful.

 

Right now I'm looking for the same solution.

I created a dsdt.aml (though the GA-Z77-UD5H doesn't necessarily need a dsdt.aml) and placed it my /Extra folder.

 

The thing is: this dsdt.aml looks different than my old one (last motherboard). I can't find the matching entries to deactivate wake for the usb-port.

 

Can you help me and point out what to modify in my dsdt.aml to deactivate wake for an usb-port?

 

Don't know if it helps, but I attached the dsdt.aml to this post.

 

Big, big thanks!

seltsam dsdt.aml.zip

Link to comment
Share on other sites

Thank you for your link, iFIRE!

 

Unfortunately I can't find the mentioned entry in my dsdt.aml.

There is something close called "Device (EHC1)" [instead of "Device (UHC1)"], but the containing snippets are too different to spot what to actually delete there.

 

May you have a look at my attached dsdt.aml?

 

Thanks

Link to comment
Share on other sites

WHAT port usb do you use ? USB1 or EHC1

 

this is your ports EHC1 Y 2, try delete the method power"in blue" for it, and compile your DSDT.

 

 

Device (USB1)

{

Name (_ADR, 0x001D0001)

Method (_PRW, 0, NotSerialized)

{

Return (GPRW (0x03, 0x03))

}

}

Device (USB2)

{

Name (_ADR, 0x001D0002)

Method (_PRW, 0, NotSerialized)

{

Return (GPRW (0x04, 0x03))

}

}

Link to comment
Share on other sites

It says right there that the controller for the ports is AppleUSBEHCI. Also the bus number mentioned is the _ADR of the device. Search for _ADR, 0x001A0000 and you'll find your port.

 

Mine says:

 

Bus USB de alta velocidad:
Ubicación del controlador de servidor: USB integrado
Driver del controlador de servidor: AppleUSBEHCI
ID del dispositivo PCI: 0x1c2d
ID de la revisión de PCI: 0x0005
ID del fabricante de PCI: 0x8086
Número de bus: 0x1a

 

And my DSDT code for that port:

 

Device (EHC2)
{
Name (_ADR, 0x001A0000)

Link to comment
Share on other sites

Awesome, the bus-number is the key, alright!

 

This is the regarding part of my dsdt.aml.

Can you tell me what to edit to prevent wakeup?

 

EDIT: Ok, just removed

 

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

 

from the very end. Copied the dsdt.aml in /Extra and rebooted.

When going to sleep it still wakes saying (console):

 

28.05.13 19:00:15,000 kernel[0]: Wake reason: EHC2

 

Since that wasn't the deciding entry, any ideas what else to modify?

 

Thxalot!

 

 

 

 

Device (EHC2)
 {
Name (_ADR, 0x001A0000) <--- spotted port
	 OperationRegion (PWKE, PCI_Config, 0x62, 0x04)
	 Field (PWKE, DWordAcc, NoLock, Preserve)
	 {
			 , 1,
		 PWUC, 6
	 }
	 Method (_PSW, 1, NotSerialized)
	 {
		 If (Arg0)
		 {
			 Store (Ones, PWUC)
		 }
		 Else
		 {
			 Store (Zero, PWUC)
		 }
	 }
	 Method (_S3D, 0, NotSerialized)
	 {
		 Return (0x02)
	 }
	 Method (_S4D, 0, NotSerialized)
	 {
		 Return (0x02)
	 }
	 Device (HUBN)
	 {
		 Name (_ADR, Zero)
		 Device (PR01)
		 {
			 Name (_ADR, One)
			 Method (_UPC, 0, Serialized)
			 {
				 Name (UPCA, Package (0x04)
				 {
					 0xFF,
					 Zero,
					 Zero,
					 Zero
				 })
				 Return (UPCA)
			 }
			 Method (_PLD, 0, Serialized)
			 {
				 Name (PLDP, Package (0x01)
				 {
					 Buffer (0x10)
					 {
						 /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
						 /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
					 }
				 })
				 Return (PLDP)
			 }
			 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)
				 }
			 }
			 Device (PR12)
			 {
				 Name (_ADR, 0x02)
				 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, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }
				 Alias (SBV1, SDGV)
				 Method (_DSM, 4, Serialized)
				 {
					 If (LEqual (Arg0, Buffer (0x10)
							 {
								 /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B,
								 /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8
							 }))
					 {
						 Name (_T_0, Zero)
						 Store (ToInteger (Arg2), _T_0)
						 If (LEqual (_T_0, Zero))
						 {
							 If (LEqual (Arg1, One))
							 {
								 Return (Buffer (One)
								 {
									 0x07
								 })
							 }
							 Else
							 {
								 Return (Buffer (One)
								 {
									 0x00
								 })
							 }
						 }
						 Else
						 {
							 If (LEqual (_T_0, One))
							 {
								 If (LEqual (SDGV, 0xFF))
								 {
									 Return (Zero)
								 }
								 Else
								 {
									 Return (One)
								 }
							 }
							 Else
							 {
								 If (LEqual (_T_0, 0x02))
								 {
									 Return (SDGV)
								 }
							 }
						 }
					 }
					 Return (Zero)
				 }
			 }
			 Device (PR13)
			 {
				 Name (_ADR, 0x03)
				 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, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }
				 Alias (SBV2, SDGV)
				 Method (_DSM, 4, Serialized)
				 {
					 If (LEqual (Arg0, Buffer (0x10)
							 {
								 /* 0000 */ 0x8F, 0x70, 0xFC, 0xA5, 0x75, 0x87, 0xA6, 0x4B,
								 /* 0008 */ 0xBD, 0x0C, 0xBA, 0x90, 0xA1, 0xEC, 0x72, 0xF8
							 }))
					 {
						 Name (_T_0, Zero)
						 Store (ToInteger (Arg2), _T_0)
						 If (LEqual (_T_0, Zero))
						 {
							 If (LEqual (Arg1, One))
							 {
								 Return (Buffer (One)
								 {
									 0x07
								 })
							 }
							 Else
							 {
								 Return (Buffer (One)
								 {
									 0x00
								 })
							 }
						 }
						 Else
						 {
							 If (LEqual (_T_0, One))
							 {
								 If (LEqual (SDGV, 0xFF))
								 {
									 Return (Zero)
								 }
								 Else
								 {
									 Return (One)
								 }
							 }
							 Else
							 {
								 If (LEqual (_T_0, 0x02))
								 {
									 Return (SDGV)
								 }
							 }
						 }
					 }
					 Return (Zero)
				 }
			 }
			 Device (PR14)
			 {
				 Name (_ADR, 0x04)
				 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, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }
			 }
			 Device (PR15)
			 {
				 Name (_ADR, 0x05)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 Zero,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }
				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }
			 }
			 Device (PR16)
			 {
				 Name (_ADR, 0x06)
				 Method (_UPC, 0, Serialized)
				 {
					 Name (UPCP, Package (0x04)
					 {
						 0xFF,
						 Zero,
						 Zero,
						 Zero
					 })
					 Return (UPCP)
				 }
				 Method (_PLD, 0, Serialized)
				 {
					 Name (PLDP, Package (0x01)
					 {
						 Buffer (0x10)
						 {
							 /* 0000 */ 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
							 /* 0008 */ 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
						 }
					 })
					 Return (PLDP)
				 }
			 }
		 }
	 }
	 Method (_PRW, 0, NotSerialized)
	 {
		 Return (GPRW (0x0D, 0x04))
	 }
 }

Link to comment
Share on other sites

You may dump your actual DSDT with MaciASL or DSDT Editor. Also check the boot log, it should say if a DSDT was loaded.

 

Can't help you with this specific problem because I never had it, but surely someone else can guide you to the solution.

 

Good luck!

Link to comment
Share on other sites

You may dump your actual DSDT with MaciASL or DSDT Editor. Also check the boot log, it should say if a DSDT was loaded.

 

Can't help you with this specific problem because I never had it, but surely someone else can guide you to the solution.

 

Good luck!

 

Yup, made sure dsdt.aml was loaded via terminal (bdmesg).

 

Right now I'm just looking for the proper edit to disable wake for this usb-port. Anyone?

 

Thank you

Link to comment
Share on other sites

post a Darwin Dump report

 

There you go, Sir.

(just experimented with deleting dsdt.aml-entrys of EHC2, hope this doesn't effect the results of the dump. if so, let me know - will upload version without dsdt.aml loaded.)

 

post a Darwin Dump report,

 

EDIT: ok, I have patched all devices USB, EHCI and UHCI, take a look if work for you now

 

Patched.zip

 

EDIT: Awesome, it works! Thank you!

So, what exactly did the trick?

Would like limit the the editing to the regarding usb-port only.

 

Thanks again!

DarwinDumper_2.7.1_Chimera_1.5_ML_Seltsam.zip

Link to comment
Share on other sites

TAKE a look in DSDT USBs section, DGTP, FIX IRQS, Schutdown, all usuals patches

 

Do you want me to look in the Forum-Section "DSDT" to look for the patches, or do you want me to look into my own dsdt.aml for "DGTP" etc.?

Please be a little more specific.

 

Or just tell me, what exactly you did change in my dsdt.aml to make disable wake for the usb-ports.

 

Thx

Link to comment
Share on other sites

Well, can't wake with keyboard for example.

Anyway, I don't get why you don't tell me HOW to fix it.

 

You dit it somehow halfway, but that doesn't really help me.

I would like to understand it, to do it my own - that is the whole point.

Teach a man how to fish... you know?

Link to comment
Share on other sites

Do a diff of your original DSDT and the one patched by iFIRE to see the changes (save them to asl first). They're mostly standard patches that you can easily apply with automated apps like MaciASL or DSDT Editor, don't know why you were using that untouched DSDT to begin with.

Link to comment
Share on other sites

Do a diff of your original DSDT and the one patched by iFIRE to see the changes (save them to asl first). They're mostly standard patches that you can easily apply with automated apps like MaciASL or DSDT Editor, don't know why you were using that untouched DSDT to begin with.

 

Thanks for your answer, Maniac10!

I was using the unedited/unpatched dsdt.aml because I was told that my motherboard doesn't really need a dsdt.aml.

Everything was running quite good, no need for a dsdt.aml - except now for deactivating this usb-wake.

 

My thought: runs without dsdt.aml -> no patches needed. Was that a wrong approach?

 

I was checking several forums for a solution for my usb-wake problem but didn't find any "patches" or stuff that exactly fit my needs.

Right now I still wouldn't know what patches to apply, and from where to get them?

 

Since the system is running I don't want to fix stuff, that isn't broken - if you know what I mean.

 

Anyway, can you recommend me a patch that fixes my problem?

Or should I get patches anyway? Why, and which ones?

 

Thank you a lot!

Link to comment
Share on other sites

A DSDT may not be required to run a compatible system but it is the most convenient way to customize a hack no doubt. With just a few lines of text you can avoid patching binaries and plists, leading to an update-proof hackintosh. There are certain exceptions that require further patching, but modern bootloaders like Clover can easily take care of that for you.

 

Anyway, you can find everything you need about DSDT in the proper section in this forum, like I told you before I don't know about your specific problem (nobody here seems to have it) but you should begin testing with a properly working DSDT, which was what iFIRE gave you.

 

To reproduce that try adding PJALM's repository in MaciASL preferences and then you'll have a one click patch for your motherboard. It even includes comments about what every patch does.

Link to comment
Share on other sites

 Share

×
×
  • Create New...