I am trying to suspend my android device ( on QC platform ) by writing mem to /sys/power/state
- USB cables etc. is disconnected
- Display is off, no wake-locks are held by any process.
- Wifi, BT is OFF.
I see below dmesg logs.
938.958977] R0: [r.commander.app][26621276703] [14:22:48.983313] wlan: [2243:I :HDD] __wlan_hdd_bus_resume_noirq: 947: starting bus_resume_noirq
[ 938.979810] PM: noirq resume of devices complete after 26.605 msecs
[ 939.012585] PM: early resume of devices complete after 25.587 msecs
[ 939.032489] R0: [r.commander.app][26622688083] [14:22:49.056824] wlan: [2243:I :HDD] __wlan_hdd_bus_resume: 859: starting bus resume
[ 939.033096] R0: [kworker/u16:13][26622698795] [14:22:49.057379] wlan: [2195:E :QDF] get_cds_sched_ctxt: gp_cds_sched_context == NULL
[ 939.070001] PM: resume of devices complete after 57.388 msecs
[ 939.155555] PM: Finishing wakeup.
[ 939.155567] Restarting tasks ... done.
[ 939.236522] PM: suspend exit 2023-06-22 14:22:49.260870998 UTC
[ 939.302686] PM: suspend entry 2023-06-22 14:22:49.327014904 UTC
[ 939.302757] PM: Syncing filesystems ...
[ 939.332614] IRQ6 no longer affine to CPU5
[ 939.366980] done.
[ 939.367022] PM: Preparing system for sleep (mem)
[ 939.378767] Freezing user space processes ...
[ 939.381637] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 12288
[ 939.382052] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 16384
[ 939.382140] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 10
[ 939.382211] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 36864
[ 939.382281] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 4352
[ 939.382297] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 8192
[ 939.387666] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 28672
[ 939.395733] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 11
[ 939.462938] (elapsed 0.084 seconds) done.
[ 939.463037] Freezing remaining freezable tasks ... (elapsed 0.012 seconds) done.
[ 939.476015] PM: Suspending system (mem)
[ 939.476050] Suspending console(s) (use no_console_suspend to debug)
[ 939.517170] R0: [kworker/u16:11][26631993823] [14:22:49.541497] wlan: [2129:E :QDF] get_cds_sched_ctxt: gp_cds_sched_context == NULL
[ 939.544897] PM: Wakeup pending, aborting suspend
[ 939.544930] active wakeup source: event2
[ 939.545136] PM: Some devices failed to suspend, or early wake event detected
[ 939.545465] R0: [kworker/u16:11][26632537208] [14:22:49.569799] wlan: [2129:E :QDF] get_cds_sched_ctxt: gp_cds_sched_context == NULL
[ 939.559077] PM: resume of devices complete after 13.909 msecs
[ 939.594946] PM: Finishing wakeup.
[ 939.594959] Restarting tasks ... done.
[ 939.667533] PM: suspend exit 2023-06-22 14:22:49.691882039 UTC
[ 940.074785] PM: suspend entry 2023-06-22 14:22:50.099105424 UTC
[ 940.074842] PM: Syncing filesystems ... done.
[ 940.127031] PM: Preparing system for sleep (mem)
[ 940.138213] Freezing user space processes ...
[ 940.141613] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 8192
[ 940.142042] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 11
[ 940.142095] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 4352
[ 940.142130] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 12288
[ 940.150572] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 16384
[ 940.150706] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 10
[ 940.150791] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 28672
[ 940.150871] QSEECOM: qseecom_receive_req: Interrupted: exiting Listener Service = 36864
[ 940.218147] (elapsed 0.079 seconds) done.
[ 940.218225] Freezing remaining freezable tasks ... (elapsed 0.011 seconds) done.
[ 940.230237] PM: Suspending system (mem)
[ 940.230270] Suspending console(s) (use no_console_suspend to debug)
[ 940.272444] R0: [kworker/u16:12][26646495139] [14:22:50.296774] wlan: [6177:E :QDF] get_cds_sched_ctxt: gp_cds_sched_context == NULL
[ 940.335163] R0: [PhotonicModulat][26647699391] [14:22:50.359494] wlan: [3534:I :HDD] __wlan_hdd_bus_suspend: 671: starting bus suspend; event:2, flags:0
[ 940.357067] PM: suspend of devices complete after 89.011 msecs
[ 940.410913] PM: late suspend of devices complete after 53.812 msecs
[ 940.457085] R0: [PhotonicModulat][26650040286] [14:22:50.481416] wlan: [3534:I :HDD] __wlan_hdd_bus_suspend_noirq: 774: start bus_suspend_noirq
[ 940.467315] PM: noirq suspend of devices complete after 56.373 msecs
[ 940.467339] Disabling non-boot CPUs ...
[ 940.496455] CPU2: update max cpu_capacity 410
[ 940.505531] CPU6: update max cpu_capacity 1024
[ 940.556424] CPU0: update max cpu_capacity 410
[ 940.562043] CPU6: update max cpu_capacity 1024
[ 940.609309] CPU6: update max cpu_capacity 1024
[ 940.652601] CPU0: update max cpu_capacity 410
[ 940.702565] CPU0: update max cpu_capacity 410
[ 940.702677] CPU6: update max cpu_capacity 1024
[ 940.741005] CPU0: update max cpu_capacity 410
[ 940.741048] CPU7: update max cpu_capacity 1024
[ 940.790155] suspend ns: 940790146306\x09suspend cycles: 26656435613
[ 940.790146] Suspended for 155.500 seconds
I am suspecting Wlan. Logs show that the system is suspended for a couple of minutes in each cycle but some event aborts the suspension.
Can someone please point guide how do I go about finding the device that's failing to suspend?
I have debugged wakeup.c and got the list of registered wake-up sources, but not sure how to link these sources to actual drivers/devices.
Thank you.