Jump to content

USB sleep then wake "Device Removal" problem


pcb355
 Share

152 posts in this topic

Recommended Posts

here's for my dsdt:

			Device (USBE)
		{
			Name (_ADR, 0x001D0007)
			Method (_S3D, 0, NotSerialized)
			{
				If (LEqual (OSFL, 0x02))
				{
					Return (0x02)
				}

				Return (0x03)
			}

			Name (_PRW, Package (0x02)
			{
				0x0D, 
				0x03
			})
		}

		Name (NATA, Package (0x01)
		{
			0x001F0001
		})

will u, ApexDE &/or stell, help me how to proceed?

 

tia.

 

btw, tried to follow the aboveposted fix by ApexDE, no dsdt.aml can be compiled. i'm getting this:

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct  4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

./dsdt_fixed.txt   222:	 Method (_WAK, 1, NotSerialized)
Warning  1080 -						^ Reserved method must return a value (_WAK)

./dsdt_fixed.txt  3121:						 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Error	4063 -			  Object does not exist ^  (DTGP)

ASL Input:  ./dsdt_fixed.txt - 4532 lines, 147797 bytes, 1624 keywords
Compilation complete. 1 Errors, 1 Warnings, 0 Remarks, 34 Optimizations



Compiling done, if it worked, you have now a patched DSDT in dsdt.aml
If the compiling went wrong, you could force to build it with ./DSDT\ Patcher -f (try this DSDT at your own risk)

Link to comment
Share on other sites

@ kizwan

does your Applesystemprofiler show the highspeed ports as built-in? Search your logs for Sleepcapability. If your ports are unloaded at sleep then you need the fix too.

 

 

@ macinized

 

You need to add the DTGP Method just after the _WAK Method in your DSDT:

 

 

	Method (DTGP, 5, NotSerialized)
{
	If (LEqual (Arg0, Buffer (0x10)
			{
				/* 0000 */	0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
				/* 0008 */	0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
			}))
	{
		If (LEqual (Arg1, One))
		{
			If (LEqual (Arg2, Zero))
			{
				Store (Buffer (One)
					{
						0x03
					}, Arg4)
				Return (One)
			}

			If (LEqual (Arg2, One))
			{
				Return (One)
			}
		}
	}

	Store (Buffer (One)
		{
			0x00
		}, Arg4)
	Return (One)
}

Link to comment
Share on other sites

kewl!

 

got it working now ApexDE. tnx a lot.

 

no more "The disk was not ejected properly. ..." error after waking-up from sleep.

 

OSx86 just gets better. tnx to people like u. :(

 

[update]

 

this patch to dsdt seems to distort my sound. using voodoohda & after booting using the newly-patched dsdt, my sounds sound broken (i.e. "krrk... krrk..." from time to time). :)

 

anyone got this same problem?

 

while at this, is there anyone who can point me to the right direction on how/what to edit in dsdt to make my alc888 work w/out any extra kext?

 

[update2]

 

it seems that the dsdt-patch is NOT the cause of distortion of my sounds. sound distortion only happens after waking-up from sleep.

 

when i rebooted, sounds fine again.

 

then my macPC still has sleep-problem. :P

Link to comment
Share on other sites

OK guys, i managed to patch my DSDT to get the EHCI USB Ports sleeping.

 

Unloading the Controller during Sleep results in USB Drives being removed by force without unmounting, which might result in data-loss:

 

kernel	USBF:	0.392	AppleUSBEHCI[0x6838800]::CheckSleepCapability - controller will be unloaded across sleep

 

The Apple USB Drivers search for a device property "AAPL,clock-id", if it is found the ports are flagged built-in, if not, they will be unloaded during sleep. I renamed my EHCI Devices to EHC1 and EHC2. This is just cosmetical, search for your EHCI Devices by the adresses (e.g 0x001D0007 , 0x001A0007 for Gigabyte)

 

 

Here is my EHCI DSDT Part:

 

 

			Device (EHC1)
		 {
			 Name (_ADR, 0x001D0007)
			 Method (_S3D, 0, NotSerialized)
			 {
				 If (LEqual (OSFL, 0x02))
				 {
					 Return (0x02)
				 }

				 Return (0x03)
			 }

			 Name (_PRW, Package (0x02)
			 {
				 0x0D, 
				 0x03
			 })
					 Method (_DSM, 4, NotSerialized)
					 {
						Store (Package (0x04)
							{
							  "AAPL,clock-id",
							  Buffer (0x01)
							  {
								  0x01
							  },
							  "device_type",
							  Buffer (0x05)
							  {
								 "EHCI"
							  }
							 }, Local0)
						 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						 Return (Local0)
					 }


		 }

		 Device (EHC2)
		 {
			 Name (_ADR, 0x001A0007)
			 Method (_S3D, 0, NotSerialized)
			 {
				 If (LEqual (OSFL, 0x02))
				 {
					 Return (0x02)
				 }

				 Return (0x03)
			 }

			 Name (_PRW, Package (0x02)
			 {
				 0x0D, 
				 0x03
			 })
					 Method (_DSM, 4, NotSerialized)
					 {
						Store (Package (0x04)
							{
							  "AAPL,clock-id",
							  Buffer (0x01)
							  {
								  0x02
							  },
							  "device_type",
							  Buffer (0x05)
							  {
								 "EHCI"
							  }
							 }, Local0)
						 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						 Return (Local0)
					 }

		 }

 

Thanks man I have a Gigabyte EP45C-DS3R and worked perfectly!!! :)

Link to comment
Share on other sites

when i compile i get always these two errors:



/Users/mash/Desktop/SL Pack/DSDTs/dsdt.dsl 4182: DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Error 4067 - Object is not accessible from this scope ^ (DTGP)


Users/mash/Desktop/SL Pack/DSDTs/dsdt.dsl 4222: DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Error 4067 - Object is not accessible from this scope ^ (DTGP)


any idea?

this is what it looks like:

Device (USBE)
{
Name (_ADR, 0x001D0007)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0D,
0x03
})
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x04)
{
"AAPL,clock-id",
Buffer (0x01)
{
0x01
},
"device_type",
Buffer (0x05)
{
"EHCI"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


}

Device (USE2)
{
Name (_ADR, 0x001A0007)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0D,
0x03
})
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x04)
{
"AAPL,clock-id",
Buffer (0x01)
{
0x02
},
"device_type",
Buffer (0x05)
{
"EHCI"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}

}
Link to comment
Share on other sites

USB Bus is regcognized correct as integrated. But the USB High Speed Bus is still expansion slot. I have Attached my default USB DSDT and the fixed one.

Or does I have to put s.th. like this in my EHCI devices:

 

						 Method (_DSM, 4, NotSerialized)
					  {
						 Store (Package (0x04)
							 {
							   "AAPL,clock-id",
							   Buffer (0x01)
							   {
								   0x01
							   },
							   "device_type",
							   Buffer (0x05)
							   {
								  "EHCI"
							   }
							  }, Local0)
						  DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						  Return (Local0)
					  }

USB.rtf

USB_Patched.rtf

Link to comment
Share on other sites

You have patched your Device-IDs, but you need the EHCI Fix for your "USE2" and "USBE" devices too (these are the EHCI Devices).

 

Insert this Method in USBE, the same way you inserted the device-id injection.

						Method (_DSM, 4, NotSerialized)
					{
					   Store (Package (0x04)
						   {
							 "AAPL,clock-id",
							 Buffer (0x01)
							 {
								 0x01
							 },
							 "device_type",
							 Buffer (0x05)
							 {
								"EHCI"
							 }
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}

 

 

And this in USE2

						Method (_DSM, 4, NotSerialized)
					{
					   Store (Package (0x04)
						   {
							 "AAPL,clock-id",
							 Buffer (0x01)
							 {
								 0x02
							 },
							 "device_type",
							 Buffer (0x05)
							 {
								"EHCI"
							 }
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}

 

 

 

 

 

 

Please report back if sleep/wake on USB Mouse works. Many EP35 users have problems with sleep / wake via USB Mouse when NOT using device-id injection.

Link to comment
Share on other sites

@tuxguy

 

Yes, read my post

 

 

@ P35 Mainboard Users

 

It seems that P35 Users need to patch the USB-Device-IDs too. If you have issues with the EHCI Sleep-Fix, check if you patched the USB Device-IDs too. P45 Users just need the EHCI-Fix as they already have the correct USB Device-IDs. Wake with USB Mouse should work for P35 Users too, after applying the USB Device-ID Patches.

 

Good Luck, and report back here!

Link to comment
Share on other sites

OK, this should work:

 

USBE:

			Device (USBE)
		{
			Name (_ADR, 0x001D0007)
			Method (_S3D, 0, NotSerialized)
			{
				If (LEqual (OSFL, 0x02))
				{
					Return (0x02)
				}

				Return (0x03)
			}

			Name (_PRW, Package (0x02)
			{
				0x0D, 
				One
			})

			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x06)
					{
						"device-id",
						Buffer (0x04)
						{
							0x3A, 0x3A, 0x00, 0x00
						},
							 "AAPL,clock-id",
							 Buffer (0x01)
							 {
								 0x01
							 },
							 "device_type",
							 Buffer (0x05)
							 {
								"EHCI"
							 }

					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

		}

 

 

 

USE2:

			Device (USE2)
		{
			Name (_ADR, 0x001A0007)
			Method (_S3D, 0, NotSerialized)
			{
				If (LEqual (OSFL, 0x02))
				{
					Return (0x02)
				}

				Return (0x03)
			}

			Name (_PRW, Package (0x02)
			{
				0x0D, 
				One
			})

			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x06)
					{
						"device-id",
						Buffer (0x04)
						{
							0x3C, 0x3A, 0x00, 0x00
						},
							 "AAPL,clock-id",
							 Buffer (0x01)
							 {
								 0x02
							 },
							 "device_type",
							 Buffer (0x05)
							 {
								"EHCI"
							 }

					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

		}

 

 

 

 

I tested it, it compiles fine here. Good Luck!

Link to comment
Share on other sites

@ ApexDE

 

looked at post #52, have that in my dsdt already (although a bit further down...)

 

added to mine the code you sent tuxguy, but now all i get are 90 errors complaining about invalid signs.

 

ill add my dsdt, perhaps you can have a look at it?

 

already included audio hdef and pwrbfix from dsdtse app, but still no wake and usb internal

:mellow:

 

 

im using an ep35-ds4, efi string for ethernet and gfx...

dsdt.txt

Link to comment
Share on other sites

you need to insert a _DTGP method just under the _WAK method.

 

whats about this I have found:

				Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x0f)
					{
						"device-id",
						Buffer (0x04)
						{
							0x34, 0x3A, 0x00, 0x00  //the values below
						},
						"AAPL,clock-id",   // property needed for sleep support
						Buffer (One)
						{
							0x0a   
						}, 

							"built-in",
							Buffer ()
							{
									0x00
							},

						  "device_type",   //not sure it is useful
						  Buffer (0x05)
						  {
							  "EHCI"
						  },


						"AAPL,current-available", 
						0x04B0, 
						"AAPL,current-extra", 
						0x02BC, 
						"AAPL,current-in-sleep",  // to solve a problem with sleep when stick is inserted
						0x03E8, 

						Buffer (0x01)
						{
							0x00
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

Link to comment
Share on other sites

 Share

×
×
  • Create New...