Task scheduling when device is locked and not charging

asked 2013-12-28 20:09:15 +0300

axaq gravatar image

updated 2014-01-10 21:23:58 +0300

lk gravatar image

I understand power consumtion reasons to change kernel scheduling if the device is locked (black screen).

I like to run simple shell commands or scripts via ssh connection also if the device is locked. But "sleep 1" could delay for a minute or longer in locked state. Also "vmstat 1" or "top" seem to hang.

Login with ssh could take more than 2 minutes! And you shouldn't scp files during locked state without charger connected. It would take ages ...

But if I'm pinging the device from outside every second it generates regular interrupts/events and the above commands don't hang.

How to avoid this power saving feature for shell commands. Any links or hints from MER or NEMO sites?

edit retag flag offensive close delete

Comments

Did you see in dmesg output any PM suspends ?

rsainio ( 2013-12-28 20:41:00 +0300 )edit

does this have the same effect if you play music and lock the device?

AL13N ( 2013-12-28 21:10:20 +0300 )edit

@rsainio: I do see "request_suspend_state: sleep (0->3) ..." when locked (black screen) and "request_suspend_state: wakeup (3->0) ..." when lockscreen is visible (backlight on).

axaq ( 2013-12-29 03:26:27 +0300 )edit

@AL13N: Playing music and locking the device doesn't show the hanging effect. It generates enough IO events like the ping. But dmesg shows the same request_suspend_state entries.

axaq ( 2013-12-29 03:29:07 +0300 )edit

Charging the device also doesn't show the hanging effect.

axaq ( 2013-12-29 03:34:22 +0300 )edit

Correcting myself... I find that if the device has sat idle for a while (a few minutes), ssh login takes long. Also, with the screen off, anything that uses timers will take hideously long. This can be verified with

perl -e 'printf("%d\n", sleep(10));'

dmesg output available if interested.

jsiren ( 2013-12-31 20:25:46 +0300 )edit

@Milhouse i'm not entirely sure this is a duplicate, plus, you're referring to a person bug issue from someone, and considering wlan connectivity is shady by definition... it may be too early to decide this as duplicate. better remove for now.

AL13N ( 2014-01-01 23:38:53 +0300 )edit

Take a look at this thread: http://talk.maemo.org/showthread.php?t=92183

Cermit ( 2014-01-09 20:49:42 +0300 )edit