My NetworkManager randomly empties
/etc/resolv.conf for no apparent reason. After connecting to a network, the file contains whatever was obtained via DNS. Usually it keeps its contents, but sometimes it randomly empties itself. I notice because I randomly loose Internet connectivity (at least for non-cached websites) and when looking in the file at that time, it's completely empty.
I would use Google's DNS and make the file unreadable (or stop NetworkManager from editing the file at all, I think I saw an option for that) but using a local DNS server is actually useful when you use things like
ssh me@myandroid (where
myandroid is a local hostname).
It happens on all networks: at home, with my mobile hotspot, in school, etc. It does not happen on a specific moment as far as I can tell. Sometimes I might say it's bad signal causing it somehow, but that does not always seem to be the case. I'm using Debian testing (stretch) with Cinnamon 2.6.13 and NetworkManager 1.0.6.
Why does this happen and how can I fix it?