-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDKDEV-1028:Ensure getDevicePowerState returns the correct power state for Deep sleep #5437
base: sprint/24Q2
Are you sure you want to change the base?
RDKDEV-1028:Ensure getDevicePowerState returns the correct power state for Deep sleep #5437
Conversation
Reason for change: getPowerState returned STANDBY state when the LIGHT_SLEEP, DEEP_SLEEP has been set on PWRMGR level. This was breaking preferredStandbyMode reporting.
else if ((param.curState == IARM_BUS_PWRMGR_POWERSTATE_STANDBY)) { | ||
currentState = "STANDBY"; | ||
} | ||
else if ((param.curState == IARM_BUS_PWRMGR_POWERSTATE_STANDBY_LIGHT_SLEEP)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For STANDBY and LIGHT_SLEEP during set call u setting IARM_BUS_PWRMGR_POWERSTATE_STANDBY so during the get call it will return only STANDBY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove LIGHT_SLEEP from the get call. Therefore, only STANDBY will be returned during the get call for both IARM_BUS_PWRMGR_POWERSTATE_STANDBY and IARM_BUS_PWRMGR_POWERSTATE_STANDBY_LIGHT_SLEEP.
@@ -263,6 +263,8 @@ void stringToIarmMode(std::string mode, IARM_Bus_Daemon_SysMode_t& iarmMode) | |||
|
|||
bool setPowerState(std::string powerState) | |||
{ | |||
LOGWARN("setPowerState to %s\n", powerState.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why IARM_BUS_PWRMGR_POWERSTATE_STANDBY is set for both STANDBY and LIGHT_SLEEP where as for get call you expect both the state return seprately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is raised as part of patch upstream activity. So, we are not supposed to change any code. Your comment will be addressed in this ticket (https://jira.rdkcentral.com/jira/browse/BCM-1096 ). We also observed the behaviour of standby and lightsleep is different in curl commands and direct setpowerstate commands. We will address all in the same ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so bring all the changes together to comcast repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi.. @apatel859 Please check this ticket https://jira.rdkcentral.com/jira/browse/SGMM393-181. Please check the comments from the ticket
Update 2023-10-18: Here are the expectations of the power state bahaviours, based on the discussion with Comcast/Component owner team:
1. Standby should be treated exactly the same as LIGHT_SLEEP
2. In the LIGHT_SLEEP/STANDBY, box is not put into 'real' standby. Instead it should run normally with disabled:
disabled AV pipelines
disabled HDMI output. Other outputs should not be disabled
Logs should be saved to RAM and updated every 30 minutes and saved into the flash
disabled Front panel
JSON-RPC call to the Thunder should be possible
For the BCM platform it should be the S0 state.
3. DEEP_SLEEP should invoke real deep_sleep mode. I believe we should aim for the S3 or S2 state.
4. DEEP_SLEEP should have possibility to wake the box using WOL packets.
5. Using WOL for the STANDBY/LIGHTSLEEP is not clarified yet
6. Waking up the box from DEEP_SLEEP should put the box into the LIGHT_SLEEP/STANDBY. Then it's up to the 'application' to take further steps I.e wake the box up to the ON state. App action should be queried using getWakeupReason and getLastWakeupKeyCode to determine that.
7. It is unclear yet what power state should be returned in case of STANDBY/LIGHT_SLEEP. It's unknown if should return STANDBY or LIGHT_SLEEP when there is no preferredStandbyMode set and what is the expectation when preferredStandbyMode is set to LIGHT_SLEEP
Pin
Collapse comment: [Jian Wang](https://jira.rdkcentral.com/jira/secure/ViewProfile.jspa?name=jwang02) added a comment - [19/Oct/23 4:42 PM](https://jira.rdkcentral.com/jira/browse/SGMM393-181?focusedId=377453&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-377453)
Jian Wang added a comment - 19/Oct/23 4:42 PM
STANDBY mapping to Broadcom S0 with AV port disabled.
https://code.rdkcentral.com/r/plugins/gitiles/collaboration/soc/broadcom/yocto_oe/layers/meta-rdk-broadcom-next/+/6760454b98588868bf68d0b32dd2e239edd4f151
Pin
Collapse comment: Artur Gebicz added a comment - 20/Oct/23 1:53 PM
[Artur Gebicz](https://jira.rdkcentral.com/jira/secure/ViewProfile.jspa?name=a.gebicz) added a comment - [20/Oct/23 1:53 PM](https://jira.rdkcentral.com/jira/browse/SGMM393-181?focusedId=377729&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-377729)
Hi,
Here is the CR implementing requirements for the LIGHT_SLEEP to behave as the STANDBY mode and adds proper reporting for the onSystemPowerChanged notification.
With following CR, the LIGHT_SLEEP and state reporting is fixed. The test is passing this step. However due to https://jira.rdkcentral.com/jira/browse/SGMM393-229 bringing back state to ON gives success: false in the response. However the transition to the ON state seems to be completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will arrange a meeting to discuss this.
libnxclient was not linked, below changes are needed for this "undefined symbol" failure.
This reverts commit 1d60555.
…patch-1 undefined symbol: NxClient_GetDefaultJoinSettings
Reason for change:
-Ensure LIGHT_SLEEP behaves the same as STANDBY by changing LIGHT_SLEEP to fall through to STANDBY in the Power IARMMgr.
- Update org.rdk.System plugin to send LIGHT_SLEEP state if preferredStandbyMode is set to LIGHT_SLEEP.
Test Procedure: Build and verify. Verify power state is set and get correctly as per state mode.
Risks: Low
Signed Off: harshini_ravichandran@comcast.com