In #28624 (moved), tor was changed to remember dormant state across restarts. Since Tor Browser in nearly every case is started by a real person who expects to access one or more websites after starting the browser, it makes sense to ask tor to come out of dormant mode every time we start tor.
This can be done by issuing a SIGNAL ACTIVE control port command, although we could also ask the network team to add a torrc option to get this behavior.
I filed #29357 (moved) to ask the Network Team for an ActiveOnStartup config option. If that is added to tor, we can simple add a line like this to our torrc-defaults file:
ActiveOnStartup 1
We need to be careful not to ship this patch if we are not using tor 0.4.x.
Also, should I open another ticket to solve this for TBA? Does it use a torrc-defaults file or do we need to use a different technique on Android to address this issue?
Trac: Status: new to needs_review Keywords: TorBrowserTeam201904 deleted, TorBrowserTeam201904R added
I forgot to mention that to test this you can add a line like the following to your torrc:
DormantClientTimeout 600
This will cause tor to enter dormant mode after 10 minutes with no client-initiated network activity (this is the minimum allowed setting). If you are watching, you will see a message like the following when the transition to dormant mode occurs:
Apr xx xx:00:00.000 [notice] No user activity in a long time: becoming dormant.
Then you can exit and restart Tor Browser and make sure tor leaves dormant mode (it will be obvious if it does not, because bootstrapping progress will stay at 0%).
Looks good to me. Cherry-picked to master (commit e7c10d72d80c3226802c521b2c591d21dcb2e37f) and marking for backport once we switch 8.5 to the 0.4.x series.
We need to be careful not to ship this patch if we are not using tor 0.4.x.
Also, should I open another ticket to solve this for TBA? Does it use a torrc-defaults file or do we need to use a different technique on Android to address this issue?
We don't ship a torrc-defaults file on our own in the mobile build, thus I opened #30380 (moved) for the mobile part.