Yes Sir…
USB disconnected… I cant see the “WP7702 modem”, but Console… fully working.
root@swi-mdm9x28-wp:/sys/bus/usb/devices# ls
usb1
root@swi-mdm9x28-wp:/sys/devices/7c00000.hsic_host/usb1# cat manufacturer
Linux 3.18.140 ehci_hcd
Yes Sir…
USB disconnected… I cant see the “WP7702 modem”, but Console… fully working.
root@swi-mdm9x28-wp:/sys/bus/usb/devices# ls
usb1
root@swi-mdm9x28-wp:/sys/devices/7c00000.hsic_host/usb1# cat manufacturer
Linux 3.18.140 ehci_hcd
If uart console still works after removing the USB cable, you can check the wake_lock
I’m still searching a solution… it seems that EXT_LNA_GPS_ANT is draining power… today I’m in lab to discover what…
thanks for now.
Finally i solved the USB problem. Now device disable USB interface whan cable is disconnected.
Indeed device start printing:
[ 244.851451] Freezing of tasks aborted after 0.816 seconds
[ 244.942084] Freezing of tasks aborted after 0.007 seconds
… and so on
I stop the procedure setting a wake_lock.
Now I’m round 20ma. with radio off and gnss disabled.
It would be great if I can activate a kernel sleep like mem or disk but if i remove the wake_lock and let the device follow the autosleep procedure it simply fail and after a while repeating “Freezing tasks…” it simply reboot.
I’ve tried also with disk instead of mem but nothing changes.
It would be great if i can suspend to disk and continue to wake up in case accelerometer hits an interrupt.
regards,
gianmaria
according to specification, if it is consuming 20mA during airplane mode, that means the USB is still active, not in selective suspend mode.
Can i read somewhere if USB is still active? I’ve both console and USB interface from device, I phisically remove USB but still have console to interact.
Also i discovered why mem sleep were blocked… it depends from some tasks but I’m able to identify just one of them:
user.warn kernel: [ 324.658896] Freezing user space processes ... (elapsed 0.007 seconds) done.
user.warn kernel: [ 324.666878] Freezing remaining freezable tasks ...
user.info kernel: [ 325.575731] PM: Wakeup pending, aborting suspend
user.info kernel: [ 325.575925] active wakeup source: ipc000000c4_posDaemon
user.warn kernel: [ 325.576297]
user.err kernel: [ 325.576320] Freezing of tasks aborted after 0.909 seconds
user.warn kernel: [ 325.580810] Restarting kernel threads ... done.
It seems to be an app called positioningService. Can i remove from device? Removing will compromise my use of the gps serverices?
the other one i cant identify… maybe some timer from some built in app?
user.err kernel: [ 594.299828] Freezing of tasks aborted after 0.353 seconds
user.warn kernel: [ 594.304208] Restarting kernel threads ... done.
user.warn kernel: [ 594.305433] Restarting tasks ... done.
user.info kernel: [ 594.316114] sierra_pm_resume
user.info kernel: [ 594.316571] Abort: Pending Wakeup Sources: [timerfd] [timerfd] [timerfd] [timerfd] [timerfd]
user.info kernel: [ 594.317085] PM: suspend exit 2024-11-05 17:16:03.211241725 UTC
user.info kernel: [ 594.317381] PM: suspend entry 2024-11-05 17:16:03.211550006 UTC
user.info kernel: [ 594.317406] PM: Syncing filesystems ... done.
user.debug kernel: [ 594.323612] PM: Preparing system for mem sleep
user.warn kernel: [ 594.385542] Freezing user space processes ... (elapsed 0.007 seconds) done.
user.warn kernel: [ 594.393018] Freezing remaining freezable tasks ...
user.info kernel: [ 594.789192] PM: Wakeup pending, aborting suspend
ser.info kernel: [ 594.789323] active wakeup source: [timerfd]
user.info kernel: [ 594.789347] active wakeup source: [timerfd]
user.err kernel: [ 594.789763] Freezing o[ 595.458103] Freezing of tasks aborted after 0.574 seconds
regards
gianmaria
is there any improvement if you disable the HSIC flag?
AT!ENTERCND="A710"
AT!CUSTOM="HSICENABLE",0
AT!RESET
Is there improvement if you stop the positioningService by “app stop” command?
No… same thing.
I cant disable or uninstall positioningService cause it’s checked by a system watchdog… it it fails a couple of time the device simply reboot.
I’m a little bit lost at the moment. I can accept the 20ma consumption when in low power mode… but I cant stay without the disk/mem freezing… when it enters (a couple of times it worked) the devices goes around 10ma or less (my alim shows till mA not microA…).
thanks,
Gianmaria
Is there any improvement if you remove the sim card throughout the test?
Have you tried ULPM with AT!POWERMODE and AT!POWERWAKE?
Same thing without SIM.
Yes I currently use POWERWAKE and POWERMODE to completly shutdown device and then wait for INT2 of accelerometer for to wakeup. But this approach have some problems… the device starts from 0 and I need to make gps fix every time. I need mem or disk freeze, can you help me understand hot to put the device in mem or disk suspend?
with gnss disable, th positioningService continue to run in background… see log:
root@swi-mdm9x28-wp:~# Jan 6 01:14:07 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:08 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:09 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:10 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:11 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:12 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:13 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:14 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:15 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:16 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:17 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:18 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:19 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:20 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:21 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:22 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:23 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
^C
root@swi-mdm9x28-wp:~# Jan 6 01:14:24 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
Jan 6 01:14:25 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
fJan 6 01:14:26 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
g
logread -f
Jan 6 01:14:27 swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[1268]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
^C
root@swi-mdm9x28-wp:~# gnss disable
The GNSS device is not initialized or started. Please see log for details
regards,
Gian
not quite sure why you can still see the legato log while in sleep mode.
On my side, I have tested with WP77 FW15.1 :
Poky (Yocto Project Reference Distro) 3.1.15 fx30 /dev/ttyMSM1
fx30 login: [ 36.193413] mbim_read: Waiting failed
[ 36.205097] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 36.205116] PM: Device alarmtimer failed to suspend: error -16
[ 36.205130] PM: Some devices failed to suspend, or early wake event detected
[ 38.255217] mbim_read: Waiting failed
[ 38.275799] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 38.275836] PM: Device alarmtimer failed to suspend: error -16
[ 38.275857] PM: Some devices failed to suspend, or early wake event detected
[ 40.323353] mbim_read: Waiting failed
[ 40.336675] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 40.336713] PM: Device alarmtimer failed to suspend: error -16
[ 40.336734] PM: Some devices failed to suspend, or early wake event detected
root[ 42.403429] mbim_read: Waiting failed
[ 42.416801] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 42.416839] PM: Device alarmtimer failed to suspend: error -16
[ 42.416860] PM: Some devices failed to suspend, or early wake event detected
root@fx30:~# [ 44.483466] mbim_read: Waiting failed
[ 44.496929] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 44.496967] PM: Device alarmtimer failed to suspend: error -16
[ 44.496988] PM: Some devices failed to suspend, or early wake event detected
[ 46.563423] mbim_read: Waiting failed
[ 46.576799] dpm_run_callback(): platform_pm_suspend+0x0/0x48 returns -16
[ 46.576836] PM: Device alarmtimer failed to suspend: error -16
[ 46.576857] PM: Some devices failed to suspend, or early wake event detected
[ 48.643439] mbim_read: Waiting failed
[ 48.676298] PM: Some devices failed to suspend, or early wake event detected
[ 49.031687] mbim_read: Waiting failed
[ 49.271188] mbim_read: Waiting failed
I solved this morning. Now i can enter suspend to mem.
Nov 6 10:31:14 swi-mdm9x28-wp userdone.
.info kernel: [ 195.759810] PM: suspend entry 2024-11-06 09:31:[ 196.995498] Suspending console(s) (use no_console_suspend to debug)
14.725618792 UTC
Nov 6 10:31:14 swi-mdm9x28-wp user.info kernel: [ 195.779995] PM: Syncing filesystems ... done.
Nov 6 10:31:14 swi-mdm9x28-wp user.debug kernel: [ 195.810728] PM: Preparing system for mem sleep
Nov 6 10:35:39 swi-mdm9x28-wp user.warn kernel: [ 195.816216] Freezing user space processes ... (ela
Now got the next problem, exit on accelerometer hits…
When I move the device i see this exits:
[ 195.716523] sierra_pm_resume
but it immediatly enters sleep mode again… I’m thinking to modify sierra_monitor.c to write something in /sys/power/wake_lock.
Any idea on how to keep the device awake for some seconds after resume? In my case there is nothing that keep the device busy and so it run to sleep too fast…
Regards,
Gian
you can see this document on using API le_pm_StayAwake():
In my case it all happen too fast:
[ 168.472628] PM: suspend of devices complete after 35.485 msecs
[ 168.475008] PM: late suspend of devices complete after 2.335 msecs
[ 168.477599] PM: noirq suspend of devices complete after 2.551 msecs
[ 168.477726] suspend ns: 168477705510 suspend cycles: 8199124427
[ 168.477705] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
[ 168.477705] resume cycles: 8240212502
[ 168.477986] irq 50, desc: ce999d80, depth: 0, count: 0, unhandled: 0
[ 168.478044] ->handle_irq(): c0232df4, msm_gpio_irq_handler+0x0/0x150
[ 168.478084] ->irq_data.chip(): c0e12ae8, gic_chip+0x0/0x74
[ 168.478097] ->action(): (null)
[ 168.478110] IRQ_NOPROBE set
[ 168.478123] IRQ_NOREQUEST set
[ 168.478135] IRQ_NOTHREAD set
[ 168.480153] PM: noirq resume of devices complete after 1.753 msecs
[ 168.480663] gpio_check_and_wake: wake-n_gpio26 STATE=WAKEUP
[ 168.480791] i2c-msm-v2 78b8000.i2c: Runtime PM-callback was not invoked.
[ 168.483867] PM: early resume of devices complete after 1.997 msecs
[ 168.495375] swimcu_gpio_irq_event_handle: Re-enabled irq 1 type B for MCU GPIO 2
[ 168.495522] gpio_check_and_wake: wake-n_gpio26 STATE=SLEEP
[ 168.504103] PM: resume of devices complete after 20.175 msecs
[ 168.621984] Restarting tasks ... done.
[ 168.636514] ASI Awakening - 20 sec
[ 168.641154] sierra_pm_resume
[ 168.645278] PM: suspend exit 2024-11-06 10:26:57.075196042 UTC
[ 168.650435] PM: suspend entry 2024-11-06 10:26:57.080357812 UTC
[ 168.656167] PM: Syncing filesystems ... done.
[ 168.726268] Freezing user space processes ... (elapsed 0.007 seconds) done.
[ 168.739613] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[ 168.749144] Suspending console(s) (use no_console_suspend to debug)
Seems I’ve no time to write anything in /sys/power/wake_lock.
What i need is to prevent suspend mode again for 4-5 seconds on wakeup from suspend.
There must be some variable in linux subsystem but at moment cant find the right one…
Do you really try the application in the document?
Nope, but i solved this way:
In file swi-linux-src/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/arch/arm/mach-msm/sierra_monitor.c
I manually set wake_dur to 10 seconds (wake_dur =10000) in function sierra_pm_resume(void) and now it stay alive for 10 seconds so I can put a string in wake_lock.
I know this is not a “clean” solution but at moment seems to work.
G.
Just received a new Yellow for testing…upgraded with latest firmware (modem, yocto, legato), just console cable connected… device stop responding on console after some seconds… consumption remain 50ma. Radio is off, GNSS is disabled.
root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: 352653090194911
IMEISV: 8
FSN: 4L931389080910
Firmware Version: SWI9X06Y_02.36.08.09 c094f4 jenkins 2022/06/24 03:14:28
Bootloader Version: SWI9X06Y_02.36.08.09 c094f4 jenkins 2022/06/24 03:14:28
MCU Version: 002.015
PRI Part Number (PN): 9909138
PRI Revision: 001.001
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.079_000
SKU: 1104405
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 27 Unexpected: 0
root@swi-mdm9x28-wp:~# cm radio
Power: OFF
Current Network Operator:
Current RAT: Module not registered on network, RAT not available
Status: Not registered and not currently searching for new operator (LE_MRC_REG_NONE)
Signal: No signal strength (0)
PS: Packet Switched Not registered (LE_MRC_REG_NONE)
50ma is for the whole mangoh yellow board, not the current consumption of single WP module, right?
Right… I’m tring to sumulate on the original HW but no way. You are right…too much accessories.