Jump to content

USB sleep then wake "Device Removal" problem


  • Please log in to reply
150 replies to this topic

#101
di524up

di524up

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
Finally got it to work ;)

#102
tuxianer

tuxianer

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 155 posts

Finally got it to work :)


does your pc wakes up by keyboard?

#103
MACinized

MACinized

    Addicted to InsanelyMac

  • Members
  • PipPipPipPipPipPipPip
  • 559 posts
  • Gender:Male
  • Location:OSx86 Community
confirmed. voodoohda was the one causing the distortion of sound after waking-up from sleep. fixed it already but still no mic-in though.

this dsdt-usb-patch really works and makes my computer wake-up really good after sleep. wake-up by keyboard/mouse works as well.

#104
keeza

keeza

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 189 posts
  • Gender:Male
  • Location:Sydney Australia
Can someone please help.

Want to implement the USB fix.

Before I tackle the patch I extracted my existing DSDT using DSDTSE and re-compiled it to check if there were any errors. I got the following errors:

The dsdt file was compiled straight after a 10.5.8 install on EP45 UD3P.

Can someone please assist me here?Posted Image

Attached Files



#105
tuxianer

tuxianer

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 155 posts
Hi,
I have got a working wake up by mouse. The problem is the following:

You have to change this
Name (_PRW, Package (0x02)
				{
					0x0D,
					One
				})

to this

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

But this works only with USB1 Devices. I can't wake up with my USB2 keyboard.

#106
di524up

di524up

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
For me, waking up with both keyboard and mouse works. Scheduled wake-up also works. Only problem is sleeping after n minutes does not work.

Any idea? Thanks!

#107
tuxianer

tuxianer

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 155 posts

For me, waking up with both keyboard and mouse works. Scheduled wake-up also works. Only problem is sleeping after n minutes does not work.

Any idea? Thanks!

Do you have an USB 1 or 2 keyboard?

#108
Swhay

Swhay

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 130 posts
  • Gender:Male
  • Location:United States
Not completely sure if this is working for me or not. It seems to work if I have a jump drive plugged in and also an external laptop hard drive I have. But when I try it with an external 3.5 1 TB drive, I still get the "Device removal" message when waking from sleep. Keyboard nor mouse will wake the system either. I am going to test my 1TB 3.5 drive with my Mackbook and see what happens.

#109
vlad1966

vlad1966

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 270 posts
  • Gender:Male
  • Location:Earth
  • Interests:Computers (especially Macs) OS X, sports cars (fast cars in general), blondes.
Need help getting Wake from sleep to work. I patched my DSDT with the info from this post to help get my high-speed USB ports to show up as "built-in". Before, when they were showing as "Expansion Slot", I could still put the Hack to sleep (just like now) but when I hit my USB keyboard or mouse, I would get red-tinged graphics corruption, so I'd have to hard reboot.

I originally thought this was a problem with my video card - Radeon HD 4890, running EVOenabler with Netkas's QE_CI_Exotic_SL.pkg. But, now I think it may be related to USB.

So after fixing my DSDT.aml with the info in this post, my high-speed USB ports to show up as "built-in" but when I wake from sleep, the red tinged corrupted graphics are gone, but the Hack is frozen except I can move the mouse in a jumpy sporadic way and this also requires a hard reboot.

Running Snow Leo in 64-bit - Please HELP!!!! So close!!!

#110
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male
Hi,
Someone has a working DSDT for EP35-DS3L ? Can you attach the file?
Sleep doesn't work for me. Also, I have 'Built in' only for High Speed USB.. Is this normal ? http://dl.getdropbox...024/sysprof.jpg Is possible to set 'Built in' for all USB Port? Thank you!

#111
jlangli

jlangli

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Well, thanks to all the great tips here I've managed to get my machine sleeping and have fixed the "Device Removal" errors on wake. All my USB ports are now recognized as built in.

However I cannot get wake by keyboard / mouse working. My board is a GA-EP35-DS4. This is really the only remaining issue I have left to fix, and a number of people here seem to have this working on similar boards. Any suggestions? I've attached my dsdt file for the curious.

Here are the kexts I'm still using as well:
ALC889a.kext
fakesmc.kext
IO80211Family.kext (for Linksys WMP300N wireless card)
IOAHCIBlockStorageInjector.kext
OpenHaltRestart.kext
PlatformUUID.kext
SleepEnabler.kext

Attached Files

  • Attached File  dsdt.txt   189.63KB   40 downloads


#112
Nihilator

Nihilator

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts

confirmed. voodoohda was the one causing the distortion of sound after waking-up from sleep. fixed it already but still no mic-in though.

this dsdt-usb-patch really works and makes my computer wake-up really good after sleep. wake-up by keyboard/mouse works as well.



How did you fix the voodooHDA wake from sleep distortion?

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)
						}

			}



Does this method only work for a specific motherboard manufacturer. I exported my dsdt.aml and I don't see entries even close to these. In fact I only have a USB section but no EHCI entries. I have a Dell.

#113
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male
Works for me! Special thanks for nathan7
Syba Sound Adapter wakes up from sleep without problem. Sound card issue solved :( Yes!!!

#114
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male

@ 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!

@ApexDE Wake with keyboard doesn't work for me. Is this a know issue on EP35? Wake with mouse works!

#115
MACinized

MACinized

    Addicted to InsanelyMac

  • Members
  • PipPipPipPipPipPipPip
  • 559 posts
  • Gender:Male
  • Location:OSx86 Community
darn! can't find my working DSDT.aml.

tried to do re-patching but "Host Controller Location" for "USB High-Speed Bus" is still "Expansion Slot".

here's what's in 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
			})
				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 (ICHX)

and here's what i get when patching/compiling:

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

./dsdt_fixed.txt   316:			 Store (Local0, Local0)
Error	4050 -								 ^ Method local variable is not initialized (Local0)

./dsdt_fixed.txt   321:			 Store (Local0, Local0)
Error	4050 -								 ^ Method local variable is not initialized (Local0)

ASL Input:  ./dsdt_fixed.txt - 4594 lines, 149890 bytes, 1652 keywords
AML Output: ./dsdt.aml - 13829 bytes, 537 named objects, 1115 executable opcodes

Compilation complete. 2 Errors, 1 Warnings, 0 Remarks, 34 Optimizations

need help here again ApexDE. have no idea why it won't work this time. :(

#116
MACinized

MACinized

    Addicted to InsanelyMac

  • Members
  • PipPipPipPipPipPipPip
  • 559 posts
  • Gender:Male
  • Location:OSx86 Community
got it now again. dsdt-patch should read:
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)
				}
			}

			Name (NATA, Package (0x01)
			{
				0x001F0001
			})
my bad. :thanks_speechbubble:

#117
jlangli

jlangli

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
I just want to confirm that the wake from sleep by keyboard / mouse seems to be a USB 1.0 vs. USB 2.0 issue. I've managed to scrounge up an old USB 1.0 mouse, and my system will wake from sleep fine with that mouse (assuming it is plugged straight into the board and not through any hubs). But my wireless 2.0 mouse will not wake the system, and neither will my 2.0 keyboard.

Anxiously awaiting some suggestions or workarounds for this!

#118
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,280 posts
  • Gender:Male
My system, a dell xps 1340 (nvidia mcp79 chipset) shows d3 power management info for the ehci controller, but still needs the AAPL,clock-id addition to prevent the USB device removal problem. Now, the 1340 has the same chipset as the unibody macbooks, which don't share this ioregistry entry. Both the macbooks and the 1340 show the built-in keyword for the EHC1,EHC2 ioregistry subtrees, so I guess there's a lower level USB power problem on the 1340? Ideas?
00:04.1 USB Controller [0c03]: nVidia Corporation MCP79 EHCI USB 2.0 Controller [10de:0aa6] (rev b1) (prog-if 20 [EHCI])
	 Subsystem: Dell Device [1028:0271]
	 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	 Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	 Latency: 0 (750ns min, 250ns max)
	 Interrupt: pin B routed to IRQ 23
	 Region 0: Memory at f0889000 (32-bit, non-prefetchable) [size=256]
	 Capabilities: [44] Debug port: BAR=1 offset=00a0
	 Capabilities: [80] Power Management version 2
		 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
		 Status: D0 PME-Enable- DSel=0 DScale=0 PME+
	 Kernel driver in use: ehci_hcd


#119
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male

I just want to confirm that the wake from sleep by keyboard / mouse seems to be a USB 1.0 vs. USB 2.0 issue. I've managed to scrounge up an old USB 1.0 mouse, and my system will wake from sleep fine with that mouse (assuming it is plugged straight into the board and not through any hubs). But my wireless 2.0 mouse will not wake the system, and neither will my 2.0 keyboard.

Anxiously awaiting some suggestions or workarounds for this!

My system wakes up from sleep with mouse but keyboard method doesn't work. I have an Apple Aluminium keyboard. EP35-DS3L.

#120
zoltankr

zoltankr

    zoliky

  • Members
  • PipPipPipPipPipPip
  • 427 posts
  • Gender:Male
The computer doesn't wake up using the 'Apple Aluminium' keyboard but wakes up using a 'no-name' USB keyboard.
I think the problem is DSDT related, because the no-name keyboard doesn't use the High-Speed Bus and works fine.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy