tomaspinho / rtl8821ce

Other
1.58k stars 412 forks source link

Error at hal_com.c:11447 for Ubuntu 22.04 Kernel 5.15.0-40 #281

Closed szymonlipinski closed 2 years ago

szymonlipinski commented 2 years ago

The driver worked for some time. Now it doesn't throwing error at random time:

[ 3485.113417] ------------[ cut here ]------------
[ 3485.113423] WARNING: CPU: 1 PID: 1434 at /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/hal/hal_com.c:11447 rtw_lps_state_chk+0x39/0x41 [8821ce]
[ 3485.113588] Modules linked in: rfcomm xt_conntrack xt_MASQUERADE nf_conntrack_netlink xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat br_netfilter bridge stp llc nft_masq vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 overlay ip_set nf_tables libcrc32c nfnetlink cmac algif_hash algif_skcipher af_alg bnep sunrpc binfmt_misc mei_hdcp intel_rapl_msr snd_hda_codec_hdmi snd_sof_pci_intel_icl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_realtek soundwire_bus snd_hda_codec_generic ledtrig_audio nls_iso8859_1 snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel intel_tcc_cooling x86_pkg_temp_thermal snd_intel_dspcfg
[ 3485.113689]  snd_intel_sdw_acpi rtsx_usb_ms intel_powerclamp snd_hda_codec coretemp memstick snd_hda_core kvm_intel snd_hwdep btusb kvm snd_pcm btrtl btbcm rapl joydev btintel snd_seq_midi uvcvideo intel_cstate snd_seq_midi_event snd_rawmidi bluetooth videobuf2_vmalloc videobuf2_memops ecdh_generic videobuf2_v4l2 ecc videobuf2_common snd_seq snd_seq_device snd_timer videodev mc snd input_leds serio_raw wmi_bmof 8821ce(OE) asus_nb_wmi 8250_dw soundcore processor_thermal_device_pci_legacy processor_thermal_device cfg80211 processor_thermal_rfim mei_me processor_thermal_mbox processor_thermal_rapl hid_multitouch mei intel_rapl_common intel_soc_dts_iosf int3403_thermal int340x_thermal_zone int3400_thermal mac_hid acpi_thermal_rel acpi_pad acpi_tad sch_fq_codel ipmi_devintf ipmi_msghandler msr parport_pc ppdev ramoops lp reed_solomon parport pstore_blk pstore_zone mtd efi_pstore ip_tables x_tables autofs4 dm_crypt hid_logitech_hidpp hid_logitech_dj rtsx_usb_sdmmc usbhid rtsx_usb i915
[ 3485.113804]  i2c_algo_bit ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec mfd_aaeon asus_wmi spi_pxa2xx_platform rc_core nvme dw_dmac sparse_keymap hid_generic dw_dmac_core crct10dif_pclmul crc32_pclmul platform_profile ghash_clmulni_intel aesni_intel crypto_simd i2c_i801 i2c_smbus nvme_core drm intel_lpss_pci ahci cryptd intel_lpss xhci_pci libahci idma64 xhci_pci_renesas wmi i2c_hid_acpi i2c_hid hid video pinctrl_icelake
[ 3485.113861] CPU: 1 PID: 1434 Comm: RTW_CMD_THREAD Tainted: G           OE     5.15.0-40-generic #43-Ubuntu
[ 3485.113869] Hardware name: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X415JA_X415JA/X415JA, BIOS X415JA.302 02/01/2021
[ 3485.113871] RIP: 0010:rtw_lps_state_chk+0x39/0x41 [8821ce]
[ 3485.114019] Code: 54 53 49 89 fc bb 0b 00 00 00 be 04 06 00 00 4c 89 e7 e8 37 cf f8 ff 84 c0 79 11 bf 01 00 00 00 e8 6c 55 fd ff 80 eb 01 75 e0 <0f> 0b 5b 41 5c 5d c3 c3 0f 1f 44 00 00 55 48 89 e5 41 54 53 48 83
[ 3485.114024] RSP: 0018:ffffb0dcc152fc20 EFLAGS: 00010246
[ 3485.114039] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000003225a8
[ 3485.114043] RDX: 0000000000000000 RSI: 0000000055555554 RDI: ffffb0dcc152fb50
[ 3485.114046] RBP: ffffb0dcc152fc30 R08: 0000000000000000 R09: 0000000000000000
[ 3485.114049] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb0dcc05f9000
[ 3485.114052] R13: ffffb0dcc152fcfc R14: ffffb0dcc1111000 R15: ffffb0dcc1111000
[ 3485.114055] FS:  0000000000000000(0000) GS:ffff96f22be80000(0000) knlGS:0000000000000000
[ 3485.114059] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3485.114063] CR2: 00007feb21760000 CR3: 00000001683d6005 CR4: 0000000000770ee0
[ 3485.114066] PKRU: 55555554
[ 3485.114069] Call Trace:
[ 3485.114072]  <TASK>
[ 3485.114093]  SetHwReg+0x198/0x742 [8821ce]
[ 3485.114242]  rtl8821c_sethwreg+0xcfe/0xd51 [8821ce]
[ 3485.114411]  sethwreg+0x2a/0x14f [8821ce]
[ 3485.114581]  rtw_hal_set_hwreg+0x16/0x1b [8821ce]
[ 3485.114731]  rtw_set_ps_mode+0xd9/0x1e7 [8821ce]
[ 3485.114877]  LPS_Leave+0xd0/0xef [8821ce]
[ 3485.115001]  traffic_status_watchdog+0x1d8/0x2d1 [8821ce]
[ 3485.115071]  rtw_iface_dynamic_chk_wk_hdl+0x5a/0x1a6 [8821ce]
[ 3485.115151]  _rtw_mi_dynamic_chk_wk_hdl+0xe/0x15 [8821ce]
[ 3485.115342]  _rtw_mi_process+0xa0/0xbf [8821ce]
[ 3485.115463]  ? _rtw_mi_dynamic_check_timer_handlder+0x15/0x15 [8821ce]
[ 3485.115570]  ? session_tracker_cmd_hdl+0x1c5/0x1c5 [8821ce]
[ 3485.115648]  rtw_mi_dynamic_chk_wk_hdl+0x1f/0x21 [8821ce]
[ 3485.115760]  rtw_dynamic_chk_wk_hdl+0x12/0x4d [8821ce]
[ 3485.115838]  rtw_drvextra_cmd_hdl+0xaf/0x436 [8821ce]
[ 3485.115941]  ? session_tracker_cmd_hdl+0x1c5/0x1c5 [8821ce]
[ 3485.116019]  rtw_cmd_thread+0x2e0/0x42a [8821ce]
[ 3485.116093]  ? rtw_stop_cmd_thread+0x41/0x41 [8821ce]
[ 3485.116166]  kthread+0x127/0x150
[ 3485.116175]  ? set_kthread_struct+0x50/0x50
[ 3485.116182]  ret_from_fork+0x1f/0x30
[ 3485.116191]  </TASK>
[ 3485.116194] ---[ end trace 0a32ae32a0f40836 ]---

Machine info:

Linux 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

The driver is compiled from source. The old one has been removed. The rwt driver is blacklisted.

szymonlipinski commented 2 years ago

After adding options 8821ce rtw_power_mgnt=0 to the /etc/modprobe.d/8821ce-powersave.conf", the computer was fine for about an hour, then the error changed to this

[ 7820.692491] ------------[ cut here ]------------
[ 7820.692497] WARNING: CPU: 2 PID: 193757 at net/wireless/sme.c:756 __cfg80211_connect_result+0x3e4/0x420 [cfg80211]
[ 7820.692603] Modules linked in: wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libblake2s blake2s_x86_64 libcurve25519_generic libchacha libblake2s_genericip6_udp_tunnel udp_tunnel rfcomm xt_conntrack xt_MASQUERADE nf_conntrack_netlink xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat br_netfilter bridge stp llc nft_masq vboxnetadp(OE)vboxnetflt(OE) vboxdrv(OE) nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 overlay ip_set nf_tables libcrc32c nfnetlink cmac algif_hash algif_skcipher af_alg bnep sunrpc binfmt_misc mei_hdcp intel_rapl_msr snd_sof_pci_intel_icl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_hda_codec_hdmi snd_sof_pci snd_sof_xtensa_dsp snd_sof intel_tcc_cooling snd_soc_hdac_hda snd_hda_ext_core snd_hda_codec_realtek x86_pkg_temp_thermal
[ 7820.692674]  intel_powerclamp snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_generic coretemp soundwire_bus ledtrig_audio snd_soc_core kvm_intel snd_compress ac97_bus snd_pcm_dmaengine nls_iso8859_1 rtsx_usb_ms snd_hda_intel kvm memstick snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec rapl snd_hda_core intel_cstate snd_hwdep joydev wmi_bmof input_leds snd_pcm snd_seq_midi snd_seq_midi_event serio_raw asus_nb_wmi snd_rawmidi snd_seq btusb btrtl btbcm snd_seq_device snd_timer btintel uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 bluetooth videobuf2_common ecdh_generic 8821ce(OE) ecc snd videodev mc processor_thermal_device_pci_legacy soundcore processor_thermal_device cfg80211 hid_multitouch 8250_dw processor_thermal_rfimmei_me processor_thermal_mbox processor_thermal_rapl mei intel_rapl_common intel_soc_dts_iosf int3403_thermal int340x_thermal_zone int3400_thermal mac_hid acpi_thermal_rel acpi_tad acpi_pad sch_fq_codel ipmi_devintf ipmi_msghandler msr parport_pc
[ 7820.692745]  ppdev pstore_blk mtd pstore_zone ramoops lp reed_solomon parport efi_pstore ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj rtsx_usb_sdmmc usbhid rtsx_usb dm_crypt i915 i2c_algo_bit ttm drm_kms_helper hid_generic syscopyarea sysfillrect sysimgblt fb_sys_fops mfd_aaeon crct10dif_pclmul spi_pxa2xx_platform cec dw_dmac asus_wmi xhci_pci dw_dmac_core rc_core sparse_keymap crc32_pclmul ghash_clmulni_intel aesni_intel platform_profile crypto_simd cryptd intel_lpss_pci nvme intel_lpss ahci drm i2c_i801 i2c_smbus nvme_core libahci idma64 xhci_pci_renesas wmi i2c_hid_acpi i2c_hid hid video pinctrl_icelake
[ 7820.692809] CPU: 2 PID: 193757 Comm: kworker/u8:5 Tainted: G           OE     5.15.0-40-generic #43-Ubuntu
[ 7820.692815] Hardware name: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X415JA_X415JA/X415JA, BIOS X415JA.302 02/01/2021
[ 7820.692818] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 7820.692857] RIP: 0010:__cfg80211_connect_result+0x3e4/0x420 [cfg80211]
[ 7820.692913] Code: 40 e8 48 8b 40 30 48 85 c0 0f 84 50 fd ff ff f0 ff 40 e8 e9 47 fd ff ff 0f 0b 48 8b 76 10 e8 c3 0d fd ff e9 22 fe ff ff 0f 0b <0f> 0b e9 19 fe ff ff e8 60 57 73 db e9 0f fe ff ff 0f 0b e9 3c fd
[ 7820.692916] RSP: 0018:ffff9bdbc49ffd90 EFLAGS: 00010246
[ 7820.692920] RAX: 0000000000000000 RBX: ffff8c1ad28c9400 RCX: 0000000000000000
[ 7820.692923] RDX: 0000000000000002 RSI: 00000000fffffe01 RDI: ffffffffc09ed028
[ 7820.692925] RBP: ffff9bdbc49ffde0 R08: ffff8c1acfea70b8 R09: 0000000000000003
[ 7820.692927] R10: 0000000000000000 R11: fffffffeffe36cfa R12: ffff8c1e159c6018
[ 7820.692929] R13: ffff8c1ac187e000 R14: ffff9bdbc49ffd90 R15: dead000000000100
[ 7820.692932] FS:  0000000000000000(0000) GS:ffff8c1f2bf00000(0000) knlGS:0000000000000000
[ 7820.692935] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7820.692937] CR2: 00007fc8b2d34000 CR3: 00000001235b8001 CR4: 0000000000770ee0
[ 7820.692940] PKRU: 55555554
[ 7820.692942] Call Trace:
[ 7820.692944]  <TASK>
[ 7820.692949]  cfg80211_process_wdev_events+0x148/0x1b0 [cfg80211]
[ 7820.692991]  ? cfg80211_process_wdev_events+0x148/0x1b0 [cfg80211]
[ 7820.693032]  cfg80211_process_rdev_events+0x2b/0x40 [cfg80211]
[ 7820.693073]  cfg80211_event_work+0x2a/0x40 [cfg80211]
[ 7820.693107]  process_one_work+0x228/0x3d0
[ 7820.693116]  worker_thread+0x53/0x410
[ 7820.693121]  ? process_one_work+0x3d0/0x3d0
[ 7820.693126]  kthread+0x127/0x150
[ 7820.693131]  ? set_kthread_struct+0x50/0x50
[ 7820.693136]  ret_from_fork+0x1f/0x30
[ 7820.693144]  </TASK>
[ 7820.693145] ---[ end trace 63517d42c24e66ce ]---
[ 7857.941709] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
szymonlipinski commented 2 years ago

I think it works now. The only thing that helped was setting:

[connection]
wifi.powersave = 2

in the file

/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
dubhater commented 2 years ago

They are just warnings. I got the first one too. It's fine.

tomaspinho commented 2 years ago

Yeah, power management doesn't work well with this driver as described in the README.