REPRODUCIBILITY: Always
OS VERSION: 5.0.0.68 (Tampella)
HARDWARE: Sony Xperia XA2 (H3113)
UI LANGUAGE: English
REGRESSION: New
DESCRIPTION:
Upon inserting a new SIM card and booting the phone, the home screen never appears. I do get asked for my code to decrypt the phone then I get the spinning wheel as usual however it will spin forever. Swiping from the top does show the usual stuff like wifi and such though the cellular data icon is missing. Swiping from the bottom brings up the camera.
PRECONDITIONS:
I have an old and working SIM card. I have a new SIM card with a new provider.
STEPS TO REPRODUCE:
Turn off the phone
Remove old SIM card
Insert new SIM card
Boot the phone
Enter decryption PIN
EXPECTED RESULT:
I expect the home screen to appear so I can use the phone
ACTUAL RESULT:
The spinning wheel after entering the decryption PIN never disappears even though the phone appears to have started. I can even SSH into it.
MODIFICATIONS:
I do have some OpenRepos enabled but nothing installed that modifies that system.
ADDITIONAL INFORMATION:
I did run the gather logs scripts from Collect Persistent Logs | Sailfish OS Documentation. I am unsure if those are safe to post here? I looked at the logs but nothing jumped out at me. There was a lot of SIM detection code that appeared to be working.
Sorry, that was maybe a bit ambiguous. With decryption PIN, I mean the PIN code that I need to enter to decrypt SailfishOS. It’s not the PIN for the SIM card itself which as far as I know isn’t locked because another phone happily uses it.
The install is somewhat old. I bought the licence in 2021 so that would have been SailFish OS 4 that I started with and I don’t think I’ve reinstalled since.
But are you sure your device storage is encrypted at all? AFAIR this hasn’t been the default in 2021.
And everything works normally again when you insert the old SIM card?
In that case, enable persistent journaling, then reproduce the problem, then reboot with the good SIM, then print out the journal with journalctl -b -1 > file and post that file here.
Ok, I think I have this one figured out. The home screen seems to be hanging because it is waiting on the ofono service somehow.
I logged into the phone while the home screen wouldn’t show and I noticed the ofono service was in the failed state. When I started it with systemctl start ofono, the home screen appeared as well. This also gave me cellular connectivity with the new SIM card.
The ofono service would die quite quickly again though. This bug seems to be a variant of those described here:
Deleting a bunch of failed received MMS message seems to have helped for me to make ofono (mostly) stable again. I still need to manually start the service after boot but then it stays stable. Good enough, I guess!
Anyway, to prevent the home screen from hanging after a failed start by ofono, I modified the SystemD unit with systemctl edit ofono to contain the following:
[Service]
RestartSec=20
The original value is just 3 seconds and since SystemD tries to restart a service 5 times if it’s failig, it means that if the home screen hasn’t tried to start within 15 seconds, it will hang. This way, there is a short-lived moment where ofono is running, allowing the home screen to properly start.