My mt7921e kernel module for the MediaTek MT7921 wifi card will (seemingly) randomly, fail. This can happen from anywhere from just after login, or several hours after login. after that, I cannot shut down / reboot properly since systemd
just keeps waiting for NetworkManager
and wpa_supplicant
to stop (which it wont).
After rebooting, the wifi card isn’t even recognised as a device in lspci
. Only the ethernet controller remains. lsmod | grep mt7921
also does not output anything either.
After another reboot, Usually it repeats this cycle again. However sometimes, the device keeps not getting recognised by the system so i have to reboot (properly this time) again.
I have a Asus TUF Gaming F15 laptop.
dmesg logs of the driver crashing:
[ +4.825328] mt7921e 0000:03:00.0: driver own failed
[ +1.073212] mt7921e 0000:03:00.0: Timeout for driver own
[ +1.199768] mt7921e 0000:03:00.0: driver own failed
[ +0.000007] ------------[ cut here ]------------
[ +0.000000] WARNING: CPU: 2 PID: 13769 at kernel/kthread.c:659 kthread_park+0x81/0x90
[ +0.000004] Modules linked in: tls rfcomm snd_seq_dummy snd_hrtimer nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast 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 ip_set nf_tables nfnetlink nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) qrtr nvidia(POE) bnep sunrpc snd_sof_pci_intel_cnl 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_sof_utils soundwire_bus intel_tcc_cooling x86_pkg_temp_thermal iTCO_wdt mei_pxp mei_hdcp snd_soc_skl intel_powerclamp coretemp mt7921e ee1004 intel_pmc_bxt intel_rapl_msr iTCO_vendor_support snd_soc_hdac_hda mt7921_common snd_hda_ext_core mt76_connac_lib snd_soc_sst_ipc kvm_intel mt76 snd_soc_sst_dsp vfat fat snd_soc_acpi_intel_match snd_soc_acpi kvm mac80211 irqbypass snd_soc_core snd_hda_codec_realtek
[ +0.000029] snd_hda_codec_generic btusb rapl ledtrig_audio intel_cstate snd_compress btrtl asus_nb_wmi asus_wmi ac97_bus intel_uncore libarc4 btbcm snd_hda_codec_hdmi sparse_keymap snd_pcm_dmaengine uvcvideo pcspkr btintel platform_profile wmi_bmof btmtk videobuf2_vmalloc snd_hda_intel cfg80211 videobuf2_memops videobuf2_v4l2 snd_intel_dspcfg bluetooth snd_intel_sdw_acpi videobuf2_common snd_usb_audio videodev snd_hda_codec snd_usbmidi_lib snd_rawmidi ecdh_generic rfkill mc joydev snd_hda_core idma64 snd_seq snd_hwdep snd_seq_device snd_pcm processor_thermal_device_pci_legacy processor_thermal_device processor_thermal_rfim snd_timer processor_thermal_mbox int3403_thermal processor_thermal_rapl mei_me intel_rapl_common snd int340x_thermal_zone i2c_i801 soundcore intel_pch_thermal mei intel_soc_dts_iosf i2c_smbus acpi_pad int3400_thermal acpi_thermal_rel asus_wireless zram binfmt_misc i915 drm_buddy drm_dp_helper nvme hid_multitouch ucsi_acpi crct10dif_pclmul crc32_pclmul crc32c_intel
[ +0.000027] mxm_wmi nvme_core ghash_clmulni_intel r8169 typec_ucsi serio_raw ttm typec i2c_hid_acpi i2c_hid wmi video pinctrl_cannonlake ip6_tables ip_tables fuse
[ +0.000007] CPU: 2 PID: 13769 Comm: kworker/u16:6 Tainted: P U OE 5.18.13-200.fc36.x86_64 #1
[ +0.000002] Hardware name: ASUSTeK COMPUTER INC. ASUS TUF Gaming F15 FX506LH_FX506LH/FX506LH, BIOS FX506LH.310 11/26/2021
[ +0.000001] Workqueue: mt76 mt7921_mac_reset_work [mt7921_common]
[ +0.000004] RIP: 0010:kthread_park+0x81/0x90
[ +0.000002] Code: 00 48 85 c0 74 2d 31 c0 5b 5d c3 cc cc cc cc 0f 0b 48 8b ab a8 0a 00 00 a8 04 74 ac 0f 0b b8 da ff ff ff 5b 5d c3 cc cc cc cc <0f> 0b b8 f0 ff ff ff eb d5 0f 0b eb cf 66 90 0f 1f 44 00 00 41 55
[ +0.000001] RSP: 0018:ffffb93982aafe08 EFLAGS: 00010202
[ +0.000001] RAX: 0000000000000004 RBX: ffff8c301a705300 RCX: 0000000000000000
[ +0.000001] RDX: 0000000000000003 RSI: 0000000000000003 RDI: ffff8c301a705300
[ +0.000001] RBP: ffff8c3029034700 R08: ffff8c30200e24a0 R09: 00000000fffffff0
[ +0.000000] R10: 0000000000000003 R11: ffffffffb5f453e8 R12: ffff8c30200e08e0
[ +0.000001] R13: ffff8c30200e20e0 R14: ffff8c30200e8610 R15: ffff8c30200e2430
[ +0.000001] FS: 0000000000000000(0000) GS:ffff8c334c280000(0000) knlGS:0000000000000000
[ +0.000001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000000] CR2: 00007fa186e35fe8 CR3: 000000015aa7e002 CR4: 00000000007706e0
[ +0.000001] PKRU: 55555554
[ +0.000001] Call Trace:
[ +0.000001] <TASK>
[ +0.000003] mt7921e_mac_reset+0x9e/0x2d0 [mt7921e]
[ +0.000003] mt7921_mac_reset_work+0x8c/0x125 [mt7921_common]
[ +0.000003] process_one_work+0x1c4/0x380
[ +0.000002] worker_thread+0x4d/0x380
[ +0.000002] ? _raw_spin_lock_irqsave+0x23/0x50
[ +0.000002] ? process_one_work+0x380/0x380
[ +0.000001] kthread+0xe6/0x110
[ +0.000002] ? kthread_complete_and_exit+0x20/0x20
[ +0.000001] ret_from_fork+0x1f/0x30
[ +0.000004] </TASK>
[ +0.000000] ---[ end trace 0000000000000000 ]---
full logs from boot to driver crashing: