Skip to content

Windows Away-Mode not supported #2

@opdenkamp

Description

@opdenkamp

Moved from Pulse-Eight/libcec#243

Latest libcec still doesn't support Windows Away-Mode, which has been a part of Windows since XP MCE. This breaks CEC functionality and makes CEC adapter basically useless on Windows machines:

When Windows tries to wake up system in Away-Mode (to perform a schedules Windows Update or tv recording for example), libcec doesn't recognize away-mode call and overwrites it.

Instead of system remaining "silent", libcec sends out CEC command and wakes up connected tv and avr.


Problem applies to official libcec tray application as well as to 3rd party application like Kodi that rely on libcec library.

Unofficial CEC Tray application by CIR21 properly supports Windows Away-Mode, so implementation is possible.


OpenPHT needs to register to receive away-mode status:

RegisterPowerSettingNotification(m_hWnd, &GUID_SYSTEM_AWAYMODE, DEVICE_NOTIFY_WINDOW_HANDLE);

The powermanager then needs to check for the Away-Mode call like this:

case PBT_POWERSETTINGCHANGE:
{
POWERBROADCAST_SETTING* s = (POWERBROADCAST_SETTING*)nEventData;
if( s != NULL && IsEqualGUID( s->PowerSetting, GUID_SYSTEM_AWAYMODE ) )
// The computer is entering "away" mode.

Further technical documentation is available in the attached documents or over on MSDN:
Microsoft documentation

awaymode.pdf
AvailabilityRequests.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions