I just tried using sys-kernel/gentoo-sources-5.16.0 on a laptop with a MediaTek MT7961 Wi-Fi card, with the associated driver (mt76/mt7921) built as a module, and the kernel panics during boot as the driver loads. The issue does not reproduce on the stable 5.15.11 kernel, with which Wi-Fi works properly and I have no other issues. In both cases, I'm running the live ebuild of sys-kernel/linux-firmware (-99999999), updated earlier today (January 10, 2022), so the firmware itself is not at fault. The kernel is built with LLVM and full LTO, though I doubt that's the cause of the issue, either. Similar issues affecting the 5.16 kernel branch have been reported upstream: - lore.kernel.org/all/5077a953487275837e81bdf1808ded00b9676f9f.camel@pschenker.ch/ - lkml.org/lkml/2021/9/21/180 Unfortunately, I've unmerged the offending kernel package and no longer have the kernel image, configuration or any other files associated it; however, I do have the (nearly identical) configuration for the 5.15.11 kernel I'm currently running. Links for the relevant portion of the systemd journal immediately before the crash, as well as configuration data, follow: - systemd journal snippet (5.16.0): pastebin.com/FzFKGY4x - Kernel configuration (5.15.11): pastebin.com/JQfZ0KsS - lspci -k output (5.15.11): pastebin.com/ZKPxWBBD As far as I can tell, this is an upstream issue, but I've been advised on IRC to file a bug report anyway.
Of note is that the upstream reports state that problem may not occur on a cold boot, only when rebooting. I haven't been able to confirm this, but I can say that the system crashed when I rebooted into the new kernel for the first time.
Can you try this patch and let is know if it solves your issue? https://patchwork.kernel.org/project/linux-wireless/patch/70e27cbc652cbdb78277b9c691a3a5ba02653afb.1641540175.git.objelf@gmail.com/ If it does, I'll carry it into gentoo-sources 5.16.1 until it's included from the official upstream tree
I've gone ahead and compiled two different versions of the 5.16.0 kernel, one with the patch and one without. Just as the upstream reports say, the unpatched kernel panics when the system is rebooted, but not when cold-booting. The patched kernel does not exhibit the same issue, whether cold-booting or rebooting. Everything else relevant to the issue is the same. I'd suppose that =sys-kernel/gentoo-kernel-5.16.0 will be hard-masked and the patch incorporated into the next update?
(In reply to Brian W. from comment #3) > I've gone ahead and compiled two different versions of the 5.16.0 kernel, > one with the patch and one without. Just as the upstream reports say, the > unpatched kernel panics when the system is rebooted, but not when > cold-booting. The patched kernel does not exhibit the same issue, whether > cold-booting or rebooting. Everything else relevant to the issue is the same. > > I'd suppose that =sys-kernel/gentoo-kernel-5.16.0 will be hard-masked and > the patch incorporated into the next update? Thanks for testing. I'll carry this patch into the next release of gentoo-sources.
commit 856d11ee1caf5f42639c1727cd391e3fe53822ee (HEAD -> 5.16) Author: Mike Pagano <mpagano@gentoo.org> Date: Fri Jan 14 09:11:12 2022 -0500 mt76: mt7921e: fix possible probe failure after reboot See bug #830977 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
...or wait. I'm still having trouble. The driver acts up during resume, causing the desktop environment to lock up. It'll respond to Ctrl+Alt+F2 to switch to a text console and back, but the NIC stops working. dmesg output is telling: [ 264.451511] mt7921e 0000:03:00.0: Message 40000007 (seq 9) timeout [ 264.451523] PM: dpm_run_callback(): pci_pm_restore+0x0/0x330 returns -110 [ 264.451538] mt7921e 0000:03:00.0: PM: failed to restore async: error -110 [ 264.451545] mt7921e 0000:03:00.0: chip reset [ 264.514250] usb 1-2: reset high-speed USB device number 2 using xhci_hcd [ 264.605696] usb 5-4: reset high-speed USB device number 3 using xhci_hcd [ 267.563578] mt7921e 0000:03:00.0: Message 80000010 (seq 10) timeout [ 267.563588] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 270.699572] mt7921e 0000:03:00.0: Message 80000010 (seq 11) timeout [ 270.699582] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 273.835599] mt7921e 0000:03:00.0: Message 80000010 (seq 12) timeout [ 273.835609] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 276.971552] mt7921e 0000:03:00.0: Message 80000010 (seq 13) timeout [ 276.971562] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 280.107606] mt7921e 0000:03:00.0: Message 80000010 (seq 14) timeout [ 280.107615] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 283.243464] mt7921e 0000:03:00.0: Message 80000010 (seq 15) timeout [ 283.243474] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 286.379472] mt7921e 0000:03:00.0: Message 80000010 (seq 1) timeout [ 286.379481] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 289.515576] mt7921e 0000:03:00.0: Message 80000010 (seq 2) timeout [ 289.515585] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 292.651562] mt7921e 0000:03:00.0: Message 80000010 (seq 3) timeout [ 292.651574] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 295.787469] mt7921e 0000:03:00.0: Message 80000010 (seq 4) timeout [ 295.787478] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 295.787522] mt7921e 0000:03:00.0: chip reset failed [ 295.787575] wlp3s0: Driver requested disconnection from AP 00:00:00:00:00:00 [ 298.795513] mt7921e 0000:03:00.0: Message 40000001 (seq 5) timeout [ 301.803513] mt7921e 0000:03:00.0: Message 00000027 (seq 6) timeout [ 301.803532] mt7921e 0000:03:00.0: chip reset [ 304.811566] mt7921e 0000:03:00.0: Message 00000046 (seq 7) timeout [ 304.811583] ------------[ cut here ]------------ [ 304.811584] Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue. [ 304.811607] WARNING: CPU: 1 PID: 2057 at net/mac80211/util.c:2368 ieee80211_reconfig+0x193/0xff0 [ 304.811619] Modules linked in: rfcomm iptable_nat bnep amdgpu snd_ctl_led snd_hda_codec_realtek hid_multitouch snd_hda_codec_generic snd_soc_dmic snd_acp3x_pdm_dma snd_acp3x_rn snd_hda_codec_hdmi snd_soc_core uvcvideo snd_hda_intel snd_intel_dspcfg videobuf2_vmalloc snd_hda_codec videobuf2_memops videobuf2_v4l2 videobuf2_common btusb snd_hda_core psmouse videodev btrtl snd_pcm serio_raw btintel btbcm mt7921e mfd_core mt7921_common drm_ttm_helper snd_pci_acp5x snd_timer mc mt76_connac_lib ttm snd snd_rn_pci_acp3x r8169 mt76 snd_pci_acp3x gpu_sched soundcore i2c_hid_acpi i2c_hid [ 304.811666] CPU: 1 PID: 2057 Comm: kworker/u32:79 Not tainted 5.16.0-gentoo-stolas2-20220113-r02-llvm+patchwork-12706336 #5 [ 304.811671] Hardware name: LENOVO 20XH005GUS/20XH005GUS, BIOS R1NET44W (1.14) 11/08/2021 [ 304.811673] Workqueue: events_unbound async_run_entry_fn [ 304.811677] RIP: 0010:ieee80211_reconfig+0x193/0xff0 [ 304.811681] Code: 00 4c 89 e7 e8 9e 4e fb ff 85 c0 0f 84 5d 02 00 00 89 c3 45 84 ff 0f 84 89 03 00 00 48 c7 c7 07 46 d1 89 31 c0 e8 8d 42 10 ff <0f> 0b e9 df 04 00 00 31 c9 4c 89 f8 f0 49 0f b1 0e 45 89 ef 44 8b [ 304.811685] RSP: 0018:ffffb7d409203d10 EFLAGS: 00010246 [ 304.811688] RAX: 6be684163d7c1600 RBX: 00000000ffffff92 RCX: 0000000000000001 [ 304.811690] RDX: ffffffff89656e69 RSI: ffffffff89e8fc94 RDI: 00000000ffffffff [ 304.811691] RBP: ffff9fbecbfc8000 R08: 0000000000000000 R09: ffffb7d409203bb0 [ 304.811693] R10: 3fffffffffffffff R11: 8000000000000000 R12: ffff9fbecbfc8820 [ 304.811694] R13: ffffffff895336b0 R14: 0000000000000000 R15: ffff9fbf222f1001 [ 304.811696] FS: 0000000000000000(0000) GS:ffff9fc19ee40000(0000) knlGS:0000000000000000 [ 304.811698] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 304.811700] CR2: 0000000000000000 CR3: 000000022840c000 CR4: 0000000000350ee0 [ 304.811702] Call Trace: [ 304.811705] <TASK> [ 304.811707] ? wait_for_common+0x1b9/0x210 [ 304.811711] ? wiphy_suspend+0x280/0x280 [ 304.811715] rdev_resume+0x1e/0xc0 [ 304.811719] wiphy_resume+0x15d/0x1d0 [ 304.811721] device_resume+0x52f/0x6e0 [ 304.811726] async_resume+0x14/0xe0 [ 304.811728] async_run_entry_fn+0x68/0x150 [ 304.811732] process_one_work+0x1ea/0x3c0 [ 304.811736] worker_thread+0x35d/0x640 [ 304.811740] ? rcu_free_pool+0x30/0x30 [ 304.811744] kthread+0x214/0x250 [ 304.811747] ? rcu_free_pool+0x30/0x30 [ 304.811750] ? kthreadd+0x2f0/0x2f0 [ 304.811753] ret_from_fork+0x22/0x30 [ 304.811757] </TASK> [ 304.811757] ---[ end trace c298a5b435ef2f4b ]--- [ 304.812991] ------------[ cut here ]------------ [ 304.812993] wlp3s0: Failed check-sdata-in-driver check, flags: 0x0 [ 304.813014] WARNING: CPU: 1 PID: 2057 at net/mac80211/driver-ops.c:97 drv_remove_interface+0x83/0x130 [ 304.813023] Modules linked in: rfcomm iptable_nat bnep amdgpu snd_ctl_led snd_hda_codec_realtek hid_multitouch snd_hda_codec_generic snd_soc_dmic snd_acp3x_pdm_dma snd_acp3x_rn snd_hda_codec_hdmi snd_soc_core uvcvideo snd_hda_intel snd_intel_dspcfg videobuf2_vmalloc snd_hda_codec videobuf2_memops videobuf2_v4l2 videobuf2_common btusb snd_hda_core psmouse videodev btrtl snd_pcm serio_raw btintel btbcm mt7921e mfd_core mt7921_common drm_ttm_helper snd_pci_acp5x snd_timer mc mt76_connac_lib ttm snd snd_rn_pci_acp3x r8169 mt76 snd_pci_acp3x gpu_sched soundcore i2c_hid_acpi i2c_hid [ 304.813054] CPU: 1 PID: 2057 Comm: kworker/u32:79 Tainted: G W 5.16.0-gentoo-stolas2-20220113-r02-llvm+patchwork-12706336 #5 [ 304.813058] Hardware name: LENOVO 20XH005GUS/20XH005GUS, BIOS R1NET44W (1.14) 11/08/2021 [ 304.813060] Workqueue: events_unbound async_run_entry_fn [ 304.813063] RIP: 0010:drv_remove_interface+0x83/0x130 [ 304.813068] Code: 8b 8b a6 00 01 48 8b 83 28 02 00 00 48 8d b3 48 02 00 00 48 85 c0 48 0f 45 f0 48 c7 c7 cb 03 cf 89 89 ea 31 c0 e8 4d ee 14 ff <0f> 0b 40 f6 c5 20 75 9f eb c5 65 8b 05 c4 c7 a6 76 89 c0 48 0f a3 [ 304.813071] RSP: 0018:ffffb7d409203b80 EFLAGS: 00010246 [ 304.813073] RAX: 6be684163d7c1600 RBX: ffff9fbed28788c0 RCX: 0000000000000001 [ 304.813075] RDX: ffffffff89656e69 RSI: ffffffff89e8fc94 RDI: 00000000ffffffff [ 304.813077] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000004000000000 [ 304.813078] R10: 0000001000000000 R11: 0000000400000001 R12: ffff9fbecbfc9ab8 [ 304.813080] R13: ffff9fbed28788c0 R14: ffff9fbecbfc8820 R15: ffff9fbed28794c0 [ 304.813081] FS: 0000000000000000(0000) GS:ffff9fc19ee40000(0000) knlGS:0000000000000000 [ 304.813083] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 304.813085] CR2: 0000000000000000 CR3: 000000022840c000 CR4: 0000000000350ee0 [ 304.813087] Call Trace: [ 304.813089] <TASK> [ 304.813091] ieee80211_do_stop+0xa93/0xc40 [ 304.813097] ieee80211_stop+0x208/0x250 [ 304.813102] ? __local_bh_enable_ip+0x54/0x80 [ 304.813106] ? dev_deactivate_many+0x37d/0x400 [ 304.813111] __dev_close_many+0x1de/0x270 [ 304.813118] dev_close_many+0x33/0x230 [ 304.813122] cfg80211_shutdown_all_interfaces+0xb1/0x1b0 [ 304.813126] ? wiphy_suspend+0x280/0x280 [ 304.813129] wiphy_resume+0x184/0x1d0 [ 304.813132] device_resume+0x52f/0x6e0 [ 304.813134] async_resume+0x14/0xe0 [ 304.813137] async_run_entry_fn+0x68/0x150 [ 304.813139] process_one_work+0x1ea/0x3c0 [ 304.813143] worker_thread+0x35d/0x640 [ 304.813147] ? rcu_free_pool+0x30/0x30 [ 304.813151] kthread+0x214/0x250 [ 304.813154] ? rcu_free_pool+0x30/0x30 [ 304.813157] ? kthreadd+0x2f0/0x2f0 [ 304.813160] ret_from_fork+0x22/0x30 [ 304.813163] </TASK> [ 304.813164] ---[ end trace c298a5b435ef2f4c ]--- [ 304.813178] ------------[ cut here ]------------ [ 304.813179] WARNING: CPU: 1 PID: 2057 at net/mac80211/driver-ops.c:36 drv_stop+0x13e/0x1f0 [ 304.813185] Modules linked in: rfcomm iptable_nat bnep amdgpu snd_ctl_led snd_hda_codec_realtek hid_multitouch snd_hda_codec_generic snd_soc_dmic snd_acp3x_pdm_dma snd_acp3x_rn snd_hda_codec_hdmi snd_soc_core uvcvideo snd_hda_intel snd_intel_dspcfg videobuf2_vmalloc snd_hda_codec videobuf2_memops videobuf2_v4l2 videobuf2_common btusb snd_hda_core psmouse videodev btrtl snd_pcm serio_raw btintel btbcm mt7921e mfd_core mt7921_common drm_ttm_helper snd_pci_acp5x snd_timer mc mt76_connac_lib ttm snd snd_rn_pci_acp3x r8169 mt76 snd_pci_acp3x gpu_sched soundcore i2c_hid_acpi i2c_hid [ 304.813212] CPU: 1 PID: 2057 Comm: kworker/u32:79 Tainted: G W 5.16.0-gentoo-stolas2-20220113-r02-llvm+patchwork-12706336 #5 [ 304.813215] Hardware name: LENOVO 20XH005GUS/20XH005GUS, BIOS R1NET44W (1.14) 11/08/2021 [ 304.813216] Workqueue: events_unbound async_run_entry_fn [ 304.813218] RIP: 0010:drv_stop+0x13e/0x1f0 [ 304.813222] Code: ff 8e b8 06 00 00 41 c6 86 7d 06 00 00 00 65 48 8b 04 25 28 00 00 00 48 3b 44 24 40 75 10 48 83 c4 48 5b 41 5c 41 5e 41 5f c3 <0f> 0b eb e0 e8 f9 10 0a 00 65 8b 05 5a cb a6 76 89 c0 48 0f a3 05 [ 304.813224] RSP: 0018:ffffb7d409203b30 EFLAGS: 00010246 [ 304.813226] RAX: 0000000000000000 RBX: ffff9fbecbfc8820 RCX: 0000000000000000 [ 304.813227] RDX: ffffffff89656e69 RSI: ffffffff887726c9 RDI: ffff9fbecbfc8820 [ 304.813229] RBP: ffff9fbed28788c0 R08: 0000000000000000 R09: 0000004000000000 [ 304.813230] R10: 0000001000000000 R11: 0000000400000001 R12: ffff9fbecbfc9ab8 [ 304.813231] R13: ffff9fbed28788c0 R14: ffff9fbecbfc8820 R15: ffff9fbed28794c0 [ 304.813233] FS: 0000000000000000(0000) GS:ffff9fc19ee40000(0000) knlGS:0000000000000000 [ 304.813235] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 304.813236] CR2: 0000000000000000 CR3: 000000022840c000 CR4: 0000000000350ee0 [ 304.813238] Call Trace: [ 304.813239] <TASK> [ 304.813240] ieee80211_do_stop+0xb52/0xc40 [ 304.813245] ieee80211_stop+0x208/0x250 [ 304.813248] ? __local_bh_enable_ip+0x54/0x80 [ 304.813252] ? dev_deactivate_many+0x37d/0x400 [ 304.813255] __dev_close_many+0x1de/0x270 [ 304.813259] dev_close_many+0x33/0x230 [ 304.813263] cfg80211_shutdown_all_interfaces+0xb1/0x1b0 [ 304.813266] ? wiphy_suspend+0x280/0x280 [ 304.813268] wiphy_resume+0x184/0x1d0 [ 304.813270] device_resume+0x52f/0x6e0 [ 304.813272] async_resume+0x14/0xe0 [ 304.813275] async_run_entry_fn+0x68/0x150 [ 304.813277] process_one_work+0x1ea/0x3c0 [ 304.813300] worker_thread+0x35d/0x640 [ 304.813305] ? rcu_free_pool+0x30/0x30 [ 304.813311] kthread+0x214/0x250 [ 304.813315] ? rcu_free_pool+0x30/0x30 [ 304.813320] ? kthreadd+0x2f0/0x2f0 [ 304.813322] ret_from_fork+0x22/0x30 [ 304.813325] </TASK> [ 304.813325] ---[ end trace c298a5b435ef2f4d ]--- [ 304.814304] PM: dpm_run_callback(): wiphy_resume+0x0/0x1d0 returns -110 [ 304.814313] ieee80211 phy0: PM: failed to restore async: error -110 [ 304.815094] PM: hibernation: Basic memory bitmaps freed [ 304.815103] OOM killer enabled. [ 304.815105] Restarting tasks ... [ 304.816393] Loading firmware: mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin [ 304.821375] done. [ 304.822072] PM: hibernation: hibernation exit [ 307.947309] mt7921e 0000:03:00.0: Message 80000010 (seq 8) timeout [ 307.947317] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 308.349212] Bluetooth: hci0: Device setup in 3450936 usecs [ 311.083362] mt7921e 0000:03:00.0: Message 80000010 (seq 9) timeout [ 311.083376] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 314.219601] mt7921e 0000:03:00.0: Message 80000010 (seq 10) timeout [ 314.219612] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 317.355351] mt7921e 0000:03:00.0: Message 80000010 (seq 11) timeout [ 317.355369] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 320.491330] mt7921e 0000:03:00.0: Message 80000010 (seq 12) timeout [ 320.491341] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 323.627628] mt7921e 0000:03:00.0: Message 80000010 (seq 13) timeout [ 323.627639] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 326.763605] mt7921e 0000:03:00.0: Message 80000010 (seq 14) timeout [ 326.763615] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 329.899368] mt7921e 0000:03:00.0: Message 80000010 (seq 15) timeout [ 329.899378] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 333.035612] mt7921e 0000:03:00.0: Message 80000010 (seq 1) timeout [ 333.035622] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 336.171579] mt7921e 0000:03:00.0: Message 80000010 (seq 2) timeout [ 336.171591] mt7921e 0000:03:00.0: Failed to get patch semaphore [ 336.171613] mt7921e 0000:03:00.0: chip reset failed
To clarify: This is when the system is resuming from hibernate. I don't run into the same issue when resuming from sleep. emerge --info: Portage 3.0.28 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.2.0, glibc-2.33-r7, 5.16.0-gentoo-stolas2-20220113-r02-llvm+patchwork-12706336 x86_64) ================================================================= System uname: Linux-5.16.0-gentoo-stolas2-20220113-r02-llvm+patchwork-12706336-x86_64-AMD_Ryzen_7_PRO_5850U_with_Radeon_Graphics-with-glibc2.33 KiB Mem: 15239532 total, 13852636 free KiB Swap: 16777212 total, 16777212 free Timestamp of repository gentoo: Sat, 15 Jan 2022 00:00:02 +0000 Head commit of repository gentoo: 00d57ffb508542ac021d11efe2909452a1276562 Timestamp of repository guru: Fri, 14 Jan 2022 23:36:40 +0000 Head commit of repository guru: 6d69f0ed9716c96c6a25aa7278fd7d029c5310bb sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p8::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 3.9.9-r1::gentoo, 3.10.0_p1-r1::gentoo dev-lang/rust: 1.58.0::gentoo dev-util/cmake: 3.21.4::gentoo dev-util/meson: 0.59.4::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/sandbox: 2.25::gentoo sys-apps/systemd: 249.9::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 13.0.0::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.0::gentoo sys-devel/llvm: 13.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.16::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=znver3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=znver3" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="-j18 -l18" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=znver3" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=znver3" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j18 -l18" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/zsh" USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr emacs emboss encode exif flac fortran gdbm gif git gles2 gpm gtk gtk3 gui iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc lm-sensors lzma mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit postscript ppds pulseaudio qml qt5 readline rust-src sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg systemd tiff truetype udev udisks unicode upower usb vorbis webp widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha \ sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86 AMDGPU" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" SANE_BACKENDS="escl xerox_mfp" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi fbdev vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
There seems to be a lot of upstream activity concerning your hardware. https://marc.info/?l=linux-wireless&r=1&b=202201&w=2
Linux 5.16.3 was just released and the [changelog][1] contains a long list of changes involving the mt7921e driver. The log specifically mentions the issues discussed above. I'll be testing this version over the next few days. If all is well, I'll mark this bug as resolved. [1]: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.16.3
...and nope. I'm getting firmware lockups and resets. Using Linux 5.16.3, I get the following errors in the systemd journal: Jan 28 13:27:59 stolas2 kernel: Loading firmware: mediatek/WIFI_RAM_CODE_MT7961_1.bin Jan 28 13:27:59 stolas2 kernel: mt7921e 0000:03:00.0: WM Firmware Version: ____010000, Build Time: 2022011023> Jan 28 13:27:59 stolas2 kernel: mt7921e 0000:03:00.0: Firmware init done Jan 28 13:28:03 stolas2 kernel: mt7921e 0000:03:00.0: Message 00020001 (seq 10) timeout Jan 28 13:28:03 stolas2 kernel: mt7921e 0000:03:00.0: chip reset Jan 28 13:28:09 stolas2 systemd[1]: systemd-hostnamed.service: Deactivated successfully. Jan 28 13:28:09 stolas2 dhcpcd[441]: dhcpcd_prestartinterface: Connection timed out Jan 28 13:28:09 stolas2 dhcpcd[441]: wlp3s0: waiting for carrier Jan 28 13:28:09 stolas2 dhcpcd[441]: dummy0: probing for an IPv4LL address Jan 28 13:28:09 stolas2 kernel: mt7921e 0000:03:00.0: Message 000046ed (seq 11) timeout Jan 28 13:28:09 stolas2 kernel: Loading firmware: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin Jan 28 13:28:09 stolas2 kernel: mt7921e 0000:03:00.0: HW/SW Version: 0x8a108a10, Build Time: 20220110230855a Jan 28 13:28:09 stolas2 kernel: Loading firmware: mediatek/WIFI_RAM_CODE_MT7961_1.bin Jan 28 13:28:09 stolas2 kernel: mt7921e 0000:03:00.0: WM Firmware Version: ____010000, Build Time: 2022011023> Jan 28 13:28:09 stolas2 kernel: mt7921e 0000:03:00.0: Firmware init done I tried both the latest live ebuild of sys-kernel/linux-firmware and the previous version (no later than [this commit from upstream][1]; next commit updates firmware), and they didn't work. Oddly, this later firmware fails with the stable 5.15.16 as well. I had to revert to 5.15.16 *and* manually replace the latest firmware blobs in /var/firmware with the previous version (downloading from another device and transferring them through a portable drive due to lack of network connectivity) in order to get the NIC working again. What gives? The bug could be in both the upstream firmware and upstream kernel code. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=4954931df6542157865f5a44454caee68a7c4924
I meant /lib/firmware (manually replacing firmware blobs), sorry. In any case, the issue seems to lie upstream and we'll probably need to wait for further updates.