Check your WiFi card settings in your Computer/Laptop!

I couldn’t find a better location but “Ask Fedora”. Its not actually a question, but rather a suggestion.
Most WiFi cards have a “Country setting”. This setting determines the allowable frequency range (bands), gain and output power of the WiFi card depending on frequency band.
Mine was sitting as country on: CN (China) instead of AU (Australia).
You will see on the displayed outputs of my Laptop that these are very different, depending on country.
Here is what it was sitting on:

country CN: DFS-FCC
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5725 - 5850 @ 80), (N/A, 33), (N/A)
        (57240 - 59400 @ 2160), (N/A, 28), (N/A)
        (59400 - 63720 @ 2160), (N/A, 44), (N/A)
        (63720 - 65880 @ 2160), (N/A, 28), (N/A)

And this is what it should be for Australia:

iw reg get
global
country AU: DFS-ETSI
        (915 - 928 @ 8), (N/A, 30), (N/A)
        (2400 - 2483 @ 40), (N/A, 36), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5600 @ 80), (N/A, 26), (0 ms), DFS
        (5650 - 5730 @ 80), (N/A, 26), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 36), (N/A), AUTO-BW
        (5850 - 5875 @ 20), (N/A, 13), (N/A), AUTO-BW
        (5925 - 6585 @ 320), (N/A, 23), (N/A), NO-OUTDOOR
        (57000 - 71000 @ 2160), (N/A, 43), (N/A), NO-OUTDOOR

If you look at the 2.4 GHz band (2400 - 2483) China has an allowable power output of: 20dBm, while Australia has an allowable output of: 36dBm !
We also have bands that China doesn’t have, bands broken up different with their allowable power output …etc.

Here is an explanation what each part means:

  • global: Indicates that this is the system-wide framework configuration. Individual physical devices (phy#0) can sometimes list their own “self-managed” parameters underneath. [1, 2]
  • country US: The current active ISO 3166-1 alpha-2 country code. Code 00 denotes a restrictive fallback “World Roaming” domain used when no specific country is set. [1, 2, 3]
  • DFS-FCC: The regulatory body governing the rules (e.g., FCC for the US, ETSI for Europe). [1]

2. Frequency Bracket: (2402 - 2472 @ 40) [1]

  • 2402 - 2472: The allowed frequency range in Megahertz (MHz).
  • @ 40: The maximum allowed channel bandwidth in MHz (e.g., 20, 40, 80, or 160 MHz). [1, 2, 3, 4, 5]

3. Power and Antenna Limits: (N/A, 30)

  • First Parameter (N/A): Maximum antenna gain allowed in dBi (if specified by local laws).
  • Second Parameter (30): Maximum allowable Transmit Power (TxPower) in dBm. A limit of 30 equals 1000mW (1 Watt). [1, 2, 3]

4. DFS Timeout: (0 ms) or (N/A)

  • The required dfs cac time (Channel Availability Check). If a radar signature is detected on this frequency, the card must listen silently for this exact duration before transmitting to verify the channel is clear. [1]

5. Regulatory Behavioral Flags

Flags at the end of a line place strict operational restrictions on those frequencies:

  • DFS: Dynamic Frequency Selection is mandatory. The card must actively monitor for radar signals (common on 5GHz bands).
  • PASSIVE-SCAN: Disable active probing. The card cannot transmit probe requests to find networks; it must wait and listen for a beacon.
  • NO-IBSS: Ad-hoc mode (Independent Basic Service Set) is banned. Direct device-to-device connections are prohibited.
  • NO-OUTDOOR: The frequency range is legally restricted to indoor deployments only.
  • PTMPT: Point-to-Multipoint architectures are permitted.
  • AUTO-BW: Automatically scale down bandwidth if interference is detected.<

To see what your card is set to: iw reg get

To set the card to your country (example): (only during your current session. A reboot would set it back to what it was before): sudo iw reg set AU
(AU being for Australia, set to your country’s specific code).

To make it permanent using nano is the easiest. Mine actually created a new file and checking after a reboot showed that the change is permanent.

So use: sudo nano /etc/sysconfig/regdomain

Now paste in (with your countries code) COUNTRY=>your country’s code<

Use CTRL+O to write it to the file and press Enter.
Then CTRL+X to get out of the editor.

Check that the country code has taken using iw reg get
You might want to check again the next time you reboot that it stuck.

Thank you for the detailed info on solving certain wifi issues. It is seldom that cards are sold and not configured for the country where used but obviously that is not always the case. :+1:

It seems to be happening far more often then we think.
I just checked my 5 year old Lenovo Legion Laptop and it has it to: Unset
This Laptop was ordered in Australia from Lenovo Australia.
Its running now KDE-LINUX
Wrong/missing frequency bands, wrong power settings etc.
I have to see if I can change it as its an immutable OS.

Should be possible since the file you created with nano is in /etc which is usually writable even on the immutable systems.

I assume you are running Kinoite on that laptop since you mentioned KDE and linux as well as immutable.

Nope…KDE is creating their own Distro.
It is actually called KDE-Linux, causing massive confusion with everybody. Its currently in “A” testing.
I am using it on my old Laptop for experimentation.

Interesting; I’d expect NetworkManager or some region thing OS-side to set it automatically?

My laptop’s unlocked BIOS settings allow selecting a region and setting various power limits on antennas/etc.

Same, I was surprised that Fedora didn’t set it during its initial setup when you select your region.

I Fedora, the wifi reg country setting is determined by the timezone setting. See the shell code at /usr/bin/setregdomain.

I had a look at it and yes…it should have done it…but it didn’t.
cat /usr/share/zoneinfo/zone.tab
Clearly shows Australia’s country code.
I just ran sudo /usr/bin/setregdomain
But this just implements it. I am not a programmer, so I don’t know how to show its output as it runs through the script…at least not on Linux.

It depends on the symbolic link /etc/localtime refers to the correct time zone file.

If you run sudo sh -x /usr/bin/setregdomain it will show exactly what the script does. Normally the script is run by udev as soon as a wireless device is detected.

Do you mean that it didn’t do it on Fedora, on KDE Linux, or both?

On Fedora

So I ran the command and here is the output:

sudo sh -x /usr/bin/setregdomain
Place your finger on the fingerprint reader
+ REGDOMAIN=/etc/sysconfig/regdomain
+ LOCALTIME=/etc/localtime
+ LOGGER='/usr/bin/logger -t wireless'
+ '[' -f /etc/sysconfig/regdomain ']'
+ . /etc/sysconfig/regdomain
++ COUNTRY=AU
+ '[' -n AU ']'
+ /usr/sbin/iw reg set AU
+ exit

So according to the output, it should have set it, exept…it didn’t
I had done multiple reboots and each time it was still on “CN”.
To me it looks like that there might be a bug in FC43/FC44.
setregdomain doesn’t appear to get triggered during the boot process.

You should get basically the same result if you remove the /etc/sysconfig/regdomain file again, that is: running /usr/sbin/iw reg set AU.

For me this has always worked and still do in Fedora 44.

The trigger is /usr/lib/udev/rules.d/85-regulatory.rules

# Set wireless regulatory domain at device creation
# For more information:
# 	man setregdomain

SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/usr/sbin/setregdomain"

which will activate setregdomain when the cfg80211 kernel modules is loaded as part of the wifi drivers.

You can check if it is run in journalctl with a line like

 setting regulatory domain to NL based on timezone (Europe/Amsterdam)

If /usr/sbin/iw reg set AU doesn’t set the regulatory domain, there must be something special with the hardware or device drivers.

I wonder if the regulatory domain is already set by the installer.

Could not find a line similar as below through 2 days/reboots of journalctl.

setting regulatory domain to NL based on timezone (Europe/Amsterdam)

Something must be special.

Do you mean by default ?
The file setregdomain did not exist until I created it with nano to set the country permanent.

You have to remove /etc/sysconfig/regdomain to see that line.

I just did. I am going to reboot and lets see what happens

Ok…back to CN

iw reg get
global
country CN: DFS-FCC
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5725 - 5850 @ 80), (N/A, 33), (N/A)
        (57240 - 59400 @ 2160), (N/A, 28), (N/A)
        (59400 - 63720 @ 2160), (N/A, 44), (N/A)
        (63720 - 65880 @ 2160), (N/A, 28), (N/A)

phy#0
country CN: DFS-FCC
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5725 - 5850 @ 80), (N/A, 33), (N/A)
        (57240 - 59400 @ 2160), (N/A, 28), (N/A)
        (59400 - 63720 @ 2160), (N/A, 44), (N/A)
        (63720 - 65880 @ 2160), (N/A, 28), (N/A)