PINE64
SMS notification inconsistent and Wifi issue (waking up?) - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: SMS notification inconsistent and Wifi issue (waking up?) (/showthread.php?tid=12589)

Pages: 1 2


SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 12-21-2020

Hi,

Mobian up-to-date.
Phone asleep.

1. Text verification SMS sent by website. Screen wakes up. Then turns off. No blinking blue notification light. Unlock phone, open SMS app and SMS is there.

2. Website error so go through the process again, literally one or two minutes later. Presumably because phone was woken up previously, I get the blinking blue notification light (screen does not light up). Unlock screen, SMS is there.

3. Have to allow cookies as still get an error, so third time website sends SMS (literally 1 or 2 minutes later). This time, nothing. No notification light. Unlock phone, SMS is there.

4. I've turned on wifi via the command line (sudo nmcli radio wifi on), it initially connected, seems to have disconnected. My network is showing up in Visible Networks with a tick next to it but I don't seem to actually be connected. Can't ping, can't SSH into phone.

Wifi off then back on, still nothing. Settings GUI bug as wifi on / off is blue but Visible Networks is blank.

Whilst having the wifi issue, popup on the screen saying SMS text message received!

Turn wifi off via GUI - says phone is in airplane mode! Turn wifi back on via GUI, bluetooth is turned on so I turn it off (bluetooth scanning is fine). Wifi Visible Networks is blank, though it does show swirling circle so suggests it thinks it is scanning wifi networks.

dmesg shows sunxi-mmc 1c1000.mmc data error, sending stop command
dmesg shows sun81-ce 1c1500.crypto Fallback for ecb-aes-sun8i-ce is ecb-aes-ce

Wifi doesn't connect. Forced to reboot.

Phone restarted, can SSH into phone before unlocking phone so wifi now works again properly.

Code:
$ uname -a
Linux mobian 5.9-sunxi64 #1 SMP PREEMPT Sun Dec 13 13:56:38 UTC 2020 aarch64 GNU/Linux

I've turned wifi off and back on via command line and was connected immediately.

I'm not sure whether this should be reported anywhere as it seems to be related to the ongoing modem waking up the phone issues?
Happy to take pointers on what to do to try and debug if the problems arise again.

Thanks to the developers for all their work btw!  Smile


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 12-28-2020

I've done quite a few test text messages and incoming phone calls to a Pinephone that is asleep, running Mobian.

Upon an incoming call, the blue notification LED starts blinking, then screen turns on and then a few seconds later the mobile signal shows on the lockscreen, then a few seconds later the phone eventually rings showing the incoming call screen. Using a stopwatch from the time the blue LED starts blinking I've measured 11 to 12 s, which is actually a long time and enough for the person at the other end to give up and end the call attempt before you can answer. I measured 12 s within 15 minutes of a previous call - not sure how quickly the phone goes to sleep.

Text messages sent to a Pinephone in a sleep state (more than half and hour) have always woken up the phone, giving the notification sound and showing the blue blinking notification LED. Only after sending a text message from a website to the phone a few minutes after receiving a call and locking the screen did I NOT receive a notification, though the SMS was available on Chatty.

Note the phone was on 4G Preferred, 3G and phone calls mean switching to 3G as my operator does not have VoLTE.
I've tried with the phone in 3G only and still measured 11 s. It is consistently between 11 and 12 seconds waking up from deep sleep.

It seems as though if the phone is awake and you call (e.g. just after waking it up with a prior call) then the phone just rings with the screen staying dark. No blinking notification LED.

Note that Wifi scanning and connecting seems to be behaving since I've used the GUI to turn it on and off again. When turning Wifi off this also toggles the phone into Airplane Mode so I untoggle this and turn off bluetooth to make sure the phone modem part is working.


I don't know how quickly Android or Apple phones start ringing when waking up from sleep. I can only hope things can improve on the Pinephone.


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 12-31-2020

I left my Pinephone with mobile on the whole day. When I unlocked the screen to turn on Wifi and check for updates the blue notification LED started blinking - new SMS text message was visible in Chatty. I wasn't always at home but don't recall getting an audio notification either so I would say the modem simply did not wake up the Pinephone.

I will be waking up the phone manually several times a day to make sure I don't miss any time sensitive SMSes.


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 01-19-2021

After lots of tests for incoming SMS / text messages, sometimes some don't trigger blinking LED / audio notification even though the text message is received (nothing in modem queue and SMS is visible in Chatty.
Issue on Mobian https://gitlab.com/mobian1/issues/-/issues/230

I also created one for wifi unable to connect / or connecting but then no connection (dot on wifi status bar): https://gitlab.com/mobian1/issues/-/issues/229
Only solution that works for me is to restart the Pinephone. This is intermittent like the SMS notification issue, possibly also due to waking up from suspend?

Note my phone has mobile on (no data) with wifi and bluetooth off. Stays on standby/suspend then I turn on wifi to check for updates / install software, then turn wifi back off.


RE: SMS notification inconsistent and Wifi issue (waking up?) - as400 - 01-20-2021

@dcinoz - I can only confirm I'm having both of the issues - sms notifications not working (sometimes) and exactly the same problems with wifi.


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 01-20-2021

(01-20-2021, 01:22 AM)as400 Wrote: @dcinoz - I can only confirm I'm having both of the issues - sms notifications not working (sometimes) and exactly the same problems with wifi.

@as400 thanks for the feedback, I'm  not the only one then.

I found this on the postmarketOS wiki https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#WiFi

"The wifi uses the rtl8723cs driver and is functional. There is still an issue with the driver not reloading correctly when the SoC is put into suspend mode, this can be worked around by reloading the kernel module:

Code:
pinephone:~# sudo rmmod 8723cs
pinephone:~# sudo modprobe 8723cs
"

I'll try that next time. UBports on kernelupdate branch also has issues, I've had wifi not working upon boot a few times now, seems even worse than Mobian. There are also bug reports / discussions though none had the above information (quick search though). Edit here: https://gitlab.com/ubports/community-ports/pinephone/-/issues/16


RE: SMS notification inconsistent and Wifi issue (waking up?) - as400 - 01-20-2021

I'm sure what we could do, about wifi module, is to reload it (with systemd) everytime you wake up the phone and enter Phosh.


RE: SMS notification inconsistent and Wifi issue (waking up?) - scholbert - 01-20-2021

(01-20-2021, 05:06 AM)as400 Wrote: I'm sure what we could do, about wifi module, is to reload it (with systemd) everytime you wake up the phone and enter Phosh.

Hi,
nice hint... this should be tested... maybe it could be a work around.

EDIT:
Deleted my kernel logs... as it seems unrelated.
May open another thread though.

Regards,
scholbert


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 01-20-2021

(01-20-2021, 05:06 AM)as400 Wrote: I'm sure what we could do, about wifi module, is to reload it (with systemd) everytime you wake up the phone and enter Phosh.

@as400

Here is a script to automatically reload Realtek wifi / BT driver when coming out of sleep / suspend:

Create an executable file here:
Code:
sudo nano /usr/lib/systemd/system-sleep/reload_realtek_driver.sh
sudo chmod +x /usr/lib/systemd/system-sleep/reload_realtek_driver.sh

Content of reload_realtek_driver.sh as an example:
Code:
#!/bin/sh

case $1/$2 in
  pre/*)
        sudo logger "`date`     Phone going to sleep..."
        sudo echo "`date`       Sleep" >> /home/mobian/reload_realtek_driver.log
        ;;

  post/*)
        sudo logger "'date'     Reloading Realtek wifi / BT drives as waking up from sleep..."
        sudo echo "`date`       Waking up and reloading Realtek wifi / BT driver" >> /home/mobian/reload_realtek_driver.log
        # reload realtek driver
        sudo rmmod 8723cs
        sudo modprobe 8723cs
        ;;
esac

Script does nothing on suspend (pre). Not sure where logger is output, if at all.

Systemd journal log can be seen using the following command:
Code:
sudo journalctl -b -u systemd-suspend

You can comment out the echos to reload_realtek_driver.log in home directory.
To see its logs:
Code:
cat ~/reload_realtek_driver.log

I don't know if there are any undesirable side effects so please let us know.
I don't know if it prevents the intermittent wifi issues but please let us know.


RE: SMS notification inconsistent and Wifi issue (waking up?) - dcinoz - 01-20-2021

Question for Chatty experts, would you say try (for the absent notification for some incoming SMSes:
A) sudo pkill chatty pre suspend
or
B) sudo pkill chatty post suspend
or
C) something else ?

I've added it in pre case and will see how it goes.
Perhaps someone else can try it in the post case?

Note to all you, can immediately suspend using:
Code:
systemctl suspend