We have moved to a new Sailfish OS Forum. Please start new discussions there.
21

BUG: shaky SSH connection via WLAN

asked 2013-12-28 19:31:13 +0200

hardcodes.de gravatar image

Hi there,

if I connect via WLAN to the device the connection is often extremely slow (like you type something and 10 seconds happens nothing) and also very often disconnected. This happens mainly in my home WLAN where all the computers don't complain in any corner of the apartment. First I thought of some keep-alive packet that needed to be sent to the device but then fit often happens while I am doing stuff on the device. This also happens while charging and seems independent of a sleeping display.

edit retag flag offensive close delete

Comments

I believe this is due to timers and an effort to save power by not multitasking apps properly when the screen is off - notice how the perl sleep for 10 seconds actually takes 117 seconds of wall clock time when the screen is OFF (and the device isn't connected to USB or AC). I too notice the sleepy ssh when the device is on WLAN/battery and the screen is off. I was told this was due to my WiFi but clearly that is not the cause as it is a problem that affects a number of people.

EDIT: I notice you say it happens when you are using the device - dunno then.

Milhouse ( 2013-12-28 20:29:54 +0200 )edit

Using the device was meant as doing something via SSH, not as in tapping/swiping on the display.

hardcodes.de ( 2013-12-28 20:35:13 +0200 )edit

Ah right, in that case does the responsiveness of your SSH connection improve by activating the device display? Mine does, but I'd like SSH to remain responsive even when the display is off. Connecting a USB cable (for network or power, or both) would also solve the problem, but isn't really an option in many cases.

Milhouse ( 2013-12-28 20:36:13 +0200 )edit

Got to check that out in detail. I also like that SSH session to stay alive with a sleeping display. Ok, that may drain the battery a bit more but that would be on purpose.

hardcodes.de ( 2013-12-28 20:39:46 +0200 )edit

pinging the device continuously make it bit more responsive

onion ( 2013-12-28 22:43:42 +0200 )edit

2 Answers

Sort by » oldest newest most voted
7

answered 2013-12-31 15:05:28 +0200

kimmoli gravatar image

This seems to be a promising solution:

in phones /etc/ssh/sshd_config i uncommented following parameters, and changed interval to 15 secs.

ClientAliveInterval 15
ClientAliveCountMax 3

(I also tried putty keepalive null packets but it didn't help.)

edit flag offensive delete publish link more

Comments

this seems to help.. thanks!

ludwig ( 2014-08-10 12:04:50 +0200 )edit

Will the file be rewritten on update?

Vuubi ( 2014-12-24 12:49:50 +0200 )edit
5

answered 2013-12-28 21:41:33 +0200

lbt gravatar image

Yep, I get this too - it's a bit annoying. I know a fair few devs internally get hit by it too - but our priority was more user-level issues. I'm sure it'll get resolved.

It is due to the device going to sleep a little too deeply and not recognising the ssh session as activity.

The current workaround is simply to keep the screen on. I know that's not ideal.

https://together.jolla.com/question/2433/display-sleep-after-never-option-ie-display-always-on-is-needed/ would help too

edit flag offensive delete publish link more

Comments

1

as a workaround for time being you could use mosh (download from here) instead of ssh.

tigeli ( 2013-12-29 01:58:32 +0200 )edit
2

an other work around against blanking since you are already in developer mode:

pkcon install mce-tools
mcetool --set-never-blank=enabled

but then the device really never blanks! so after your devel session you should do:

mcetool --set-never-blank=disabled
Kontio ( 2013-12-29 15:21:04 +0200 )edit

This does not work for me. With mcetool I can get the screen to stay on, but ssh connection still drops into sleep mode every once a while. Connection stays alive, but you are essentially typing blind and waiting 20 seconds for the characters to appear.

pojanisu ( 2013-12-30 17:34:26 +0200 )edit

Same issues here - annoying. I noticed that keeping phone in charger keeps the SSH running much better. Also if you start (your own) app from command line (for testing to see prints), and screen is off, it most propably will not work properly.

kimmoli ( 2013-12-31 01:02:05 +0200 )edit

As already mentioned by tigeli, mosh seems to be a good workaround for this problem. I built it on the phone from the sources provided by MIT and tested. There's still some delay while typing, but not half as bad as with ssh.

onurati ( 2014-01-03 17:42:56 +0200 )edit
Login/Signup to Answer

Question tools

Follow
8 followers

Stats

Asked: 2013-12-28 19:31:13 +0200

Seen: 942 times

Last updated: Dec 31 '13