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: Cancel Sleep




On Jan 1, 2008, at 9:38 PM, Andrew James wrote:

Ok everyone calm down, yes this may not be something everyone will agree on, the people that use this KNOW the risks!

Now before everyone starts fighting if apple actually lets developers touch the system in a way, they do provide the messages to send to the PMRootDomain to disable clamshell sleep, but it is only intended for system drivers, so you are correct that apple doesnt want them used but they are provided freely to be used.

/*******************************************************************************
 *
 * Power commands issued to root domain
 *
 * These commands are issued from system drivers only:
 *      ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily
 *
 ******************************************************************************/
enum {
  kIOPMSleepNow                 = (1<<0),  // put machine to sleep now
  kIOPMAllowSleep               = (1<<1),  // allow idle sleep
  kIOPMPreventSleep             = (1<<2),  // do not allow idle sleep
  kIOPMPowerButton              = (1<<3),  // power button was pressed
  kIOPMClamshellClosed          = (1<<4),  // clamshell was closed
  kIOPMPowerEmergency           = (1<<5),  // battery dangerously low
  kIOPMDisableClamshell         = (1<<6),  // do not sleep on clamshell closure
  kIOPMEnableClamshell          = (1<<7),  // sleep on clamshell closure
  kIOPMProcessorSpeedChange     = (1<<8),  // change the processor speed
  kIOPMOverTemp                 = (1<<9),  // system dangerously hot
  kIOPMClamshellOpened          = (1<<10// clamshell was opened
};

It says the commands are issued by those drivers only. Have by chance tried issuing one yourself, such as kIOPHDisableClamshell. Maybe if you could issue that one you wouldn't need to get notifications.

--David Alger

But seriously can we get back to the point!!!!

How does one get a notification of the lid state changing (When the lid closes, nothing to do with sleep) that does not also mix up with the power state changing, you will notice i dont mention a single thing about forcing the system to stay awake or anything here, so please can we drop the debate and stop flooding the mailing list with the debate that will never end and just get to the point. which just as safe measure ill say once again... How does one get a notification of the lid state changing (When the lid closes, nothing to do with sleep) that does not also mix up with the power state changing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


********************
Ron Paul for President 2008

RESTORE THE REPUBLIC & RETAIN YOUR RIGHTS

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Cancel Sleep (From: Michael Smith <email@hidden>)
 >Re: Cancel Sleep (From: David Elliott <email@hidden>)
 >Re: Cancel Sleep (From: Michael Smith <email@hidden>)
 >Re: Cancel Sleep (From: Marc Epard <email@hidden>)
 >Re: Cancel Sleep (From: Michael Smith <email@hidden>)
 >Re: Cancel Sleep (From: Andrew James <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.