我的电脑找不到频道 13 上的 wifi 网络

我的电脑找不到频道 13 上的 wifi 网络

之前,我在 Acer Aspire A515-51G 上使用 Windows 10,能够检测并连接到我的家庭 wifi。目前,我安装了 Ubuntu 20.04 LTS(后来又安装了 Ubuntu 23.10),我的电脑能够检测到我周围的所有网络(家庭 wifi 除外)。

在我的另一台电脑上,我看到我家的 wifi 是在 13 频道。如何在不更改 wifi 路由器的情况下在电脑上启用 13 频道?iw reg set <COUNTRY>似乎不起作用。

以下是一些重要信息:

$ iw reg get
global
country PT: DFS-ETSI
    (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
    (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
    (5725 - 5875 @ 80), (N/A, 13), (N/A)
    (5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country 99: DFS-UNSET
    (2402 - 2472 @ 40), (N/A, 20), (N/A)
    (5140 - 5360 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN
    (5460 - 5860 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN



$ iwlist channel
lo        no frequency information.

enp2s0f1  no frequency information.

wlp3s0    32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Channel 144 : 5.72 GHz
          Channel 149 : 5.745 GHz
          Current Frequency:5.18 GHz (Channel 36)


$ sudo lshw -C network
*-network
       description: Wireless interface
       product: QCA9377 802.11ac Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: 31
       serial: e8:2a:44:90:55:cf
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath10k_pci driverversion=6.5.0-15-generic firmware=WLAN.TF.2.1-00021-QCARMSWP-1 ip=10.10.10.17 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:138 memory:b4000000-b41fffff

iw list shows以下频道已被禁用:

* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)

$sudo dmesg|grep ath

[    2.207030] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    2.231452] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root).
[    2.237794] systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
[    4.672880] ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    4.868231] ath10k_pci 0000:03:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Transmitter ID)
[    4.868234] ath10k_pci 0000:03:00.0:   device [168c:0042] error status/mask=00001101/00006000
[    4.868237] ath10k_pci 0000:03:00.0:    [ 0] RxErr                  (First)
[    4.868240] ath10k_pci 0000:03:00.0:    [ 8] Rollover              
[    4.868243] ath10k_pci 0000:03:00.0:    [12] Timeout               
[    4.989100] ath10k_pci 0000:03:00.0: qca9377 hw1.1 target 0x05020001 chip_id 0x003821ff sub 11ad:08a6
[    4.989107] ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[    4.989646] ath10k_pci 0000:03:00.0: firmware ver WLAN.TF.2.1-00021-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 42e41877
[    5.074075] ath10k_pci 0000:03:00.0: board_file api 2 bmi_id N/A crc32 8aedfa4a
[    5.220813] ath10k_pci 0000:03:00.0: htt-ver 3.56 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[    5.318370] ath: EEPROM regdomain: 0x69
[    5.318375] ath: EEPROM indicates we should expect a direct regpair map
[    5.318378] ath: Country alpha2 being used: 00
[    5.318380] ath: Regpair used: 0x69
[    5.352022] ath10k_pci 0000:03:00.0 wlp3s0: renamed from wlan0
[    6.272747] ath10k_pci 0000:03:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Transmitter ID)
[    6.272750] ath10k_pci 0000:03:00.0:   device [168c:0042] error status/mask=00001081/00006000
[    6.272754] ath10k_pci 0000:03:00.0:    [ 0] RxErr                  (First)
[    6.272757] ath10k_pci 0000:03:00.0:    [ 7] BadDLLP               
[    6.272759] ath10k_pci 0000:03:00.0:    [12] Timeout               
[    6.310320] ath10k_pci 0000:03:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Transmitter ID)
[    6.310340] ath10k_pci 0000:03:00.0:   device [168c:0042] error status/mask=00001101/00006000
[    6.310345] ath10k_pci 0000:03:00.0:    [ 0] RxErr                  (First)
[    6.310347] ath10k_pci 0000:03:00.0:    [ 8] Rollover              
[    6.310349] ath10k_pci 0000:03:00.0:    [12] Timeout               
[   44.242208] audit: type=1107 audit(1707253283.388:121): pid=627 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.11" pid=2241 label="snap.firefox.firefox" peer_pid=671 peer_label="unconfined"
[   44.369564] audit: type=1107 audit(1707253283.516:122): pid=627 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/timedate1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.78" pid=2241 label="snap.firefox.firefox" peer_pid=2405 peer_label="unconfined"
[   44.370081] audit: type=1107 audit(1707253283.516:123): pid=627 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/timedate1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.78" pid=2241 label="snap.firefox.firefox" peer_pid=2405 peer_label="unconfined"
[  166.126434] audit: type=1107 audit(1707253405.542:124): pid=627 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/timedate1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.101" pid=2241 label="snap.firefox.firefox" peer_pid=3421 peer_label="unconfined"

按照 Jeremy31 提出的解决方案,该命令make -C /lib/modules/$(uname -r)/build M=$(pwd) modules出现以下错误:

make: Entering directory '/usr/src/linux-headers-6.5.0-15-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
  You are using:           
  CC [M]  /home/USER/ath-6.5/main.o
/bin/sh: 1: gcc-13: not found
make[2]: *** [scripts/Makefile.build:251: /home/USER/ath-6.5/main.o] Error 127
make[1]: *** [/usr/src/linux-headers-6.5.0-15-generic/Makefile:2037: /home/USER/ath-6.5] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.0-15-generic'

答案1

你可以试试这个,我在终端中修改了一些 atheros 代码

sudo apt install git dkms
git clone https://github.com/jeremyb31/ath-6.5.git
cd ath-6.5
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
sudo mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath/ath.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath/ath.ko.bak
sudo cp ath.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath/ath.ko

重启

必须禁用安全启动才能使此功能正常工作,请在终端中检查mokutil --sb

我所做的是将 /drivers/net/wireless/ath/regd.c 中的一行从

/* Can be used by 0x66 and 0x69 /
static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
.n_reg_rules = 3,
.alpha2 =  "99",
.reg_rules = {
ATH_2GHZ_CH01_11,
ATH_5GHZ_ALL,
}
};
对此
/ Can be used by 0x66 and 0x69 */
static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
.n_reg_rules = 3,
.alpha2 =  "99",
.reg_rules = {
ATH_2GHZ_CH01_11,
ATH_2GHZ_CH12_13,
ATH_5GHZ_ALL,
}
};
如你所见,我的更改添加了频道 12 和 13

相关内容