Maxdamantus | Hmm.. Something I'm noticing first day of use.. Android seems to somehow freeze my non-root processes in Debian while the screen is locked, so `sleep 60` will wait indefinitely, and my ssh client always loses connection by the time I next look at it. | 01:36 |
---|---|---|
Maxdamantus | Guess it's part of some "wake lock" mechanism.. will neet to look into making my uids acquire it. | 01:42 |
bencoh | Maxdamantus: yeah, wakelock is the way to go in android, but you'll probably get awful battery time if you lock anytime you're ssh'ed | 10:00 |
bencoh | well, unless you do it in a smart way, which might be possible (maybe) | 10:01 |
Maxdamantus | Yeah, it was the wake lock thing (which actually applies device-wide, so since I wasn't running anything that had acquired a wake lock, the entire device was sleeping). I noticed that Termux has a simple UI for acquiring a wake lock, so I had that on. | 10:12 |
Maxdamantus | Though the connection was still dying for some reason after about 4 minutes. | 10:13 |
Maxdamantus | I might just try running httptunnel or something, since I think that is able to reestablish a connection. | 10:14 |
Maxdamantus | or could probably use mosh, but that seems yucky abstraction-wise. | 10:14 |
bencoh | Maxdamantus: assuming you fixed the wakelock issue (btw, it prevents entering suspend-to-mem), you might want to try using ServerAliveInterval to send keepalive packets | 10:25 |
Maxdamantus | Yeah, I tried that. | 10:26 |
bencoh | oh? | 10:26 |
bencoh | and? | 10:26 |
bencoh | I wonder if something (kernel / userland) kills usb after some time (either when seeing no traffic, but then keepalive should fix that, or when userspace assumes the phone is 'idling', but that sounds silly) | 10:27 |
Maxdamantus | With 60-second keepalives, the connection lasts about 3 minutes before a read timeout. With a 5-second keepalive, it lasts about the same amount of time, though in that case the client closed the connection after 3 unacknowledged keepalives. | 10:31 |
Maxdamantus | and I don't want to waste power with 5-second keepalives anyway. Would prefer the httptunnel solution. | 10:32 |
Maxdamantus | The httptunnel solution would be nice for other reasons. | 10:32 |
Maxdamantus | eg, switching between cellular/wifi, or changing IP addresses, other lacking connectivity scenarios. | 10:33 |
Maxdamantus | I could probably get away with just using a really long timeout in httptunnel and not bothering with the wakelock thing, so it won't use any power until I unlock the screen, and then it will download all the terminal updates. | 10:34 |
bencoh | yeah | 10:35 |
bencoh | tbh you could raise your ServerAliveCountMax as well | 10:35 |
Maxdamantus | Maybe for the 5-second thing, but I suspect it will time out the same way as with the 60-second keepalives. | 10:36 |
bencoh | hmm | 10:36 |
Maxdamantus | It's just that with the 5-second one, the client will close the connection itself after only 15 seconds of inactivity, instead of waiting for the kernel or whatever to decide that something's timed out. | 10:36 |
Maxdamantus | (using the presumably default ServerAliveCountMax=3) | 10:37 |
bencoh | what kind of interface do you see on the host? usbnet? | 10:38 |
Maxdamantus | The host? You mean ssh server? It's just my home computer, openssh sshd. | 10:39 |
bencoh | I meant the computer connected to the phone, but I assumed it was usb | 10:39 |
bencoh | looks like you're actually using a wireless connection :) | 10:40 |
Maxdamantus | There's no USB. No computer connected to the phone. ssh client is running in my debian environment on the phone. | 10:40 |
Maxdamantus | cellular connection. | 10:40 |
bencoh | ah | 10:40 |
bencoh | the client sits on the phone, not the other way around; I got it all wrong :) | 10:40 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!