lid open and close notification

  • Hi All,

    In my app needs lid open and close notification.I used ioreg shell call
    for that (ioreg -n IOPMrootDomain | grep AppleClamshellState | sed 's/^.*=//'
    ).But when lid close and open it return "No". Always the clamshellstate is
    true.Insomania.kext was loaded before close the lid.

    Any other way to get this info?.

    Kindly help me.

    Thanks In Advance,
    Sheen
  • On 4 Dec 2008, at 18:29:26, sheen mac wrote:

    > Hi All,
    >
    > In my app needs lid open and close notification.I used ioreg shell
    > call
    > for that (ioreg -n IOPMrootDomain | grep AppleClamshellState | sed
    > 's/^.*=//'
    > ).But when lid close and open it return "No". Always the
    > clamshellstate is
    > true.Insomania.kext was loaded before close the lid.
    >
    > Any other way to get this info?.
    >
    > Kindly help me.
    >
    > Thanks In Advance,
    > Sheen

    I'm not familiar with this, but... how would you know the lid is
    closed? Wouldn't the computer be asleep?
  • On Dec 4, 2008, at 1:11 PM, Benjamin Dobson wrote:

    > I'm not familiar with this, but... how would you know the lid is
    > closed? Wouldn't the computer be asleep?

    There are several situations in Mac OS X where the clamshell can be
    closed and the computer will remain wide awake, or the computer will
    remain asleep when the clamshell is opened. For example, if you have
    an external monitor plugged in and the built-in display turned off,
    then opening and closing the clamshell does not put the computer to
    sleep.

    Nick Zitzmann
    <http://www.chronosnet.com/>
previous month december 2008 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today