morrownr / 8821au-20210708

Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets - v5.12.5.2
Other
671 stars 101 forks source link

rtw_initmac is ignored #112

Closed SanAndreaP closed 11 months ago

SanAndreaP commented 11 months ago

I tried to have a static mac address for my wifi adapter, but the driver seems to ignore the rtw_initmac parameter. It always has a random address after reboot.

Linux distro: Manjaro Linux x86_64 6.1.55-1 Computer: HP ProDesk 600 G2 DM WiFi Device: TP-Link Archer T2U PLUS

My 8821au.conf (mac address redacted):

options 8821au rtw_initmac="xx:xx:xx:xx:xx:xx" rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=2 rtw_power_mgnt=1 rtw_dfs_region_domain=3 rtw_wireless_mode=11

output of requested command:

6.1.55-1-MANJARO x86_64
SecureBoot disabled
Platform is in Setup Mode
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
rtl8821au/5.12.5.2, 6.1.55-1-MANJARO, x86_64: installed
phy#0
    Interface wlp0s20f0u1
        ifindex 3
        wdev 0x1
        addr e6:5b:0a:d2:e4:12
        type managed
        txpower -100.00 dBm
global
country 00: DFS-UNSET
    (2402 - 2472 @ 40), (6, 20), (N/A)
    (2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
    (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
    (5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
    (5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
    (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
    (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
    (57240 - 63720 @ 2160), (N/A, 0), (N/A)
morrownr commented 11 months ago

Hi @SanAndreaP

$ sudo nano /etc/NetworkManager/NetworkManager.conf

Add the follow or if it is already there and set to yes, change it to no:

[device]
wifi.scan-rand-mac-address=no

I'm pretty sure that will work. I wouldn't use the driver parameter.

Let me know if this works.

Nick