![]() |
Re: Overzealous suspend everything watchdog [workaround included]
Quote:
|
Re: Overzealous suspend everything watchdog [workaround included]
Quote:
Quote:
I made simple daemon which logs timestamp to a file and sleeps 10 seconds. When i have ssh open (from my pc to the phone) it does not miss a single entry. If if disconnect ssh, it will start extending the 10 sec sleep to like 5 minutes. Just to be sure, i commented ClentAliveInterval and restart sshd, ssh connection comes non-responsive and timestamps are not appearing every 10sec even when the ssh is open. (note: waving your hand over the proximity sensor wakes the phone) |
Re: Overzealous suspend everything watchdog [workaround included]
having the proximity sensor covered disables double-tap to unlock, so that is probably why it is waking the phone
|
Re: Overzealous suspend everything watchdog [workaround included]
1 Attachment(s)
Quote:
It does not terminate the connection when I wake it up manually but I presume that's because sshd is using a monotonic clock (which does not advance while suspended). Effectively, not only is the SbJ not waking up, but when it eventually does (e.g. because of power btn or network traffic) for the sshd daemon only a second or two will have passed, so it won't send the keep alive. The attached screenshot shows a capture of the traffic generated with ClientAliveInterval = 5, ClientAliveCountMax = 3. .1.13 is the Sbj while .1.3 is a workstation. It sends the first few keepalives correctly (every 5 seconds) until screen blanks, and it immediately suspends, missing the keep alive at t=15. At that point, things go random/downhill. It spent more than 5 minutes with no traffic at all after t=192 (I had to stop capturing). I suggest you verify with a network sniffer to check what is going on. Note that you can simulate a similar behavior to what you want by manually patching the SSH server to use wakelocks (this is similar to what several Android forks do). But the builtin SSHD does certainly not do this. (And besides, that is still problematic as the moment you logout everything you were doing stops). |
Re: Overzealous suspend everything watchdog [workaround included]
Quote:
If the process (e.g. Skype answering to TCP traffic) does not have enough time, the phone may very well suspend while Skype is still trying to show its UI, missing the incoming call altogether. (Sounds terribly racy to me, but I suppose that with a big enough timeout chances for a race condition are minor. Yet another reason Android's power management _sucks_). |
Re: Overzealous suspend everything watchdog
Quote:
Does that mean I will have to include the entire source tree of libiphb in my project because it's not white-listed in harbour? |
Re: Overzealous suspend everything watchdog [workaround included]
Another piece of data is that setting mce's policy to early seems to just keep the "mce_display_on" wakelock on even if the display is not on. That is the reason it feels the same as just raising a wakelock, because that's what it seems to be :)
|
Re: Overzealous suspend everything watchdog
Quote:
|
Re: Overzealous suspend everything watchdog
Quote:
I tried to dynamically link to libiphb and submitted it to Harbour. Lets see what happens ;) At least my app works now, and doesn't do too many wakeups. |
Re: Overzealous suspend everything watchdog
Quote:
It should be quite easy to use in any app if any ones interested: https://github.com/tanghus/kitchen-t.../src/insomniac |
All times are GMT. The time now is 02:16. |
vBulletin® Version 3.8.8