Skip to content
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

ULPM doesn't work with MCU version 002.011 for wp77xx #45

Open
akankshaashwini opened this issue Jul 26, 2019 · 7 comments
Open

ULPM doesn't work with MCU version 002.011 for wp77xx #45

akankshaashwini opened this issue Jul 26, 2019 · 7 comments
Labels
bug cloned-in-jira Issue has been cloned to an internal JIRA instance.

Comments

@akankshaashwini
Copy link

Tested with pmtool on a Mangoh red with wp77xx module.

pmtool bootOn timer 60
SUCCESS!
pmtool shutdown
Initiated the MDM shutdown
Doesn't perform a shutdown

@CoRfr
Copy link
Contributor

CoRfr commented Jul 26, 2019

Which version of Legato did you test? Also which Linux

@CoRfr CoRfr added the bug label Jul 26, 2019
@akankshaashwini
Copy link
Author

I tested with legato 19.04 version. Linux 3.18. Toolchain SWI9X06Y_02.22.12.00.
I used Release 11 resources just with an updated legato version to 19.04:
https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-latest-release-components/

@jvermillard
Copy link

if you have the legato devMode app, I don't know why, but it's preventing ULPM to shutdown the module. Try to remove it.

@akankshaashwini
Copy link
Author

I don't find the devMode app installed.

@CoRfr
Copy link
Contributor

CoRfr commented Aug 22, 2019

Yes the devMode app keeps the target alive. See https://docs.legato.io/latest/basicTargetDevMode.html:

  • holds a wake lock, so the target won't go to sleep when disconnected from USB.

I created an internal tracker, LE-13385, will keep you posted.

@CoRfr CoRfr added the cloned-in-jira Issue has been cloned to an internal JIRA instance. label Aug 22, 2019
@Redferne
Copy link

Redferne commented Aug 28, 2019

Can confirm this problem with the same setup (WP7702), also tried Legato 19.05. However it seems that PSM can still be triggered by using the psm_test command and the system powers down.
Edit: Found something! If PSM is enabled then pmtool shutdown does not work.
So it's possible to disable PSM in the modem by using:

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
at+cpsms=0
OK

Exit microcom by CTRL+a and then CTRL+x
Now pmtool shutdown successfully shuts down the board.

Can also report that kernel autosleep is not working when legato is running (maybe this is intended?) Is there a workaround?

root@swi-mdm9x28-wp:~# cat /sys/kernel/debug/wakeup_sources |sed -e s/"^       "/"unnamed"/ | awk '{print $6 "\t" $1 "\t" $2 "\t" $3 "\t" $4 "\t" $5 "\t" $7 "\t" $8 "\t" $9 "\t" $10}' | grep -v "^0"

active_since	name	active_count	event_count	wakeup_count	expire_count	total_time	max_time	last_change	prevent_suspend_time
2130053	[eventfd]	1	1	0	0	2130053	2130053	1252296	0

I'm connected to the console UART port (not CF3 USB) and devMode is not enabled.

@auandrew
Copy link

auandrew commented Dec 4, 2019

I cannot reproduce this issue with all the exact same versions.

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT

ati8
Legato Ver: 19.04.0_a62fc5efed553c95ae8e2af417420976
Yocto Ver: SWI9X06Y_02.22.12.00 2019-04-24_20:46:59
OS Ver: Linux version 3.18.44 (jenkins@jenkins) (gcc version 6.2.0 (GCC) ) #2 PREEMPT Wed Apr 24 20:48:03 UTC 2019
LK Ver: SWI9X06Y_02.16.02.00
RootFS Ver: SWI9X06Y_02.22.12.00 2019-04-24_20:46:59
UserFS Ver: unknown
MCU Ver: 002.011

In general, any active wake lock would prevent Legato's ULPM from proceeding with a shutdown, e.g.

Jan 6 01:23:16 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[2899]/powerMgr T=main | le_pm.c OnClientConnect() 270 | Connection from client pmtool/3195
Jan 6 01:23:16 swi-mdm9x28-wp user.err Legato: =ERR= | powerManagerService[2899]/powerMgr T=main | le_ulpm.c le_ulpm_ShutDown() 499 | Wakelock held!! System can't be shut down. Try again.
Jan 6 01:23:16 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[2899]/powerMgr T=main | le_pm.c OnClientDisconnect() 298 | Client pid 3195 disconnected.

Thus, in your environment where the issue manifests, is there any other active wake, just like devMode but not devMode itself?

There is related documentation about wake locks at

and pmtool at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cloned-in-jira Issue has been cloned to an internal JIRA instance.
Projects
None yet
Development

No branches or pull requests

5 participants