From 4e36154aefc1cdc8aa4c7e7b7b65d6cac33205e4 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Mon, 21 Jun 2021 08:50:13 +0200 Subject: [PATCH] fix going back to crust after sms or missed call RTC loops was storing the good wake up reason but not the classic crust. We fix it to notify the modemmonitor with the reason of the wake. This should solve the issue and put the phone back to crust after sms. --- scripts/core/sxmo_screenlock.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/core/sxmo_screenlock.sh b/scripts/core/sxmo_screenlock.sh index 1785f13..cf78750 100755 --- a/scripts/core/sxmo_screenlock.sh +++ b/scripts/core/sxmo_screenlock.sh @@ -145,15 +145,10 @@ elif [ "$1" = "crust" ] ; then updateLed xset dpms force on - # all we know is it's not the rtc. Maybe modem? - # TODO: Check mmcli or something or sxmo's notifs when - # https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/356 - # https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2066 - # fixed - # TODO: Document UNSUSPENDREASONFILE - echo "nonrtc" > "$UNSUSPENDREASONFILE" - - if [ "$(whichWake)" = "button" ] && [ -x "$XDG_CONFIG_HOME/sxmo/hooks/postwake" ]; then + UNSUSPENDREASON=$(whichWake) + echo "$UNSUSPENDREASON" > "$UNSUSPENDREASONFILE" + + if [ "$UNSUSPENDREASON" = "button" ] && [ -x "$XDG_CONFIG_HOME/sxmo/hooks/postwake" ]; then "$XDG_CONFIG_HOME/sxmo/hooks/postwake" fi