Contribute
Register

RehabMan's ProBook Ivy Bridge 4540s

Status
Not open for further replies.
Nothing else works, only flashing EPROM. After what you did on this forum - it is the simplest thing ever for your level. Kind of 1/10 of the clover install.

Thank you:)
 
BTW, I'm finding that I can enable "Wake on Lan" and "Wake on USB" by adding "AAPL,clock-id" to the 7-series EHC DSDT patches.

Code:
#   Insert Apple USB properties into EHC1
into method label _DSM parent_adr 0x001D0000 remove_entry;
into device name_adr 0x001D0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,clock-id", Buffer() { 0x01 },\n
        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
        "AAPL,current-available", 2100,\n
        "AAPL,current-extra", 2200,\n
        "AAPL,current-extra-in-sleep", 1600,\n
        "AAPL,device-internal", 0x02,\n
        "AAPL,max-port-current-in-sleep", 2100,\n
    })\n
}\n
end;

# Insert Apple USB properties into EHC2
into method label _DSM parent_adr 0x001A0000 remove_entry;
into device name_adr 0x001A0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,clock-id", Buffer() { 0x01 },\n
        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
        "AAPL,current-available", 2100,\n
        "AAPL,current-extra", 2200,\n
        "AAPL,current-extra-in-sleep", 1600,\n
        "AAPL,device-internal", 0x02,\n
        "AAPL,max-port-current-in-sleep", 2100,\n
    })\n
}\n
end;

It seems to be unnecessary in the XHC properties.

I have a mouse connected to USB3 and with it I can wake the laptop (movement or click). I will test some other ports/devices and maybe try "Wake on Lan"

Point is: Adding APPL,clock-id allows us to set "Wake on Lan" and "Wake on USB" in BIOS settings and does not result in immediate (bogus) wake up after sleep.

Anyone else want to try/confirm?
 
I will give it a shot...

I did work, but only after I have enabled both LAN and USB Wake in BIOS. Usually, you need to click mouse to wake machine. Otherwise it becomes too sensitive to accidental movements. Anyway. It is good to know. Thanks!

I also notice, "darkwakelinger" was asserting sleepping after wake, but then it let go:
Code:
mset -g assertions
10/30/13, 7:50:40 PM EDT 
Assertion status system-wide:
   BackgroundTask                 0
   PreventDiskIdle                0
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    0
   InteractivePushServiceTask     0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
   InternalPreventSleep           1
Listed by owning process:
   pid 16(powerd): [0x0000000e000001b6] 00:00:10 InternalPreventSleep named: "com.apple.powermanagement.darkwakelinger" 
	Assertion applied on Battery power also
	Timeout will fire in 4 secs Action=TimeoutActionRelease
Kernel Assertions: 0x4=USB
   id=500  level=255 0x4=USB mod=10/30/13, 7:57 PM description=XHC1 owner=AppleUSBXHCI

Even more interesting - I have enabled darkwake=8 and now darkwakelinger is gone from assertions after wake. Figures...
 
BTW, I'm finding that I can enable "Wake on Lan" and "Wake on USB" by adding "AAPL,clock-id" to the 7-series EHC DSDT patches.

Code:
#   Insert Apple USB properties into EHC1
into method label _DSM parent_adr 0x001D0000 remove_entry;
into device name_adr 0x001D0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,clock-id", Buffer() { 0x01 },\n
        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
        "AAPL,current-available", 2100,\n
        "AAPL,current-extra", 2200,\n
        "AAPL,current-extra-in-sleep", 1600,\n
        "AAPL,device-internal", 0x02,\n
        "AAPL,max-port-current-in-sleep", 2100,\n
    })\n
}\n
end;

# Insert Apple USB properties into EHC2
into method label _DSM parent_adr 0x001A0000 remove_entry;
into device name_adr 0x001A0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,clock-id", Buffer() { 0x01 },\n
        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
        "AAPL,current-available", 2100,\n
        "AAPL,current-extra", 2200,\n
        "AAPL,current-extra-in-sleep", 1600,\n
        "AAPL,device-internal", 0x02,\n
        "AAPL,max-port-current-in-sleep", 2100,\n
    })\n
}\n
end;

It seems to be unnecessary in the XHC properties.

I have a mouse connected to USB3 and with it I can wake the laptop (movement or click). I will test some other ports/devices and maybe try "Wake on Lan"

Point is: Adding APPL,clock-id allows us to set "Wake on Lan" and "Wake on USB" in BIOS settings and does not result in immediate (bogus) wake up after sleep.

Anyone else want to try/confirm?

It's equal to USB AddClockID injection in Clover. I need it to ensure deep sleep when I have usb devices in my USB 2.0 ports, otherwise it will be woke up by EHC1 and EHC2 devices.
 
It's equal to USB AddClockID injection in Clover. I need it to ensure deep sleep when I have usb devices in my USB 2.0 ports, otherwise it will be woke up by EHC1 and EHC2 devices.

I tried it - it does not work on 4x40s series - it wakes up immediately into "black screen" after attempt to sleep. This is almost like darkwake issues experienced on other builds. Anyway, partial Clock id is working, may be too sensitive though. This option in Clover will also force/need USB injection in order to work.
 
I will give it a shot...

I did work, but only after I have enabled both LAN and USB Wake in BIOS.

On my machine it is independent of WOL.

Usually, you need to click mouse to wake machine.

It is probably different for different (mouse) devices.

Otherwise it becomes too sensitive to accidental movements. Anyway. It is good to know.

I prefer to have WOUSB disabled, but wanted to figure out what we could do to allow those that want it...

Even more interesting - I have enabled darkwake=8 and now darkwakelinger is gone from assertions after wake. Figures...

I have to admit I don't have the slightest idea what all the bits in darkwake do. I'm guessing that darkwake is the ability for the system to wake into "away mode" (screen off), which is often used when the wake is for "server related" tasks or for "scheduled maintenance." I'm not sure what the Apple folks call that mode (maybe 'darkwake' I guess), but the industry refers to it as "away mode" (computer is on, but display is sleeping).

I noticed that when I did not have the clock-id inject (as it always has been for 7-series ProBook DSDT), that the system would wake just after (2-3 sec) sleep in "away mode"...
 
I tried it - it does not work on 4x40s series - it wakes up immediately into "black screen" after attempt to sleep. This is almost like darkwake issues experienced on other builds. Anyway, partial Clock id is working, may be too sensitive though. This option in Clover will also force/need USB injection in order to work.

Does not work on your computer with Clover inject or the edits I provide above?

What value does Clover inject for AAPL,clock-id?

What do you mean by "force/need USB injection"?
 
I am using Clover at the moment, but I disabled any injections in it, just plain DSDT and SSDT from PBI.

it is in Clover documentation in order to inject clock-id you have to enable USB Inject. Please, try it. I am not good at DSDT area. May be I did something wrong. It also seems clock-id should be unique per port something.

BTW, I enabled clock-id on XHC and now laptop would not wake even with USB wake enabled in BIOS. As Expected per Clover documentation wiki. Power button works as expected.

We definitely have to look at darkwake, I am wondering how we avoided dealing with this on ProBooks for so long.

One of my desktops needs darkwake=0 on Lion, darkwake=8 on Mavericks, another needs nothing in Mavericks, but needed darkwake=0 on ML. Auto-sleep never worked on ML on both (both were on BIOS), but works beautifully on Mavericks on both desktops EFI and BIOS based with Sandy Bridge i5 and i7.

ProBook 4x40s - with darkwake=8 (kinda default on macbooks) no "black" screen wakes (depends on BIOS options), no darkwake "lingering" after wake. So it seems not hurting anything, only making it better.
 
it is Clover documentation in order to inject clock-id you have to enable USB Inject. Please, try it. I am not good at DSDT area. May be I didi something wrong. It also seems that clock-id should be unique per port something.

BTW, I enables clock-id on EHX and now laptop would not wake even with wake on USB enabled in BIOS.

I'm not using Clover. But USB inject on clover probably just injects the EHC/XHC properties we are already injecting via DSDT.

It only works on USB3 ports (3 of 4). I tested all 3 USB3 ports and they all cause a wake when enabled. I connected my mouse to the 1 USB2 port and it will not cause a wake.

The main idea here was to fix the problem of instant wake on sleep.

The value of 1 for the clock-id is based on the original 6-series patches for 4x30s. I'm not sure what the ID means or if it has to be unique. Haven't looked at usb family source code yet. I'll play around with different values of the clock-id though...
 
Status
Not open for further replies.
Back
Top