Hello NXP team,
I use imx8qmmek board and automotive-12.0.0_1.1.0_image_8qmek_car2 build. When I run command "echo "1 2" > /sys/devices/platform/vehicle-dummy/power_req' to send the system to the "Suspend-to-RAM" mode the system doesn't go to the mode. It is seen by ftrace log(see ftrace.log). In ftrace.log file I added two logs of Android 10 and Android12 for comparing.
I set power policy in the suspend mode(see pic.)
Also I see active wakelocks(see wakelocks.log).
How can I switch it off?
Thank you.
Do you connect the usb port when you use this command ?
Yes, I do. I use just mini-usb connection. And I tried to send the system to sleep mode without usb-connection with script. A result is the same. Rootcouse is not in the usb connection.Please, help me.
T
Hi @Ziegfried
could you try to suspend AA12 with the power button on the board? To go into suspend mode, you need to have disconnected USB, Ethernet...
Martin
I suppose that until cca 7 s it goes to suspend mode, doesn`t it? Because after this time battery interrupt wake up system. It is build in function in kernel.
Another tip, is to make sure with ifconfig, that every connected module like (BT, ...) is disabled.
We also find out, that
echo "1 2 " > /sys/devices/platform/vehicle-dummy/power_req
doesn`t work, because if we use
echo $(</sys/devices/platform/vehicle-dummy/power_req)
the value is 1 0 and not 1 2...
BR
Martin
Hi @Ziegfried ,
for better undertanding could you share with us logs in this way.
logcat -b all -c
Enter to suspend mode
logcat -b all
and share with us this log.
Martin
Hi, Martin.
I share log, how you requested.
There are the wakelocks in the power save mode:
mek_8q:/ $ dumpsys suspend_control_internal
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| WAKELOCK STATS |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| NAME | PID | TYPE | STATUS | ACTIVE COUNT | TOTAL TIME | MAX TIME | EVENT COUNT | WAKEUP COUNT | EXPIRE COUNT | PREVENT SUSPEND TIME | LAST CHANGE |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| PowerManagerService.Broadcasts | 699 | Native | Inactive | 1 | 161ms | 161ms | --- | --- | --- | --- | 549526ms |
| PowerManagerService.Display | 699 | Native | Inactive | 1 | 526641ms | 526641ms | --- | --- | --- | --- | 549365ms |
| PowerManager.SuspendLockout | 699 | Native | Inactive | 1 | 526619ms | 526619ms | --- | --- | --- | --- | 549346ms |
| ApmOutput | 505 | Native | Inactive | 274 | 208ms | 23ms | --- | --- | --- | --- | 549057ms |
| ApmAudio | 505 | Native | Inactive | 172 | 770ms | 103ms | --- | --- | --- | --- | 548745ms |
| PowerManagerService.WakeLocks | 699 | Native | Active | 4 | 1542374ms | 1541529ms | --- | --- | --- | --- | 1573116ms |
| usb_wakelock | 501 | Native | Active | 1 | 1543910ms | 1543910ms | --- | --- | --- | --- | 1573116ms |
| usb | --- | Kernel | Inactive | 1 | 0ms | 0ms | 1 | 0 | 0 | 0ms | 2500ms |
| inotify | --- | Kernel | Inactive | 5 | 154ms | 87ms | 5 | 0 | 0 | 0ms | 46112ms |
| alarmtimer.0.auto | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| [timerfd] | --- | Kernel | Inactive | 2 | 10ms | 6ms | 2 | 0 | 0 | 0ms | 27865ms |
| sc-powerkey | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| tcpm-source-psy-4-0051 | --- | Kernel | Inactive | 6 | 0ms | 0ms | 6 | 0 | 0 | 0ms | 4753ms |
| [timerfd] | --- | Kernel | Inactive | 35 | 29ms | 5ms | 35 | 0 | 0 | 0ms | 947856ms |
| [timerfd] | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| event1 | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| mmc0 | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| eventpoll | --- | Kernel | Inactive | 45 | 0ms | 0ms | 45 | 0 | 0 | 0ms | 947856ms |
| | --- | Kernel | Inactive | 114 | 145ms | 130ms | 114 | 0 | 0 | 0ms | 1552338ms |
| battery | --- | Kernel | Inactive | 1 | 0ms | 0ms | 1 | 0 | 0 | 0ms | 2493ms |
| eventpoll | --- | Kernel | Inactive | 119 | 0ms | 0ms | 119 | 0 | 0 | 0ms | 1552338ms |
| scu:rtc | --- | Kernel | Inactive | 1 | 0ms | 0ms | 1 | 0 | 0 | 0ms | 27858ms |
| [timerfd] | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| mmc1 | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| [timerfd] | --- | Kernel | Inactive | 8 | 14ms | 5ms | 8 | 0 | 0 | 0ms | 690409ms |
| event0 | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
| [timerfd] | --- | Kernel | Inactive | 0 | 0ms | 0ms | 0 | 0 | 0 | 0ms | 0ms |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Wakeups:
----- Suspend Stats -----
success: 0
fail: 0
failed_freeze: 0
failed_prepare: 0
failed_suspend: 0
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
Last Failures:
last_failed_dev:
last_failed_errno: 0
last_failed_step:
----------
Suspend Info:
suspend attempts: 0
failed suspends: 0
short suspends: 0
total suspend time: 0 ms
short suspend time: 0 ms
suspend overhead: 0 ms
failed suspend overhead: 0 ms
new backoffs: 0
backoff continuations: 0
total sleep time between suspends: 0 ms
Thank you!
Hi @Ziegfried ,
it seems like you are not using NXP standard image, otherwise, it would go to suspend mode. From the log it can be seen, that your custom service, preventing to go into suspend mode.
Unfortunately, I can`t help you with such case. Maybe try to look at privileges or try to disable your custom service to see if it helps.
Martin