Comment 4 for bug 1321627

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote : Re: Wrong WWAN value in saved-states

In fact I did not restart immediately urfkill, I waited for around a minute and did some checks between each command in the bug description.

The problem is not that the file is written just on shutdown, although I would argue that it makes sense to write it each time the user modifies a setting, to have the right values in the file in case urfkill crashes or the phone is switched off abruptly (say, removing the battery).

The issue is that you say that you write to the file the current state of the modem, not the *desired* state. IMO this is wrong, as it looks like urfkill uses the values in the file when it starts to set the state for the devices: if that is the case, the file should have the values that the user configured. Otherwise, when there is a problem with one device, we will not try to move it to the state configured by the user, but to the state it had when urfkill stopped. This is what is happening.

So I would say that there are 2 issues:

1.- Timeout when onlining the modem. This happens because MTK modems take more time to power on, and can be fixed easily incrementing this time. Answering your question, it is not related to having more than one modem: I tried with one modem and the behavior was the same.

2.- saved-states stores the current state of the devices instead of the configured state, so we do not get the right behavior when rebooting after a problem with a device