Ubuntu22 can't create 5G hotspot

I was trying to create ap, and found that ubuntu22 can only create 2.4GHZ hotspot, which is different from windows with the same hardware that can create 5GHZ hotspot. (I’ve just replaced windows10 with ubuntu22 on the same laptop)

On ubuntu22, I get such errors:

ERROR: Your adapter can not transmit to channel 36, frequency band 5GHz.

iw list shows

.......
        Frequencies:
            * 5180 MHz [36] (22.0 dBm) (no IR)
            * 5200 MHz [40] (22.0 dBm) (no IR)
            * 5220 MHz [44] (22.0 dBm) (no IR)
            * 5240 MHz [48] (22.0 dBm) (no IR)
            * 5260 MHz [52] (22.0 dBm) (no IR, radar detection)
            * 5280 MHz [56] (22.0 dBm) (no IR, radar detection)
            * 5300 MHz [60] (22.0 dBm) (no IR, radar detection)
            * 5320 MHz [64] (22.0 dBm) (no IR, radar detection)
            * 5340 MHz [68] (disabled)
            * 5360 MHz [72] (disabled)
            * 5380 MHz [76] (disabled)
            * 5400 MHz [80] (disabled)
            * 5420 MHz [84] (disabled)
            * 5440 MHz [88] (disabled)
            * 5460 MHz [92] (disabled)
            * 5480 MHz [96] (disabled)
            * 5500 MHz [100] (22.0 dBm) (no IR, radar detection)
            * 5520 MHz [104] (22.0 dBm) (no IR, radar detection)
            * 5540 MHz [108] (22.0 dBm) (no IR, radar detection)
            * 5560 MHz [112] (22.0 dBm) (no IR, radar detection)
            * 5580 MHz [116] (22.0 dBm) (no IR, radar detection)
            * 5600 MHz [120] (22.0 dBm) (no IR, radar detection)
            * 5620 MHz [124] (22.0 dBm) (no IR, radar detection)
            * 5640 MHz [128] (22.0 dBm) (no IR, radar detection)
            * 5660 MHz [132] (22.0 dBm) (no IR, radar detection)
            * 5680 MHz [136] (22.0 dBm) (no IR, radar detection)
            * 5700 MHz [140] (22.0 dBm) (no IR, radar detection)
            * 5720 MHz [144] (22.0 dBm) (no IR, radar detection)
            * 5745 MHz [149] (22.0 dBm) (no IR)
            * 5765 MHz [153] (22.0 dBm) (no IR)
            * 5785 MHz [157] (22.0 dBm) (no IR)
            * 5805 MHz [161] (22.0 dBm) (no IR)
            * 5825 MHz [165] (22.0 dBm) (no IR)
            * 5845 MHz [169] (disabled)
            * 5865 MHz [173] (disabled)
            * 5885 MHz [177] (disabled)
            * 5905 MHz [181] (disabled)
.......

The no IR means I can’t create AP with the Frequencies. This has regards to world regulatory domain. See https://superuser.com/questions/809282/wifi-5ghz-ap-mode-what-does-no-ir-means-and-can-i-bypass-it.
So I tryed to sudo iw reg set CN, as the network controller has a physical managed regulatory domain CN.

➜  ~ iw reg get
global
country CN: DFS-FCC
    (2400 - 2483 @ 40), (N/A, 20), (N/A)
    (5150 - 5350 @ 80), (N/A, 20), (0 ms), 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 (self-managed)
country CN: DFS-UNSET
    (2402 - 2437 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ
    (2422 - 2462 @ 40), (6, 22), (N/A), AUTO-BW, NO-80MHZ, NO-160MHZ
    (2447 - 2482 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ
    (5170 - 5190 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
    (5190 - 5210 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
    (5210 - 5230 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
    (5230 - 5250 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
    (5250 - 5270 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5270 - 5290 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5290 - 5310 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5310 - 5330 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5490 - 5510 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5510 - 5530 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5530 - 5550 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5550 - 5570 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5570 - 5590 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5590 - 5610 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5610 - 5630 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5630 - 5650 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5650 - 5670 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5670 - 5690 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5690 - 5710 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5710 - 5730 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5735 - 5755 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5755 - 5775 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5775 - 5795 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5795 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5815 - 5835 @ 20), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ, PASSIVE-SCAN

In CN, certian 5G bandwith is allowed to create AP, but I get the same error. iw list
iw phy shows still "no IR" with all enabled bandwith.

Some says crda solves the question, but it is deleted from ubuntu22.

Some says intel blocked IR in certain regulatory domain physically. But I can create 5G hotspot with this card on windows, so it shouldn’t be a hardware problem.
https://community.intel.com/t5/Wireless/Intel-AX200-as-AP-in-Ubuntu-20-04-hostapd/m-p/1307813

Some bypass no IR by compiling pathced kernel.
https://medium.com/@renaudcerrato/how-to-build-your-own-wireless-router-from-scratch-part-3-d54eecce157f
My kernel is 6.2.0, I compiled a patched 6.2.1 kernel, but failed. iw list still shows no IR, and I can’t create 5G AP.

Here is compile config. I’ve pathced regd.c and enabled the config.

  │ Symbol: ATH_USER_REGD [=y]                                                                  │  
  │ Type  : bool                                                                                │  
  │ Defined at drivers/net/wireless/ath/Kconfig:26                                              │  
  │   Prompt: Do not enforce EEPROM regulatory restrictions                                     │  
  │   Depends on: NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y]                          │  
  │   Location:                                                                                 │  
  │     -> Device Drivers                                                                       │  
  │       -> Network device support (NETDEVICES [=y])                                           │  
  │         -> Wireless LAN (WLAN [=y])                                                         │  
  │           -> Atheros/Qualcomm devices (WLAN_VENDOR_ATH [=y])                                │  
  │ (1)         -> Do not enforce EEPROM regulatory restrictions (ATH_USER_REGD [=y])  

Some says ubuntu updated its way to examine regulatory domain, old network controller is not compatible. So I have to buy a newer network card to create 5G AP. But apparently, I don’t wish to buy another one.
Can't create 5Ghz wifi hotspot on ubuntu 22.04.1

So my question is, how can I create 5G AP with this card on ubuntu22?

More information:
Network controller: Intel Corporation Wireless-AC 9260.

  *-network
       description: Wireless interface
       product: Wireless-AC 9260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: 29
       serial: 18:56:80:b5:f7:20
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=6.2.1 firmware=46.fae53a8b.0 9260-th-b0-jf-b0- ip=10.42.0.1 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:a5200000-a5203fff

Creating hotspot with https://github.com/lakinduakash/linux-wifi-hotspot , it used create_ap.
Ubuntu system wifi hotspot is defaulted to 2.4GHz, and can’t be changed.

Asked By: ksau

||