I moved this problem from a previous thread because I have isolated the problem. When my computer boots, I can see that the regulatory domain is set to US.
sudo iw reg get
country US: DFS-FCC
I can successfully connect to my network, and ping other devices on the network. After about 4 minutes, I lose my network connection and my regulatory domain resets to global.
sudo iw reg get
country 00: DFS-UNSET
I have had trouble setting my regulatory domain using crda. The file /etc/default/crda is populated appropriately:
REGDOMAIN=US
However the output of $crda is always:
COUNTRY environment variable not set.
My workaround was to add a config file for the cfg80211 module, at /etc/modprobe.d/cfg80211.conf, with the following:
options cfg80211 ieee80211_regdom=US
The cfg80211 module appears to successfully set the regulatory domain, until some module which is loaded at ~4 minutes overrides the reg domain. How can I track down and change the module which overrides the reg domain?
options cfg80211 ieee80211.conf
I think it should be:options cfg80211 ieee80211_regdom=US
Is that what you meant? – chili555 Apr 22 '18 at 22:49sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*
and restart NM:sudo service network-manager restart
– chili555 Apr 22 '18 at 22:56iw reg get
= US until about 5 minutes in when it is reset to global. With powersave = ON, I can ping my router until ~5 minutes. With powersave = OFF, I am "connected" to the network but I cannot ping my router at all. I checked the dmesg logs and noticed that this message occurs periodically:[ieee80211 phy0: Hardware restart was requested
. Is this normal? – fermi Apr 22 '18 at 23:51