The #1 is just about changing the Settings menu in some of its parts therefore I think that Patch Manager is the right tool to deliver them.
Alternatively, I found that qCommand can do the job of setting the power energy saving battery threshold (and create a related icon) but changing the menu would be more stylish.
The #2 cannot be implemented with a patch by Patch Manager and I already got it as soon as I have tried to do a patch for Patch Manager. Thanks.
@piggz → The sleep 3 is a waste of time and having to repeat the restart means that restart does not work correctly and it should be fixed.
@ichthyosaurus → It would be nice to have a patch in Patch Manger to remove that 2 lines of code. The diff patch could be downloaded from here while the Patch Manager patch from here:
Obviosly, if the patch improves the performance and does not introduce regressions then it should be integrated with the SailFish Utilities. Unfortunately, in PM2 the fingerprint is missing among the category therefore I choose others
About the FP reader restart
Looking at the running process, I found these about FP reader:
Probably the restart from Utilities will restart also the QT5 plug-in, I did not verified the code of service_do function but considering the parameters passed to the function, it is about systemctl.
About power saving on Xperia 10 II
My Xperia 10 II is running with energy power saving alway active and at the beginning it shown some troubles about BT and FP reader awakening which forced me to reset that sub-systems.
I should not say this because it will be considered trolling but…
After having configured some options about suspending/awakening hardware subsystems in Android while I was running the Android Support, the BT and FP reader never got stuck anymore even with AS stopped. However, the counterside is that my smartphone - when left alone without no any interaction or connections active - started to be busy in suspend/awake the systems continuosly loading the CPU for 25% but with no impact on the battery discharge rate (less than 1%) because the CPU seems busy by System Monitor handling I/O but no power is drained because there is no code/math processing.
In fact, the dmesg -Hw shows a lot of this stuff on the WARN level and above:
If what written above is correct (because correlation does not necessarly means cause-effect relationship) then SFOS should correctly set the FP reader about suspend/aswakening. About BT, one single event even in conjunction with the FP reader failure make the assumption statistically too weak,
Considering how fast is the FP reader service in being started
[root@sfos defaultuser]# systemctl stop sailfish-fpd
[root@sfos defaultuser]# time systemctl start sailfish-fpd
real 0m 0.16s
and the few static places in which it is needed 1. unlock the screen and 2. add a new fingerprint, I think that it would a sane policy to start it only when it is necessary and stop immediately after. By default do start it at the boot time.
Unlock the screen:
is there a PIN set?
no: proceed
is there a FP set, at least?
no: wait for the PIN
start the FP service
does unlock succeed?
no: wait for unlock or timeout
timeout exipired?
stop the FP service
stop the FP service
Add a new fingerprint:
start the FP service
acquire the fingerprint
stop the FP service
Probably implementing the logic about unlocking the screen would be easier that the one described because those check are just done for sure. Therefore there are just three points to change: start, stop and stop. Instead, the logic for adding a fingerprint is straightforward.