Nightmare gov. two new parms added!
+ more "low mem kill" settings ...
+ "With the default values of sending 9 probes with 75 seconds for each, it would take approximately 11 minutes before the connection is timed out ... "

now we have 3 * 20 seconds => 1m [need testing]
+ "tcp_keepalive_time

The tcp_keepalive_time variable tells the TCP/IP stack how often to send TCP keepalive packets to keep an connection alive if it is currently unused. This value is only used when keepalive is enabled.

The tcp_keepalive_time variable takes an integer value which is counted in seconds. The default value is 7200 seconds, or 2 hours. This should be a good value for most hosts and will not take too much network resources from you. Do not set this value to low since it will then use up your network resources with unnecessary traffic."

... now we have 30m for screen on and 2h for screen off [need testing]
+ more debug, if we need it ...
+ refactoring "KSM"-function ...
+ fix ...
Cortex SLEEP/WAKEUP functions improved thanks to @voku !