Device suspend and (stable) longterm TCP connections

Hi

I started this conversation month ago at the sailfish-devel mailingslist. Now, lets continue here.

With newer Sailfish OS version (starting from 3.3.0.16) I noticed a regular drop of an established TCP connection during device sleep in the Shmoose xmpp client [1]. I was able to prevent his by triggering the iphbd regularly in the previous versions. This seems not to work as expected anymore.

The only way to get a stable long-term TCP connection with the current SFOS releases is by using this on the command line:

mcetool -searly

This disables late suspend of the device. Battery drain is only slightly more at my device with this setting.

Two questions on this:

  • Has this changed from the previous SFOS versions? I did not need this for Shmoose in the past.

  • Can this setting be applied to SFOS programmatically within an app with no special permissions? How would one do this?

Best regards
Geobra

[1] https://github.com/geobra/harbour-shmoose

2 Likes

Followup on this.

Seems like Whisperfish [1] has the same issues.
Is the source of mcetool available somewhere so we can have a look what this tool does in the SFOS system?

[1] https://gitlab.com/rubdos/whisperfish

mcetool sources are in SailfishOS gitlab, if I’m not mistaken:

Thank your for this!
After reading the code one can see that it uses D-Bus communication to configure the required suspend mode. I will try if this can also be triggered from within apps.

1 Like