Mt7921e - Wifi won't work on reboot, but will on shutdown

Wi-Fi will work fine if I fully shutdown and boot the computer, but if if I try to just reboot Wi-Fi will not even show as an option. Toggle of Airplane mode will toggle Bluetooth, but not Wi-Fi. It will still show as a device under the hardware listings though.

╰─λ inxi -Faz
System:    Kernel: 5.15.2-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=ba2fb729-b4b9-49f0-8223-47f0378d19c9
rw [email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM
Distro: Garuda Linux base: Arch Linux
Machine:   Type: Laptop System: ASUSTeK product: ROG Strix G513QM_G513QM v: 1.0 serial: <filter>
Mobo: ASUSTeK model: G513QM v: 1.0 serial: <filter> UEFI: American Megatrends LLC.
v: G513QM.314 date: 09/03/2021
Battery:   ID-1: BAT0 charge: 25.3 Wh (30.0%) condition: 84.4/90.0 Wh (93.8%) volts: 14.5 min: 15.9
model: AS3GWAF3KC GA50358 type: Li-ion serial: <filter> status: Discharging
CPU:       Info: 8-Core model: AMD Ryzen 9 5900HX with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3
family: 19 (25) model-id: 50 (80) stepping: 0 microcode: A50000B cache: L2: 4 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 105404
Speed: 1396 MHz min/max: 1200/3300 MHz boost: enabled Core speeds (MHz): 1: 1396 2: 1894
3: 1491 4: 1396 5: 1394 6: 1395 7: 1397 8: 1395 9: 1396 10: 1396 11: 1395 12: 1395 13: 1395
14: 1397 15: 1396 16: 1396
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW, STIBP: always-on, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: ASUSTeK driver: nvidia
v: 495.44 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:2520 class-ID: 0300
Device-2: AMD Cezanne vendor: ASUSTeK driver: amdgpu v: kernel bus-ID: 06:00.0
chip-ID: 1002:1638 class-ID: 0300
Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: modesetting,nvidia
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
Monitor-1: eDP-1 res: 1920x1080 hz: 144 dpi: 142 size: 344x193mm (13.5x7.6")
diag: 394mm (15.5")
OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.15.2-zen1-1-zen LLVM 13.0.0) v: 4.6 Mesa 21.2.5
direct render: Yes
Audio:     Device-1: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 01:00.1
chip-ID: 10de:228e class-ID: 0403
Device-2: AMD vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 06:00.1
chip-ID: 1002:1637 class-ID: 0403
Device-3: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: ASUSTeK driver: N/A
alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x bus-ID: 06:00.5 chip-ID: 1022:15e2
class-ID: 0480
Device-4: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
Device-5: SteelSeries ApS SteelSeries Arctis 1 Wireless type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-1:2 chip-ID: 1038:12b3 class-ID: 0300
Sound Server-1: ALSA v: k5.15.2-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169
v: kernel port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp2s0 state: down mac: <filter>
Device-2: MEDIATEK vendor: AzureWave driver: mt7921e v: kernel port: N/A bus-ID: 03:00.0
chip-ID: 14c3:7961 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Bluetooth: Device-1: IMC Networks Wireless_Device type: USB driver: btusb v: 0.8 bus-ID: 3-4:2
chip-ID: 13d3:3563 class-ID: e001 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:    Local Storage: total: 1.4 TiB used: 92.78 GiB (6.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:2 vendor: SK Hynix model: HFM001TD3JX013N size: 953.87 GiB
block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 41000C20 temp: 38.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Intel model: SSDPEKKW512G8 size: 476.94 GiB
block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 004C temp: 41.9 C scheme: GPT
Partition: ID-1: / raw-size: 476.94 GiB size: 476.94 GiB (100.00%) used: 92.75 GiB (19.4%) fs: btrfs
dev: /dev/nvme1n1p1 maj-min: 259:1
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 25.5 MiB (26.6%) fs: vfat
dev: /dev/nvme0n1p1 maj-min: 259:3
ID-3: /home raw-size: 476.94 GiB size: 476.94 GiB (100.00%) used: 92.75 GiB (19.4%) fs: btrfs
dev: /dev/nvme1n1p1 maj-min: 259:1
ID-4: /var/log raw-size: 476.94 GiB size: 476.94 GiB (100.00%) used: 92.75 GiB (19.4%)
fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:1
ID-5: /var/tmp raw-size: 476.94 GiB size: 476.94 GiB (100.00%) used: 92.75 GiB (19.4%)
fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:1
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.12 GiB used: 2.5 MiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 60.0 C mobo: N/A gpu: amdgpu temp: 52.0 C
Fan Speeds (RPM): cpu: 0
Info:      Processes: 381 Uptime: 2m wakeups: 5 Memory: 15.12 GiB used: 2.72 GiB (18.0%) Init: systemd
v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1777 lib: 541
Shell: fish v: 3.3.1 default: Bash v: 5.1.8 running-in: konsole inxi: 3.3.08

Dual booting with Windows?

If you dual boot with windows, disable fast-startup mode.

Install and test the linux and linux-mainline kernels, (and possibly others).

The linux-xanmod-rog kernel may also be worth a try. The linux-xanmod-rog kernel contains the custom Xanmod kernel and modules with patches for ASUS ROG laptops.

Also, Install and test the linux-firmware-git package.

5 Likes

I do have Windows on my other nvme, but I think fast-startup is already disabled; I'll double check.

The linux-xanmod-rog kernel sounds interesting, do you know if it supports everything that Zen does?

Simply having windows installed is enough to create issues like this. Disable any advanced power saving features of your wifi adapter in Windows device manager.

I don't use an Asus ROG laptop, so I'm unfamiliar with the kernel tweaks it uses.

2 Likes

Alright I appreciate the input! I'll assume that's the fix and mark this resolved. I've not used Windows once since I found this distro, I'm loving it. <3

1 Like

Sometimes resetting your bios to the factory default can help in cases like this. You will need to alter some windows specific bios setting such as secure boot and fast boot afterwards.

I would simply leave the thread open until you find the correct answer.

2 Likes

Things I've done:

Tried the linux-xanmod-rog kernel

BIOS Reset and confirmed Fast Boot disabled

In Windows:
Hybrid Sleep disabled and confimed no power mangement on the WiFi NIC

Issue persist

Same Issue after rebooting Device-2 (My Wi-Fi) shows different when I run inxi -Faz

When Wi-Fi is working. (i.e. After booting from cold)
Device-2: MEDIATEK vendor: AzureWave driver: mt7921e v: kernel port: N/A bus-ID: 03:00.0 chip-ID: 14c3:7961 class-ID: 0280

After a reboot

Device-2: MEDIATEK vendor: AzureWave driver: N/A modules: mt7921e port: N/A bus-ID: 03:00.0

So it's not seeing the driver after a reboot. Any idea?


Have you checked for a bios update?


Please test all prior suggestions^^^


Have you tried modprobing your driver when the wifi isn't working?

modprobe -r mt7921e; modprobe mt7921e

Please post the output.


Check your logs for wifi errors on failed startups (post wifi related excerpts).

sudo dmesg | grep -Ei 'mediatek|mt7921e|wl|firm' 

Check for a wifi soft or hard block on failed startups (post output):

sudo rfkill list

There is an off chance the Bluetooth driver is conflicting if it loads first when rebooting.

Is your Bluetooth working correctly?


is there any difference if the power is unplugged or the battery removed when rebooting?


Are you sure you unchecked the Allow the computer to turn off this device to save power setting in Windows?. This symptom still points towards Windows interfering with your wifi. Also, be sure your wifi driver is fully updated in Windows.


Please answer all questions put to you and perform all troubleshooting suggestions put forward (not just some).


2 Likes

Have you checked for a bios update?

Yes all is up to date


Please test all prior suggestions^^^

Sorry wasn't meaning to be vague there, I tried those as well as the LTS kernel, I am just currently on the Asus Kernel. Once they didn't resolve the issue I didn't keep them for my final test. I'll make sure to be more clear on my steps in the future.


Have you tried modprobing your driver when the wifi isn't working?

modprobe -r mt7921e; modprobe mt7921e

Please post the output.

modprobe: FATAL: Module mt7291e not found.
modprobe: FATAL: Module mt7291e not found in directory /lib/modules/5.15.3-zen1-1-zen

Interestingly it also does this when Wi-Fi is working.


Check your logs for wifi errors on failed startups (post wifi related >excerpts).

sudo dmesg | grep -Ei 'mediatek|mt7921e|wl|firm' 

Output is below

[    0.079307] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.219814] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.226217] ACPI: PM: Power Resource [PRWL]
[    0.226964] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-7f] only partially covers this bridge
[    0.543695] [drm] Loading DMUB firmware via PSP: version=0x01010019
[    0.543762] [drm] Found VCN firmware Version ENC: 1.14 DEC: 5 VEP: 0 Revision: 20
[    0.543764] amdgpu 0000:06:00.0: amdgpu: Will use PSP to load VCN firmware
[    2.075683] usb 3-4: Manufacturer: MediaTek Inc.


Check for a wifi soft or hard block on failed startups (post output):

sudo rfkill list

Output is below

0: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

There is an off chance the Bluetooth driver is conflicting if it loads first >when rebooting.

Is your Bluetooth working correctly?

Bluetooth does continue to work


is there any difference if the power is unplugged or the battery removed when rebooting?

No change.


Are you sure you unchecked the Allow the computer to turn off this device to save power setting in Windows?. This symptom still points towards Windows interfering with your wifi. Also, be sure your wifi driver is fully updated in Windows.

Just booted back in to Windows to triple check, no power management enabled on the wifi and everything is up to date


Please answer all questions put to you and perform all >troubleshooting suggestions put forward (not just some).

Sorry I wasn't trying to be too vague on my reply, I just didn't mention the other kernels I tested since they weren't in the final setup I was using to post the logs.


I also noticed that it shows as Unknown device name under the Hardware Config software built in.

I actually found an upstream report for this in Arch, it's flagged as [Solved] but it looks like there is some disagreement on the OP's fix.

https://bbs.archlinux.org/viewtopic.php?id=267229

In your BIOS, is Fast Boot set to fully re-scan your hardware? I've had BT problems In Linux caused by Windows. My BIOS Fast Boot option was set to a minimal hardware scan, and when I changed it to a maximum scan, Linux (and Windows) re-acquired it. I wonder if something like that may be interfering?

3 Likes

Fast Boot is disabled on my BIOS currently

1 Like

So you did try the linux-firmware-git package without success? I would return to the normal linux-firmware rather than leaving the git package installed.

I did a considerable amount of reading on your wifi issue. Most of the problems posted were from a while back because this adapter was so new it didn't have proper kernel support until 4.12. While the kernel may officially support this chip, it seems there are still quite a few bugs to be worked out with this new adapter.

My first suspicion was that Windows was responsible for this problem. Reading numerous reports confirmed that Windows was indeed known to mess with this chip (with the exact symptoms you are experiencing). I read one report that claimed there was an Asus utility that also was responsible for controlling power saving settings in Windows. You may want to search carefully to see if you can locate and disable any other Windows advanced power saving features. I believe there is also a Windows command that can be run to disable all powersaving features. Been ages since I used Windows, so I'm not up on that anymore.

I'm not sure where to go with this from here as I believe all of the known fixes for this adater have been tested.

Edit:

The only thing I can think of that I never saw reported is a conflict with the Bluetooth driver. Some chips require wifi to be loaded before bloototh or they won't function.

You might want to test temporarily blacklisting the Bluetooth module btusb as a test, just to rule that out.

2 Likes

Thanks for all your help on this.

Swapped back to linux-firmware

I will continue to search for more Windows Power things I could miss, or if there is a script. I did find and disable the Asus one; but that wasn't the ticket.

I just need to add the module and its dependencies to blacklist.conf is that correct? it's been a hot minute since I tinkered with that.

You don't need to add the dependencies, only btusb needs to be added to the blacklist. It's pretty simple to create a blacklist.

Sadly you may just have to wait for improvements to your bios, the kernel, or your driver/firmware for this situation to improve. I never found any threads where this issue was actually corrected by any workaround. Hopefully something comes along soon, but at least in the mean time your computer's usefullness is not too handicapped by this bug.

Edit:

Another thought just occurred to me. You might want to try changing your idle state settings (S3 etc) in your bios. I'm sure others have probably tried this, but it's worth a shot I guess.

1 Like

Yeah I tried the BT fix and no change, but yeah this isn't really a dealbreaker. I just boot again when it happens; which is fine.

I'll check that in the BIOS. Also oddly, It seems to only be a thing that happens 80-90% of the time. I rebooted to test one of the fixes this morning, and wifi worked. Rebooted again? DoA.

Super minor bug overall. I'll report in if BIOS fixes it, otherwise we can just close this as a
shrug for now!

Nope. Didn't fix it, but all good! Tons of help and I really appreciate it. If I can find the script to kill all Windoze power management ill try that but we can stop barking up trees now!

1 Like