Contribute
Register

RehabMan's ProBook Ivy Bridge 4540s

Status
Not open for further replies.
i since revised mu post. Please, take a look. I am not complaining that USB3 ports did not wake with clock-id injected to DSDT. It was expected. But mouse click vs. move is still intriguing to me.
 
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...

If I have usb inject and add clock id, I can sleep with my mouse on usb 3.0, iphone and wifi on usb 2.0 ports. I will find the injected values in IORegistry Explorer.
 
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.

I'll play with clock-id on XHC1 just to see if it matters. So far my tests say no. And let me know if you can tell me what Clover injects for the clock-id value in each EHC1, EHC2, XHC1. Use IORegistryExplorer to see.

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.

I've never had to touch it, not on my Probook 4x30s and so far not on the 4x40s. Not on my desktop either...
 
...
I am not complaining that USB3 ports did not wake with clock-id injected to DSDT. It was expected.

I can confirm the same behavior here. Injecting clock-id to XHC1 makes wake on USB3 not work (but sleep still works, just as without the inject).

Please note the patches I posted do not inject clock-id into XHC1.

But mouse click vs. move is still intriguing to me.

I believe that is up to the device. For example, my Microsoft "Arc" mouse will only wake if you move it a certain distance.
 
I searched the net and this is values I have found. It seem the value means something:
"AAPL,clock-id", // property needed for sleep support
Buffer (One)
{
0x0a
},

---

// We need to determine which OHCI controllers don't survive sleep. These fall into 2 categories:
//
// 1. CardBus cards
// 2. PCI Cards that lose power (right now because of a bug in the PCI Family, USB PCI cards do not prevent
// sleep, so even cards that don't support the PCI Power Mgmt stuff get their power removed.
//
// Additionally, the PowerBook 101 controller cannot survive across sleep (I doesn't support remote wakeup).
//
// So here, we look at all those cases and set the _unloadUIMAcrossSleep boolean to true. As it turns out,
// if a controller does not have the "AAPL,clock-id" property, then it means that it cannot survive sleep. We
// might need to refine this later once we figure how to deal with PCI cards that can go into PCI sleep mode.
// An exception is the B&W G3, that does not have this property but can sleep. Sigh...

// Now, look at PCI cards. Note that the onboard controller's provider is an IOPCIDevice so we cannot use that
// to distinguish between USB PCI cards and the on board controller. Instead, we use the existence of the
// "AAPL,clock-id" property in the provider. If it does not exist, then we are a OHCI controller on a USB PCI card.
//
if ( !_device->getProperty("AAPL,clock-id") && !((getPlatform()->getChipSetType() == kChipSetTypeGossamer) && getPlatform()->getMachineType() == kGossamerTypeYosemite) )

--------
// Exception for KeyLargo based systems, which have two power parents and get the kIOPMClockNormal from one of them (USBKeyLargo)
if ( _device->getProperty("AAPL,clock-id"))
{
// if I am on a KeyLargo system, I need to add the Key Largo clocks to two of my input requirements
_myPowerStates[kUSBPowerStateLowPower].inputPowerRequirement |= kIOPMClockNormal;
_myPowerStates[kUSBPowerStateOn].inputPowerRequirement |= kIOPMClockNormal;
}
-----------

"AAPL,clock-id",
Buffer (One)
{
One
},

-------------Asmedia USB 3.0 Chip(1042) Fully Working Fix 1.0
"AAPL,clock-id",
Buffer (One)
{
0x02
},
 
I used value 0x2 and 0xa no difference

Clover doc:
USB / AddClockID

<key>AddClockID</key>
<true/>
<true/> - Enables a good, deep sleep, which cannot be exited by keyboard or mouse input.
<false/> - The PC will possibly sleep and it can be woken up by keyboard or mouse; or it will be automatically woken up by some attached device
Injects the property "AAPL,clock-id" with a unique identifier for each device. Set it to your liking.

Requires USBInjection to be enabled.

Default value is set to disabled.
 
I used to have them on 10.8 too, but in 10.9 they are gone.
You can try the kext i am using and see if they are still there.

This is not for 4x40s, is it?
 
I used value 0x2 and 0xa no difference

Clover doc:
USB / AddClockID

<key>AddClockID</key>
<true/>
<true/> - Enables a good, deep sleep, which cannot be exited by keyboard or mouse input.
<false/> - The PC will possibly sleep and it can be woken up by keyboard or mouse; or it will be automatically woken up by some attached device
Injects the property "AAPL,clock-id" with a unique identifier for each device. Set it to your liking.

Requires USBInjection to be enabled.

Default value is set to disabled.

If someone is running Clover and can tell me what value Clover injects for these items, I would appreciate it.
 
This is not for 4x40s, is it?
It uses the xmls from 4x40s with different codec id, but yeah, sorry for spamming with the off-topic.

BTW: a codec dump for 4540s would be greatly appreciated, I think it would be fairly simple to make a single kext for 0x111D76D9 and 0x111d7605...
You can share the latest functioning AppleHDA for starters, because the verbs in the installer make no sense to me, do you use only "00C71E81 00C71F03 01171EA0 01171F90"?
 
If someone is running Clover and can tell me what value Clover injects for these items, I would appreciate it.

I just check IORegistryExplorer, here is the value of "AAPL,clock-id":

XHC1: 00
EHC1: 02
EHC2: 01

I attached a mouse in USB 3.0 ports and it won't wake the system, I have to press power button. Wake on USB is enabled in BIOS.
 
Status
Not open for further replies.
Back
Top