Hi @paulmeis.
I feel your frustration. I stumbled upon this issue well over a year ago now. While I did manage to resolve it, I couldn’t get SW to reproduce the issue on their end.
So, this may not work for you but here’s what I found, for what it’s worth.
By the way, can you share the output of cm info
here as well as Legato version and FW release version?
There may be two issues at play here.
1. The Modem fails to shutdown if USB autosleep is enabled (default)
Try disabling it with this command:
echo off > /sys/power/autosleep
Note that is only temporary and it will re-enabled automatically at the next boot.
To disable it permanently, you must modify /etc/init.d/enable_autosleep.sh
See this forum post for a handy script written to automate this: Script to disable USB autosleep
Another observation I made was that the issue doesn’t occur if a SIM card is absent. If a SIM is inserted and registered on a cellular network prior to the ShutDown call, it will fail to shutdown.
2. Device will not enter ULPM/PSM mode if GPIO36/38 is selected as the wakeup source
I note that the ShakeNWake demo uses GPIO36 as the wakeup source.
From the WP77xx R12 Release Notes:
https://source.sierrawireless.com/resources/airprime/software/release_notes/wp77xx-release-12-customer-release-notes/
Page 25, QTI9X06-192, Device will not enter ULPM/PSM mode if GPIO36/38 is selected as the wakeup source:
If GPIOs 36 and 38 are configured as a wakeup source with logic level high as the wakeup trigger, the device is unable to enter PSM or ULPM. The issue doesn’t happen when using all other types of wakeup triggers.
Not sure which FW Release you’re using. Just something to consider.
Lastly, you might find something useful over in the Legato forum in this thread: Suddenly unable to enter ULPM
Cheers,
Raf