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:

1 Like

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.

2 Likes

I am playing with an API requester that is pulling in some data regularly and I noticed that its complete suspended when the device is locked and not plugged to the power supply. @geobra did you found a solution yourself for your scenario? I also wonder what essentials services/processes do to keep alive (any proc priority config)?.

I also hate it that ssh is laggy when device is sleeping.
Is there any switch to disable deep sleep when there’s an incoming ssh session active?

mcetool -s disable or -s early on session start, the reverse on logout.

1 Like