morrownr / rtl8852bu

Linux Driver for USB WiFi Adapters that are based on the RTL8852BU and RTL8832BU Chipsets - v1.19.3 - 20230505
Other
107 stars 22 forks source link

Kernel panic using 6.6.8 #18

Closed sateuwdie closed 10 months ago

sateuwdie commented 10 months ago

At start of hostapd give me a panic

[mar gen  9 21:19:48 2024] Modules linked in: 8852bu(O) intel_rapl_msr intel_rapl_common cfg80211 eeepc_wmi edac_mce_amd asus_wmi battery sparse_keymap platform_profile kvm_amd rfkill nouveau snd_hda_codec_realtek kvm snd_hda_codec_generic ppdev evdev mxm_wmi drm_exec wmi_bmof ledtrig_audio gpu_sched drm_ttm_helper snd_hda_codec_hdmi irqbypass ttm snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic drm_display_helper snd_hda_codec ghash_clmulni_intel drm_kms_helper snd_hda_core sha512_ssse3 snd_hwdep sha256_ssse3 snd_pcm sha1_ssse3 r8169 drm snd_timer realtek rapl mdio_devres snd agpgart libphy i2c_piix4 ccp i2c_algo_bit video acpi_cpufreq parport_pc i2c_core k10temp tpm_crb gpio_amdpt soundcore parport tpm_tis gpio_generic button tpm_tis_core wmi loop dm_snapshot dm_bufio algif_skcipher af_alg msdos nls_iso8859_1 nls_cp437 usb_storage uhci_hcd ohci_pci ehci_pci ohci_hcd ehci_hcd xhci_pci xhci_pci_renesas usbhid hid xhci_hcd vfat fat ext4 mbcache jbd2 btrfs zstd_compress
[mar gen  9 21:19:48 2024] CPU: 3 PID: 1405 Comm: udevd Tainted: G           O       6.6.8 #1
[mar gen  9 21:19:48 2024] Hardware name: ASUS System Product Name/Pro B550M-C, BIOS 2806 10/27/2022
[mar gen  9 21:19:48 2024] RIP: 0010:remove_proc_entry+0x135/0x1a0
[mar gen  9 21:19:48 2024] Code: 00 48 c7 c7 50 8e 4c 9e e8 38 63 c5 ff 0f 0b 48 c7 c7 88 e7 15 9f e8 0a ab 84 00 4c 89 e6 48 c7 c7 8f 8d 4c 9e e8 1b 63 c5 ff <0f> 0b eb ab 48 c7 c7 88 e7 15 9f e8 eb aa 84 00 eb 9d 83 6b 60 01
[mar gen  9 21:19:48 2024] RSP: 0018:ffffa6b980bdfcb8 EFLAGS: 00010286
[mar gen  9 21:19:48 2024] RAX: 0000000000000000 RBX: ffff8ff0c0c29480 RCX: 0000000000000000
[mar gen  9 21:19:48 2024] RDX: 0000000000000002 RSI: 0000000000009ffb RDI: 00000000ffffffff
[mar gen  9 21:19:48 2024] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000ffffdfff
[mar gen  9 21:19:48 2024] R10: ffffa6b980bdfb58 R11: ffffffff9e742148 R12: ffffa6b980f1ade0
[mar gen  9 21:19:48 2024] R13: ffff8ff0c62d4000 R14: ffffa6b980f17000 R15: ffff8ff0c0c29480
[mar gen  9 21:19:48 2024] FS:  00007f6a12503140(0000) GS:ffff8ff7ceac0000(0000) knlGS:0000000000000000
[mar gen  9 21:19:48 2024] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[mar gen  9 21:19:48 2024] CR2: 00007f929d440850 CR3: 0000000105438000 CR4: 00000000003506e0
[mar gen  9 21:19:48 2024] Call Trace:
[mar gen  9 21:19:48 2024]  <TASK>
[mar gen  9 21:19:48 2024]  ? __warn+0x80/0x130
[mar gen  9 21:19:48 2024]  ? remove_proc_entry+0x135/0x1a0
[mar gen  9 21:19:48 2024]  ? report_bug+0x1c3/0x1d0
[mar gen  9 21:19:48 2024]  ? handle_bug+0x42/0x70
[mar gen  9 21:19:48 2024]  ? exc_invalid_op+0x14/0x70
[mar gen  9 21:19:48 2024]  ? asm_exc_invalid_op+0x16/0x20
[mar gen  9 21:19:48 2024]  ? remove_proc_entry+0x135/0x1a0
[mar gen  9 21:19:48 2024]  ? remove_proc_entry+0x135/0x1a0
[mar gen  9 21:19:48 2024]  rtw_adapter_proc_replace+0x65/0x90 [8852bu]
[mar gen  9 21:19:48 2024]  rtw_ndev_notifier_call+0x44/0x50 [8852bu]
[mar gen  9 21:19:48 2024]  notifier_call_chain+0x59/0xd0
[mar gen  9 21:19:48 2024]  dev_change_name+0x1d4/0x360
[mar gen  9 21:19:48 2024]  dev_ioctl+0x238/0x570
[mar gen  9 21:19:48 2024]  ? sk_ioctl+0x4d/0x100
[mar gen  9 21:19:48 2024]  sock_do_ioctl+0xab/0xf0
[mar gen  9 21:19:48 2024]  sock_ioctl+0xf7/0x300
[mar gen  9 21:19:48 2024]  ? preempt_count_add+0x4d/0xa0
[mar gen  9 21:19:48 2024]  ? fd_install+0x5c/0xe0
[mar gen  9 21:19:48 2024]  __x64_sys_ioctl+0x8d/0xc0
mar gen  9 21:19:48 2024]  do_syscall_64+0x3b/0x90
[mar gen  9 21:19:48 2024]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[mar gen  9 21:19:49 2024] RIP: 0033:0x7f6a12732067
[mar gen  9 21:19:49 2024] Code: 3c 1c e8 2c ff ff ff 85 c0 79 97 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d1 1d 0d 00 f7 d8 64 89 01 48
[mar gen  9 21:19:49 2024] RSP: 002b:00007fff7219ebd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[mar gen  9 21:19:49 2024] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6a12732067
[mar gen  9 21:19:49 2024] RDX: 00007fff7219ec10 RSI: 0000000000008923 RDI: 0000000000000007
[mar gen  9 21:19:49 2024] RBP: 0000000000000007 R08: 0000000000000000 R09: 00007fff7219eb50
[mar gen  9 21:19:49 2024] R10: 00007f6a1263c978 R11: 0000000000000246 R12: 00007fff7219ecd0
[mar gen  9 21:19:49 2024] R13: 00007fff7219ec10 R14: 00007fff7219ecd0 R15: 000000000243c540
[mar gen  9 21:19:49 2024]  </TASK>
[mar gen  9 21:19:49 2024] ---[ end trace 0000000000000000 ]---

This is hostapd.conf

interface=wlan1
bridge=br0
driver=nl80211
ssid=Router1
bssid=*****
hw_mode=a
channel=36  
ieee80211d=1
ieee80211h=1
ieee80211ac=1
ieee80211n=1
wmm_enabled=1
macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept

# Control
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

# Log
logger_syslog=-1
logger_syslog_level=4
logger_stdout=-1
logger_stdout_level=4

#WPA
wpa_passphrase=****
ignore_broadcast_ssid=0
country_code=IT
auth_algs=1
wpa=2
wpa_key_mgmt=SAE
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_group_rekey=1800
ieee80211w=2

#HT
vht_oper_chwidth=1
# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42
# hw ht capab: 0x963
ht_capab=[LDPC][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]
# hw vht capab: 0x03c001a2
vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][MU-BEAMFORMEE][VHT-TXOP-PS][HTC-VHT][MAX-A-MPDU-LEN-EXP7]

this is 8852bu.conf

options 8852bu rtw_switch_usb_mode=1 rtw_he_enable=2 rtw_vht_enable=2 rtw_dfs_region_domain=1

other info

Machine: ASUS System Product Name/Pro B550M-C cpu: AMD Ryzen 3 3200G with Radeon Vega Graphics ram: 24G Distro: slackware 15.0 kernel: 6.6.8 Driver version: today git Wifi card: this one with usb id 0bda:b832

This is kernel config

sateuwdie commented 10 months ago

First try: Change usb port Result: panic again

morrownr commented 10 months ago

AP mode may be hit and miss with this driver. I have not had time to do much testing with AP mode.

Something to try is to remove rtw_he_enable=2 from

options 8852bu rtw_switch_usb_mode=1 rtw_he_enable=2 rtw_vht_enable=2 rtw_dfs_region_domain=1

as you aren't using it anyway.

sateuwdie commented 10 months ago

I will try it, thanks

sateuwdie commented 10 months ago

With kernel 6.7 and

options 8852bu rtw_switch_usb_mode=1 rtw_he_enable=2 rtw_vht_enable=2 rtw_dfs_region_domain=1

don't panic but hostapd don't start, no channel works, I have tried 40 44 48...

wlan1: IEEE 802.11 Configured channel (44) or frequency (5220) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a

iw list report channel is supported


            * 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)
            * 5765 MHz [153] (22.0 dBm)
            * 5785 MHz [157] (22.0 dBm)
            * 5805 MHz [161] (22.0 dBm)
            * 5825 MHz [165] (22.0 dBm)
            * 5845 MHz [169] (disabled)
            * 5865 MHz [173] (disabled)
            * 5885 MHz [177] (disabled)
            * 5905 MHz [181] (disabled)
sateuwdie commented 10 months ago

Another message "Frequency 5745 (primary) not allowed for AP mode, flags: 0x100853 NO-IR" Is 5ghz not supported for this card?

sateuwdie commented 10 months ago

The kernel panic problem is disappear, so I close the issue For other problems with AP I will reopen if needed a new thread Thanks for help.

morrownr commented 10 months ago

iw list report channel is supported

            * 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)

no IR means cannot initiate radiation which kills AP mode.

            * 5745 MHz [149] (22.0 dBm)
            * 5765 MHz [153] (22.0 dBm)
            * 5785 MHz [157] (22.0 dBm)
            * 5805 MHz [161] (22.0 dBm)
            * 5825 MHz [165] (22.0 dBm)

Those are the channels that should work well with AP mode.

If that does not seem to make sense then there is a problem with the country code that needs to be investigated.

sateuwdie commented 10 months ago

Thanks I have also tried channel 153, 149, same thing. ATM I use this card as "client" and works fine. For AP I use another card with driver 88x2bu

morrownr commented 10 months ago

Thanks I have also tried channel 153, 149, same thing.

I guess you can tell by now that I do not think highly of Realtek's WiFi 6 drivers.

For AP I use another card with driver 88x2bu

That is probably a good idea.