Symptoms : After some random time (hour, hours, day), I can't ssh or ping to Rpi anymore.
Solutions : Reboot. Yeah, this works until next unresponsive state.
Ping FROM Rpi to home gateway or another PC activates WiFi, and this works also for some random time until it again become unresponsive.
I have lurked many places on the Internet and tried the solutions:
1. Buy better power adapter --
Tried 1A,2A, 3A, and now BlitzWolf 4A adapter. Behaviour is always the same.
2. Use some CheckWifi.sh script --
This script pings default gateway and if it fails, it reboots or reloads wifi interface (depends on the version of the scripts on the internet). This does not work, since Rpi does not have a output ping problem.
Interestingly, when script pings, it does not solve unresponsive state to Rpi. Maybe i should try to use more than 4 ping packets. Even so, I don't like this "solution".
3. Turn wifi power save state off --
Done it with, iwconfig, iw, /etc/network/interface, /etc/rc.local. Does nothing.
Someone stated that Rpi doesn't even have WiFi power state idle mode, that this is useless, since it is already disabled in kernel driver. Whatever.
4. Use different versions of Raspbian Stretch images --
I didn't try rpi-update, since it says you should do it only if you exactly know why. Should I try it?
Please, provide some other solutions, so I can try them, I will edit this post and give the report it it works or not.