Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Driver disabling SLEEP functionality



Hi Jim I understand what is happening to your machine due to
Digidesign's kext.

Since their kext does not support PM there is really nothing you can do.

Look at this DDK for PM help.

http://developer.apple.com/sdk/#PowerManager

Here is a code snippet to show you what a kext must do in its start
routine to be a well behaved PM kext.

// initialize superclass variables from IOService.h
PMinit();
// register as controlling driver from IOService.h
myValue = registerPowerDriver( this, (IOPMPowerState *)
ourPowerStates,
kNumDTSStates );
if (myValue != kIOReturnSuccess) {
IOLog("%s: Failed to registerPowerDriver.\n", getName());
}
// join the tree from IOService.h
provider->joinPMtree( this);
return res;
}

IOReturn com_DTS_iokit_GenericPCI::setPowerState(unsigned long
whatState, IOService* dontCare){
IOLog("GenericPCI setting power state:%u\n", whatState);
//return kIOReturnSuccess;
return IOPMAckImplied;
}

You can read about PM in Chapter 10 of I/O Kit Fundamentals. Here is
that URL.

http://developer.apple.com/techpubs/macosx/Darwin/General/
IOKitFundamentals/index.html

What Mac OS X is doing when you try to sleep is leaving power on the
PCI bus since Digidesign's kext can't go to sleep. Let say you know
everything about Mac OS X kernel code, EVERYTHING. You would still most
likely cause a kernel panic coming out of sleep, given you caused sleep
in the first place. Why? Because this one kext would lose its state
(finite state machine) when power is removed. When power is reinstated
the state of the Degisdesign would be lost and an attempt to read or
write registers would be fatal.

Just the message guy. Wayne

On Wednesday, February 19, 2003, at 08:07 PM, Jim Vanaria wrote:

> Hello all,
>
> I'm quite new to this list so bear with me. I have a question that
> I'm hoping some knowledgable soul could help me with. I recently
> installed some software (Pro Tools LE 6.0) which installed a driver in
> the form of a kext. Since this driver has been installed, my system
> refuses to go into 'Deep Sleep'. Meaning: when I select 'sleep' from
> the Apple menu, the screen blanks, the HD spins down, but the fans
> remain on. I've contacted the company that makes this software
> (Digidesign) and they refuse to acknowledge it as a problem and
> suggest that I simply forego usage of 'sleep' in favor of
> shutdown/restart. All politics aside, I thought that I might be able
> to cook up a utility that would forcibly enable deep sleep once again
> for my Mac. I'm using 10.2.3 (can't upgrade to 10.2.4 until
> Digidesign "clears" it for use with their product).
>
> So my question is this, I'm a C programmer and have been doing
> coreMIDI development for about a year now so I'm *somewhat* famaliar
> with OS X's way. Where should I start looking to develop a utility
> that will enable me SLEEP again? *OR* Where might I look to see where
> THEIR driver disabled the sleep functionality?
>
> BTW, if I am in the wrong list, do tell and thanks in advance for all
> replies...
>
> -Jim
> _______________________________________________
> darwin-drivers mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/darwin-drivers
> Do not post admin requests to the list. They will be ignored.
>
************************************
Wayne Flansburg, Worldwide Technical Support
Visit our PCI web page at:
http://developer.apple.com/hardware/pci/
************************************
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

References: 
 >Driver disabling SLEEP functionality (From: Jim Vanaria <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.