My 9 year old SIM card broke overnight, and it took me a while to diagnose.
After turning on the Xperia and entering my LUKS PIN, there was only a black screen with a spinning circle. Volume keys and opening the top menu worked, but I could not leave the black screen.
Taking out and re-inserting the SIM tray, finally showed the PIN entry for the user. Afterwards in settings, both SIM slots appear to be empty, even though one contains the SIM card that had worked the day before.
Placing the SIM into a spare Android phone, its top text on the lockscreen changed from ‘No SIM card - Service not available’ into ‘Invalid SIM card - emergency calls only’ which confirmed to me that it was a SIM card issue and I had to get it replaced at the telco shop.
Sailfish OS could indicate an invalid SIM in the top menu and in settings, where it currently shows that a SIM is locked when you skip the SIM PIN dialog on startup.
This would assure users, that they didn’t break something.
The problem is, ofono treats anything other than RADIO_CARD_STATE_PRESENT as if no SIM card was inserted.
I only have a shallow understanding of the low level C code, an LLM pointed me in the right direction.
From my user point of view, when I insert a SIM card that, probably is defective because of age and the visible scratches to the gold contacts, I would want my phone to tell me that. Currently when such a SIM is inserted in a powered on state, nothing happens. When it was inserted before powering on, the user PIN entry screen is never reached, only a black screen with a spinning circle.