base-files: Increase failsafe trigger wait time from 2 to 4 sec
Increase the failsafe waiting timeout period from 2 seconds to 4 seconds.
Since commit 29207748b in 2015 we have had a rapid LED blinking indication for the failsafe triggering period. But the really short timeout of 2 seconds requires snappy reaction time from the user to notice the rapid LED blinking and to push button inside the short window.
Relax the timeout to 4 seconds, which more easily allows to notice the change in LED blinking and push a button.
Note, this will increase the booting time by two seconds, but that should not be noticeable by most users (when compared to the total length of the boot process).
I have carried this in my own build for years, but thought to "upstream" it now.
what would be far more ideal, that we first listen for the trigger, do some early boot stuffs in parallel, and only then disable the trigger; but not sure if our init system can handle that ...
@hnyman can you give us some feedback also about #10235 Not really aware of these configs but from what i can see the wait time is used for both button and key press so setting it to 0 effectively disable failsafe?
@hnyman can you give us some feedback also about https://github.com/openwrt/openwrt/pull/10235 Not really aware of these configs but from what i can see the wait time is used for both button and key press so setting it to 0 effectively disable failsafe?
I haven't really looked for what happens if the timeout is set to 0.
But here is my quick take on the code:
The complete disabling is (since b4e33a1c in 2016) meant to happen with TARGET_PREINIT_DISABLE_FAILSAFE, not with setting the time to 0.
Looking at the code touched by #10235, I think that @aparcar is partially right. There is likely an unnecessary 1 sec wait even when timeout is set to 0, due to https://github.com/openwrt/openwrt/blob/master/package/base-files/files/lib/preinit/30_failsafe_wait#L28 that sets it to at least 1 sec.
To me it looks like @blogic has designed b4e33a1c so, that even if the failsafe is disabled, key presses are monitored for a possible setting of debug level.
Any chance of a verdict on this PR?
Personally, I am fine with increasing the wait time cause honestly 2 seconds is really short.