mnfesq Posted April 27, 2011 Share Posted April 27, 2011 I'm running 10.6.7 on a Dell Inspiron 1720 with an internal webcam that OSX sees as an internal iSight. I have all sleep modes working (hibernatemodes 0, 1 and 3). When I put the laptop to sleep in hibernatemode 1 (deep sleep) I have no problem with my webcam when it wakes up. However, if I put the laptop to sleep in hibernatemodes 0 or 3, when it wakes up, the webcam does not function properly. It gets power (because the blue LED light is on) but does not capture video. In order for the webcam to function fully, it needs full USB 2.0. When I have tried to run the webcam in USB 1.1, the blue LED light goes on but it does not capture video. Therefore, I'm thinking that when the laptop wakes up, I am not getting USB 2.0 but only USB 1.1. Here's the code I have for my EHCI and EHC2: Device (EHCI) { Name (_ADR, 0x001D0007) Name (_S1D, 0x02) Name (_S3D, 0x02) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x07), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0D, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0D, One }) } Return (Package (0x02) { 0x0D, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x07) } Method (_DSM, 4, NotSerialized) { Store (Package (0x0F) { "device-id", Buffer (0x04) { 0x36, 0x28, 0x00, 0x00 }, "built-in", Buffer (One) { 0x00 }, "AAPL,clock-id", Buffer (One) { 0x01 }, "device_type", Buffer (0x05) { "EHCI" }, "AAPL,current-available", 0x05DC, "AAPL,current-extra", 0x03E8, "AAPL,current-in-sleep", 0x0BB8, Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Device (HUB7) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } Device (CH10) { Name (_ADR, 0x03) } Device (CH11) { Name (_ADR, 0x04) } Device (CH20) { Name (_ADR, 0x05) } Device (CH21) { Name (_ADR, 0x06) } } Device (EHC2) { Name (_ADR, 0x001A0007) Name (_S1D, 0x02) Name (_S3D, 0x02) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x07), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0D, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0D, One }) } Return (Package (0x02) { 0x0D, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x07) } Method (_DSM, 4, NotSerialized) { Store (Package (0x0F) { "device-id", Buffer (0x04) { 0x3A, 0x28, 0x00, 0x00 }, "built-in", Buffer (One) { 0x00 }, "AAPL,clock-id", Buffer (One) { 0x01 }, "device_type", Buffer (0x05) { "EHCI" }, "AAPL,current-available", 0x05DC, "AAPL,current-extra", 0x03E8, "AAPL,current-in-sleep", 0x0BB8, Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Device (HUB7) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } Device (CH10) { Name (_ADR, 0x03) } Device (CH11) { Name (_ADR, 0x04) } } } If it helps, I have device IDs for all of my USB ports in my DSDT. Is it possible that I am focusing on the wrong thing and that the problem is not with EHCI and is, instead, something that can be changed in the _WAK method definitions? Any ideas on what this needs to get full high-speed USB to my webcam after waking from sleep would be appreciated. Link to comment Share on other sites More sharing options...
LatinMcG Posted May 22, 2011 Share Posted May 22, 2011 If it helps, I have device IDs for all of my USB ports in my DSDT. Is it possible that I am focusing on the wrong thing and that the problem is not with EHCI and is, instead, something that can be changed in the _WAK method definitions? Any ideas on what this needs to get full high-speed USB to my webcam after waking from sleep would be appreciated. look into vostro 1500 or inspiron 1520 .. all have similar usb code. might not be EHCI but USB1-2-3-4-5 causing issue. find in ioregexplorer where cam is connected to. i have 1520 and cam. so ill test to see what u mean. . my sleep is fine. and wake also works. checking cam. btw u dont need device id in the 1720.. its compatible usb ids allready. EDIT: works fine in my dsdt. adding USB code Method (UCMD, 3, NotSerialized) { SX10 () SX30 (0x0F) SX30 (Arg0) SX30 (Arg1) SX30 (Arg2) SX11 () Store (SX40 (), Local0) SX12 () Return (Local0) } Method (UPSW, 2, NotSerialized) { Return (UCMD (0x02, Arg0, Arg1)) } Method (UPRW, 2, NotSerialized) { Return (UCMD (One, Arg0, Arg1)) } Device (UHC1) { Name (_ADR, 0x001D0000) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, Zero), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x03, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x03, One }) } Return (Package (0x02) { 0x03, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, Zero) } Device (HUB0) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } } } Device (UHC2) { Name (_ADR, 0x001D0001) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, One), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x04, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x04, One }) } Return (Package (0x02) { 0x04, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, One) } Device (HUB1) { Name (_ADR, Zero) Device (CH10) { Name (_ADR, One) } Device (CH11) { Name (_ADR, 0x02) } } } Device (UHC3) { Name (_ADR, 0x001D0002) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x02), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0C, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0C, One }) } Return (Package (0x02) { 0x0C, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x02) } Device (HUB2) { Name (_ADR, Zero) Device (CH20) { Name (_ADR, One) } Device (CH21) { Name (_ADR, 0x02) } } } Device (UHC4) { Name (_ADR, 0x001A0000) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x03), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0E, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0E, One }) } Return (Package (0x02) { 0x0E, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x03) } Device (HUB3) { Name (_ADR, Zero) Device (CH30) { Name (_ADR, One) } Device (CH31) { Name (_ADR, 0x02) } } } Device (UHC5) { Name (_ADR, 0x001A0001) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x04), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x05, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x05, One }) } Return (Package (0x02) { 0x05, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x04) } Device (HUB6) { Name (_ADR, Zero) Device (CH60) { Name (_ADR, One) } Device (CH61) { Name (_ADR, 0x02) } } } Device (EHC2) { Name (_ADR, 0x001A0007) Name (_S1D, 0x02) Name (_S3D, 0x02) Method (_DSM, 4, NotSerialized) { Store (Package (0x0B) { "AAPL,clock-id", Buffer (One) { 0x02 }, "device_type", Buffer (0x05) { "EHCI" }, "AAPL,current-available", 0x04B0, "AAPL,current-extra", 0x02BC, "AAPL,current-in-sleep", 0x03E8, Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x07), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0D, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0D, One }) } Return (Package (0x02) { 0x0D, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x07) } Device (HUB7) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } Device (CH10) { Name (_ADR, 0x03) } Device (CH11) { Name (_ADR, 0x04) } } } Device (EHCI) { Name (_ADR, 0x001D0007) Name (_S1D, 0x02) Name (_S3D, 0x02) Method (_DSM, 4, NotSerialized) { Store (Package (0x0B) { "AAPL,clock-id", Buffer (One) { 0x01 }, "device_type", Buffer (0x05) { "EHCI" }, "AAPL,current-available", 0x04B0, "AAPL,current-extra", 0x02BC, "AAPL,current-in-sleep", 0x03E8, Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, 0x07), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x0D, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x0D, One }) } Return (Package (0x02) { 0x0D, Zero }) } Method (_PSW, 1, NotSerialized) { UPSW (Arg0, 0x07) } Device (HUB7) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } Device (CH10) { Name (_ADR, 0x03) } Device (CH11) { Name (_ADR, 0x04) } Device (CH20) { Name (_ADR, 0x05) } Device (CH21) { Name (_ADR, 0x06) } } } ps u have to replace USB1 with UHC1 and so (maclike) BAH i just checked im on pmset hibernatemode 0 .. testing others. results.. mode 3 worked fine. i bet 1 works too..0 works originaly. kernel log: May 23 09:36:00 MacBookPro31 kernel[0]: System Sleep May 23 09:37:21 MacBookPro31 kernel[0]: Wake reason = PBTN LID May 23 09:37:21 MacBookPro31 kernel[0]: System Wake May 23 09:37:21 MacBookPro31 kernel[0]: USB (EHCI):Port 2 on bus 0xfa connected or disconnected: portSC(0x101803) May 23 09:37:21 MacBookPro31 kernel[0]: USB (EHCI):Port 6 on bus 0xfd connected or disconnected: portSC(0x301002) May 23 09:37:21 MacBookPro31 kernel[0]: The USB device Laptop Integrated Webcam (Port 6 of Hub at 0xfd000000) may have caused a wake by being disconnected May 23 09:37:21 MacBookPro31 kernel[0]: The USB device BCM2045B2 (Port 2 of Hub at 0x1a000000) may have caused a wake by being disconnected May 23 09:37:21 MacBookPro31 kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving). May 23 09:37:22 MacBookPro31 kernel[0]: AirPort: Link Up on en1 May 23 09:37:22 MacBookPro31 kernel[0]: AirPort: RSN handshake complete on en1 yes it looks like something is wrong. but nothing is wrong here after sleep test photobooth works fine. Link to comment Share on other sites More sharing options...
LatinMcG Posted May 23, 2011 Share Posted May 23, 2011 seems to all work fine with my dsdt in similar laptop. maybe the webcam device is slightly different? or u got other stuff in dsdt.. let me see your dsdt and compare to mine. Link to comment Share on other sites More sharing options...
Recommended Posts