Enabling eSIM modem prevents Lipstick login

REPRODUCIBILITY: Always
OS VERSION: 5.0.0.71
HARDWARE: Xperia 1 IV (xqct54 / xqct54); SIM + eSIM version
UI LANGUAGE: US
REGRESSION: No

DESCRIPTION:

Xperia 1 IV (xqct54) has 2 SIM modems: physical SIM and eSIM. So far, we have been working on single SIM mode by removing second SIM configs. To work with eSIM, I enabled eSIM in SFOS configs by keeping /etc/ofono/ril_subscription.d/dual-sim.conf and /etc/ofono/binder.d/dual-sim.conf as well as including jolla-settings-networking-multisim package. On boot, lipstick never asks for PIN (login) nor SIM unlock key. Instead, PageBusyIndicator is shown (spinning circle) and login never proceeds.

PRECONDITIONS:

Have eSIM modem available and enabling it

STEPS TO REPRODUCE:

  1. Enable multisim config on device with eSIM
  2. Have eSIM unconfigured

EXPECTED RESULT:

Lipstick should ask for PIN to unlock the device and PIN for available physical SIM.

ACTUAL RESULT:

Boot stuck on PageBusyIndicator

MODIFICATIONS:

None

ADDITIONAL INFORMATION:

You can get out of busy state by login via SSH and stopping ofono. When in UI, you can start ofono again. Physical SIM will stay locked. To get unlock displayed, go to settings/MultiSim and disable eSIM. Then unlock screen will be shown immediately.

More additional information is in messages below.

2 Likes

Workaround: enable only one SIM

It is possible to get boot working by disabling eSIM. After that, Lipstick will boot just fine. Unfortunately, if user enables eSIM modem and reboots by accident, the next boot will never proceed over busy state. So, it would be required to somehow get into device and disable ril_1 or stop ofono.

In case if ril_1 (eSIM modem) is disabled, we have the following responses from ofono:

Notice that GetAvailableModems returns 2 modems:

Frame 1310: Packet, 91 bytes on wire (728 bits), 91 bytes captured (728 bits)
D-Bus
    Endianness: little-endian
    Message Type: Method reply
    Message Flags: 0x01
        .... ...1 = No Reply Expected: Not expected
        .... ..0. = No Auto Start: Start
        .... .0.. = Allow Interactive Authorization: Don't allow
    Protocol Version: 1
    Message Body Length: 27
    Message Serial: 24
    Header Field Array
        Array Length: 46
        Dict Entry, 6, Destination: :1.7
        Dict Entry, 5, Reply serial: 4
        Dict Entry, 8, Signature: ao
        Dict Entry, 7, sender: :1.14
        [Path: /]
        [Interface: org.nemomobile.ofono.ModemManager]
        [Member: GetAvailableModems]
        [Response To: 455]
        [Response Time: 2.825425000 seconds]
        [Sender: org.ofono]
    Body
        Array
            Array Length: 23
            Object Path: /ril_0
            Object Path: /ril_1

and GetModems only one:

Frame 28438: Packet, 529 bytes on wire (4232 bits), 529 bytes captured (4232 bits)
D-Bus
    Endianness: little-endian
    Message Type: Method reply
    Message Flags: 0x01
        .... ...1 = No Reply Expected: Not expected
        .... ..0. = No Auto Start: Start
        .... .0.. = Allow Interactive Authorization: Don't allow
    Protocol Version: 1
    Message Body Length: 457
    Message Serial: 225
    Header Field Array
        Array Length: 54
        Dict Entry, 6, Destination: :1.68
        Dict Entry, 5, Reply serial: 486
        Dict Entry, 8, Signature: a(oa{sv})
        Dict Entry, 7, sender: :1.14
        [Path: /]
        [Interface: org.ofono.Manager]
        [Member: GetModems]
        [Response To: 28437]
        [Response Time: 294.000 microseconds]
        [Sender: org.ofono]
        [Destination: org.nemomobile.compositor]
    Body
        Array
            Array Length: 449
            Struct
                Object Path: /ril_0
                Array (Dict)
                    Array Length: 433
                    Dict Entry, Online: True
                    Dict Entry, Powered: True
                    Dict Entry, Lockdown: False
                    Dict Entry, Emergency: False
                    Dict Entry, Revision: waipio.gen-10361-53
                    Dict Entry, Serial: XXXXXXXXXXXX
                    Dict Entry, SoftwareVersionNumber: 53
                    Dict Entry, Interfaces
                    Dict Entry, Features
                    Dict Entry, Type: hardware

if 2 SIMs are enabled, the both modems are shown (see below)

DBus properties for boot stuck on busy

When boot is stuck, we have 2 modems listed in GetModems (dbus-send --system --print-reply --dest=org.ofono / org.ofono.Manager.GetModems):

   array [
      struct {
         object path "/ril_1"
         array [
            dict entry(
               string "Online"
               variant                   boolean true
            )
            dict entry(
               string "Powered"
               variant                   boolean true
            )
            dict entry(
               string "Lockdown"
               variant                   boolean false
            )
            dict entry(
               string "Emergency"
               variant                   boolean false
            )
            dict entry(
               string "Serial"
               variant                   string "XXXXXXXXX"
            )
            dict entry(
               string "SoftwareVersionNumber"
               variant                   string "53"
            )
            dict entry(
               string "Interfaces"
               variant                   array [
                     string "org.ofono.VoiceCallManager"
                     string "org.ofono.SimManager"
                     string "org.nemomobile.ofono.CellInfo"
                     string "org.nemomobile.ofono.SimInfo"
                  ]
            )
            dict entry(
               string "Features"
               variant                   array [
                     string "sim"
                  ]
            )
            dict entry(
               string "Type"
               variant                   string "hardware"
            )
         ]
      }
      struct {
         object path "/ril_0"
         array [
            dict entry(
               string "Online"
               variant                   boolean true
            )
            dict entry(
               string "Powered"
               variant                   boolean true
            )
            dict entry(
               string "Lockdown"
               variant                   boolean false
            )
            dict entry(
               string "Emergency"
               variant                   boolean false
            )
            dict entry(
               string "Revision"
               variant                   string "waipio.gen-10361-53"
            )
            dict entry(
               string "Serial"
               variant                   string "XXXXXXXXXX"
            )
            dict entry(
               string "SoftwareVersionNumber"
               variant                   string "53"
            )
            dict entry(
               string "Interfaces"
               variant                   array [
                     string "org.ofono.RadioSettings"
                     string "org.ofono.NetworkMonitor"
                     string "org.ofono.IpMultimediaSystem"
                     string "org.ofono.SupplementaryServices"
                     string "org.ofono.NetworkRegistration"
                     string "org.ofono.CallSettings"
                     string "org.ofono.CallVolume"
                     string "org.ofono.CellBroadcast"
                     string "org.ofono.SimToolkit"
                     string "org.ofono.Phonebook"
                     string "org.ofono.ConnectionManager"
                     string "org.ofono.SmartMessaging"
                     string "org.ofono.PushNotification"
                     string "org.ofono.MessageManager"
                     string "org.ofono.CallBarring"
                     string "org.ofono.CallForwarding"
                     string "org.ofono.NetworkTime"
                     string "org.ofono.SmsHistory"
                     string "org.ofono.SimAuthentication"
                     string "org.ofono.MessageWaiting"
                     string "org.ofono.AllowedAccessPoints"
                     string "org.ofono.VoiceCallManager"
                     string "org.ofono.SimManager"
                     string "org.nemomobile.ofono.CellInfo"
                     string "org.nemomobile.ofono.SimInfo"
                  ]
            )
            dict entry(
               string "Features"
               variant                   array [
                     string "rat"
                     string "ussd"
                     string "net"
                     string "cbs"
                     string "stk"
                     string "gprs"
                     string "sms"
                     string "sim"
                  ]
            )
            dict entry(
               string "Type"
               variant                   string "hardware"
            )
         ]
      }
   ]

with several interesting details.

For ril_0, properties are as expected:

   array [
      dict entry(
         string "Present"
         variant             boolean true
      )
      dict entry(
         string "CardIdentifier"
         variant             string "XXXXXXXXXXX"
      )
      dict entry(
         string "SubscriberIdentity"
         variant             string "XXXXXXXXXXX"
      )
      dict entry(
         string "ServiceProviderName"
         variant             string "Tele2 EE"
      )
      dict entry(
         string "FixedDialing"
         variant             boolean false
      )
      dict entry(
         string "BarredDialing"
         variant             boolean false
      )
      dict entry(
         string "MobileCountryCode"
         variant             string "248"
      )
      dict entry(
         string "MobileNetworkCode"
         variant             string "03"
      )
      dict entry(
         string "SubscriberNumbers"
         variant             array [
            ]
      )
      dict entry(
         string "LockedPins"
         variant             array [
               string "pin"
            ]
      )
      dict entry(
         string "PreferredLanguages"
         variant             array [
               string "et"
               string "ru"
               string "en"
            ]
      )
      dict entry(
         string "PinRequired"
         variant             string "none"
      )
      dict entry(
         string "Retries"
         variant             array [
               dict entry(
                  string "pin"
                  byte 3
               )
               dict entry(
                  string "pin2"
                  byte 3
               )
               dict entry(
                  string "puk"
                  byte 10
               )
               dict entry(
                  string "puk2"
                  byte 10
               )
            ]
      )
      dict entry(
         string "CardSlotCount"
         variant             uint32 1
      )
      dict entry(
         string "ActiveCardSlot"
         variant             uint32 1
      )
   ]

For ril_1, eSIM on this device, we have dbus-send --system --print-reply --dest=org.ofono /ril_1 org.ofono.SimManager.GetProperties:

   array [
      dict entry(
         string "Present"
         variant             boolean false
      )
   ]

I think that this difference leads to Lipstick being stuck. Some debugging is described in the message below

Tracing issue to PinQueryAgent

As I don’t have access to lipstick-jolla-home-qt5 - this one is still not open sourced yet, I inserted the following debug message into /usr/share/lipstick-jolla-home-qt5/lockscreen/LockScreen.qml:

Latch {
                id: systemStarted

                // value: (!startupWizardExpiry.running || Lipstick.compositor.appLayer.opaque)
                //        && (PinQueryAgent.simStatus != PinQueryAgent.SimUndefined || PinQueryAgent.simPinCompleted)

                value: {
        var startupReady = (!startupWizardExpiry.running || Lipstick.compositor.appLayer.opaque)
        var simStatusKnown = (PinQueryAgent.simStatus != PinQueryAgent.SimUndefined)
        var simPinCompleted = PinQueryAgent.simPinCompleted
        var result = startupReady && (simStatusKnown || simPinCompleted)
        console.log("systemStarted:",
                    "startupWizardExpiry.running =", startupWizardExpiry.running,
                    "appLayer.opaque =", Lipstick.compositor.appLayer.opaque,
                    "startupReady =", startupReady,
                    "simStatus =", PinQueryAgent.simStatus,
                    "SimUndefined =", PinQueryAgent.SimUndefined,
                    "simStatusKnown =", simStatusKnown,
                    "simPinCompleted =", simPinCompleted,
                    "result =", result)
        return result
    }
            }

In this QML, we have systemStarted.value used in several locations, including for

PageBusyIndicator {
                id: waitingSystemStart
                running: !systemStarted.value
...

When I have 2 SIM modems enabled, I get the following output on boot:

May 17 13:34:19 Xperia1IV lipstick[7119]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 0 SimUndefined = 0 simStatusKnown = false simPinCompleted = false result = false
May 17 13:34:19 Xperia1IV lipstick[7119]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 0 SimUndefined = 0 simStatusKnown = false simPinCompleted = false result = false

# after ofono stop

May 17 13:37:48 Xperia1IV lipstick[7119]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 0 SimUndefined = 0 simStatusKnown = false simPinCompleted = true result = true

With a single SIM enabled, all works:

May 17 14:08:01 Xperia1IV lipstick[6876]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 0 SimUndefined = 0 simStatusKnown = false simPinCompleted = false result = false
May 17 14:08:01 Xperia1IV lipstick[6876]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 0 SimUndefined = 0 simStatusKnown = false simPinCompleted = false result = false
May 17 14:08:01 Xperia1IV lipstick[6876]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 1 SimUndefined = 0 simStatusKnown = true simPinCompleted = false result = true

# after inserting PIN:

May 17 14:08:40 Xperia1IV lipstick[6876]: [D] expression for value:71 - systemStarted: startupWizardExpiry.running = false appLayer.opaque = false startupReady = true simStatus = 1 SimUndefined = 0 simStatusKnown = true simPinCompleted = true result = true

From this I conclude, that something in PinQueryAgent keeps PinQueryAgent.simStatus == PinQueryAgent.SimUndefined in this case.

Maybe someone at Jolla can look into it and make sure that the PinQueryAgent.simStatus would leave SimUndefined state? Or any other suggestions?