try:
Code:
POWERD_STATES=`lipc-get-prop -s com.lab126.powerd state`
if [ "$POWERD_STATES" == "screenSaver" ] || [ "POWERD_STATES" == "suspended" ] ; then
# caused by RTC not by button press
fi
see
https://www.mobileread.com/forums/showthread.php?t=322900 for more details, tested on 5.11