Patches by ichthyosaurus

I can’t reproduce it… “E” for example doesn’t have that many alternative entries in the popup. Does it happen when you press the character key or when you press the space bar? Or rather: what exactly happens?

Can you snap a screenshot?

I’m trying to do a screenshot, but now it’s very hard, because I must press a vowel, then very quickly the space (in order to reproduce the bug) and then the screenshot button…almost impossible!! :rofl:
I made a screen recorded, but it’s too big to attach here. Maybe I can screenshot the bug through the video, if I can :thinking:
Seem the same bug that I wrote few posts above, but now there is the combination of vowel+space. Here there are the screenshots :sunglasses::




2 Likes

Regarding your no home carousel patch @ichthyosaurus : I really like it a lot, but I would like to have the partnerspace feature included. If my interpretation of the code_diff is correct, the relevant code parts for the switching between the events screen and the home screen are located in the lines between 79 and 163. The partnerspaces seem to be encountered for partially in the following lines:
function activatePartnerWindow(launcherItem) {

  •    for (var layer = switcherLayer.rightItem; layer != eventsLayer; layer = layer.rightItem) {
    
  •    for (var layer = switcherLayer.rightItem; layer && layer != eventsLayer; layer = layer.rightItem) {
           if (!layer.launcherItem || layer.launcherItem.exec != launcherItem.exec) {
               continue
           } else if (!layer.window.window) {
    

@@ -87,7 +87,7 @@ Pannable {

 function _findNextLayer(launcherItem) {
     var index = partnerspaces.indexOf(launcherItem)
  •    for (var layer = switcherLayer.rightItem; layer != eventsLayer; layer = layer.rightItem) {
    
  •    for (var layer = switcherLayer.rightItem; layer && layer != eventsLayer; layer = layer.rightItem) {
           if (layer.launcherItem && index < partnerspaces.indexOf(layer.launcherItem)) {
               return layer
           }
    

However, the swiping to the right from the Home screen (where the potential partnerspaces would be) is suppressed by
@@ -210,7 +210,7 @@ Pannable {
objectName: “switcherLayer”

         leftItem:  eventsLayer
  •        rightItem: eventsLayer
    
  •        rightItem: null
    

Is it correct, that the “switcherLayer” is the home screen where the covers of running applications are displayed? Can you tell me, what the name of the corresponding layer for active partnerspaces would be? I guess I would need to put the rightItem: null into the latters definition instead of the switcherLayer. Sorry for my lack of understanding here, I have no experience using qml.

Uhm, I’ll have to investigate this further. I don’t use partnerspaces and I’m hesitant to mess with them because I need my phone :).

If are brave enough and you want to play around with it, I recommend you get the patch config file from here and follow the instructions here using sailfish-patch.

This way, you don’t have to change the diff but you can work with the actual QML files.

that’s a great help, thank you. I will try to work this out when I find some time.

1 Like

Hi Sailors, I have two patches to propose:

Both are related to improving the hardware support. Today, I got a brand new account in

To do my first try in producing a patch for the 2nd listed issue. I will try something basic but who has more experience could try to add in the Settings:System → Connectivity:Location menu a button to (dis/en)able and customise the A-GPS.

POST SCRIPTUM

I am adding a 3rd PatchManager patch proposal to develop

possibly to solve the sleeping problem instead of the mitigation

Thanks for the new ‘Settings lag’ patch. Nice fix.

It works for me on 4.4 btw, although the effect is a bit ugly as the entries appear in a flickering manner now.
It’s n an X10iii though which is faster than many of the older devices, so this may be less pronounced on those. (Also loading lag is less annoying on 10iii.)

2 Likes

Is it possible to get all notifications already expanded?

Is that it?

        objectName: "NotificationPreview_popupArea"
...
        width: displayWidth
        swipeDistance: notificationWindow.width
        height: expanded
                ? actionRow.y + (actionRow.visibleCount > 0 ? actionRow.height + Theme.paddingMedium : 0)
                : popupPreviewScrollContainer.height

It works also for me on 4.5.0.19, thanks! :blush:

However, it is particularly ugly the visual out come when I do

swift left->right in Settings:Systems

Three suggestions about it:

  1. shows the complete left tab and then populate it;
  2. population of that tab can be indefinitivly cached as long as the user does not add/remove apps.
  3. unless the apps are displayed in the same order/grid/folders of the apps menu, at least they should organised by alphabetic order.

About #3, doing:

Settings:System → Info:Utilities → Rebuilding the app registry

or a part of its code, would help?

All of these are out-of-scope of what a patch can do, considering the design of Settings.

1 Like

Thanks for the clarification. The thread title is “Patches by ichthysaurus”. He did some patches for PatchManagerand he might be interested in doing other similar/complementary.

As a general rule of thumb, if you like a proposal change that you like then you can share in the correct section. As fas as you link the original post, it is a good way of contributing with a minimum effort. :slight_smile:

I am well aware of OP’s contributions to the SFOS app ecosystem and community.
And yours.

You are out of place lecturing me (or anyone else) on what is appropriate to reply in a topic here, or what is feasible to expect in modifying SFOS through a patch or otherwise.

7 Likes

What’s OP meaning?

20 chars nedded

I don’t think either of these can be implemented as a patch. Patches are generally just an option for cosmetic changes (although cosmetic changes can be quite complex like the emoji keyboard patch). Both of these would need deeper changes in the system, which would have to be done by Jolla.

(In case you don’t know: you only need an account there if you want to publish patches…)

I recommend you use sailfish-patch and follow the instructions there. That should get you started :).

This shouldn’t be too hard, maybe you want to give it a try yourself. You’d have to add a button to the lockscreen, and use a DBus call to restart the service (this is the service, and here is an example of a DBus call from QML).

1 Like

Thanks, glad you like it :slight_smile: (and to hear that it actually works).

Yeah, I’m using an Xperia X and things are slooow…

That’s what I meant by “This doesn’t make the app more beautiful […]” in the description :wink: . Sadly, there’s nothing that can be done through a patch here. A proper fix would have to be implemented by Jolla, and it’s probably very low on their to-do list.

“OP” means “original poster”, i.e. me. And @nephros is right, these things are beyond the possibilities of a patch…

Yes, it’s possible :wink: . It’s a three-line fix, have fun.

1 Like

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. :slight_smile:

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.


About the service that you link to me

service_do restart sailfish-fpd
sleep 3
service_do restart sailfish-fpd

@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:

[root@sfos defaultuser]# ps | grep fpd
 2904 root     /usr/lib64/qt5/plugins/devicelock/encsfa-fpd --daemon
 4887 root     /usr/bin/sailfish-fpd --systemd
 4888 root     /usr/libexec/sailfish-fpd/fpslave --log-to=syslog --log-level=4
 4954 root     grep fpd

Restarting the service is quite immediate:

[root@sfos defaultuser]# time systemctl restart sailfish-fpd
real	0m 0.14s

To understand which processes were restarted I did a stop and a check:

[root@sfos defaultuser]# ps | grep fpd
 2904 root     /usr/lib64/qt5/plugins/devicelock/encsfa-fpd --daemon
 5107 root     grep fpd

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… :sweat_smile:

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:

[  +0.000236] ------------[ cut here ]------------
[  +0.000202] WARNING: CPU: 7 PID: 6013 at /home/abuild/rpmbuild/BUILD/kernel/sony/msm-4.14/kernel/mm/vmscan.c:1685 isolate_lru_page+0x1e0/0x1e8
[  +0.000365] ---[ end trace b94aa1c373c520dc ]---

[  +0.001869]  cache: parent cpu2 should not be sleeping

[  +0.026021] OOM killer enabled.
[  +0.000003] Restarting tasks ... done.
[  +0.022791] PM: PM: suspend exit 2023-06-18 08:17:15.039700682 UTC
[  +0.000003] PM: suspend exit
[  +0.045724] ## mmc1: mmc_gpio_set_uim2_en: gpio=101 value=1
[  +4.943132] PM: PM: suspend entry 2023-06-18 08:17:20.028365718 UTC
[  +0.000016] PM: suspend entry (deep)
[  +0.000010] PM: Syncing filesystems ... done.
[  +0.015110] Freezing user space processes ... (elapsed 0.040 seconds) done.
[  +0.040466] OOM killer disabled.
[  +0.000002] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[  +0.003784] Suspending console(s) (use no_console_suspend to debug)
[  +0.029206] Disabling non-boot CPUs ...
[  +0.002401] CPU1: shutdown
[  +0.005101] CPU2: shutdown
[  +0.004633] IRQ 7: no longer affine to CPU3
[  +0.000259] CPU3: shutdown
[  +0.004800] CPU4: shutdown
[  +0.003805] CPU5: shutdown
[  +0.003962] CPU6: shutdown
[  +0.004003] CPU7: shutdown
[  +0.003154] suspend ns:   30885642235516	suspend cycles:    1068241562170
[  -0.000010] resume cycles:    1069294245240
[  +0.000854] Enabling non-boot CPUs ...
[  +0.001628] CPU1 is up

[  +2.401109] somc_panel_color_manager: somc_panel_inject_crtc_overrides (788): Override: Already have original funcs! Is setup called twice??
[  +0.000435] somc_panel_color_manager: somc_panel_pcc_setup (886): Cannot read uv data: missing command

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,

Original hi-res image is here.

About FingerPrint reader service

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.

Hey @robang74 , I really recommend you check out sailfish-patch! You have many nice ideas and some of them shouldn’t be too hard to implement so it would be a great way for you to get into patching yourself :slight_smile: . I think that would give you the best results :wink: .

I’ll read the rest tomorrow…

2 Likes

I found that tool already. Thanks.

It is a good suggestion and it will teach me more about the internals of the GUI functioning. This can give me an insight about how to optimise it more in deep.

2 Likes

This is a dangerous feature because while you are working with the touch screen an expanded notification can pop-up under your finger.

sfos-patch-homescreen-notifications-always-expanded-screenshot-1

As you can see in this screenshot from the patch the expanded notification can offer buttons on which you may click inadvertently.