Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent Wi-Fi connectivity issues on boot (mt7921e driver) #254

Closed
jacobktm opened this issue May 1, 2023 · 4 comments
Closed

Intermittent Wi-Fi connectivity issues on boot (mt7921e driver) #254

jacobktm opened this issue May 1, 2023 · 4 comments

Comments

@jacobktm
Copy link

jacobktm commented May 1, 2023

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

The issue is related to the mt7921e Wi-Fi driver, which is part of the kernel.

Issue/Bug Description:

Sporadically, during system boot, Wi-Fi is unavailable, and no networks can be detected or connected to. This issue does not occur on every boot, but it happens occasionally. A reboot or system suspension resolves the problem, and Wi-Fi becomes available again.

Steps to reproduce (if you know):

  1. Boot the system.
  2. Occasionally, the Wi-Fi is not available during the boot process.

Expected behavior:

Wi-Fi should be consistently available and functional during every system boot without requiring a reboot or suspension to resolve the issue.

Other Notes:

I have seen this behavior on several systems with a MediaTek wireless adapter, including pang12, mira-r3, and major-r4. The Wi-Fi driver in question is the mt7921e driver, which is part of the kernel. I have also seen this issue in both Pop!_OS 22.04 and Ubuntu 22.04 with the Pop PPA and kernel installed.

@jacobktm
Copy link
Author

jacobktm commented May 1, 2023

Here are journalctl logs from two different systems where wifi was not available at boot

journalwifi.log
journalwifi.log

@leviport
Copy link
Member

leviport commented May 1, 2023

This should probably go to the Linux repo if those drivers are part of the kernel

@leviport leviport transferred this issue from pop-os/pop May 1, 2023
@0dinD
Copy link

0dinD commented Jul 14, 2023

I don't think the MediaTek drivers are part of the kernel itself, but rather, they are part of the separately distributed linux-firmware package: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENCE.mediatek


I think this issue describes the same problem as mentioned here: pop-os/pop#530 (comment)

At least two other people have reported issues with the MediaTek MT7921/MT7922 Wi-Fi devices in that issue, and other than Wi-Fi sometimes being unavailable on boot, there seems to be a related issue where the laptop also hangs during shutdown whenever the Wi-Fi is unavailable. If you are having only the Wi-Fi issue, but not the "hang during shutdown" issue, maybe the MT7921E that you have behaves slightly differently than the MT7921 and MT7922.

Either way, MediaTek have submitted several patches for these 3 Wi-Fi devices during the past months, so I'm hoping that pop-os/linux-firmware#35 will have fixed the issue. I think all that's left before we can try the 20230629 version of linux-firmware is a release here: https://github.com/pop-os/repo-release

EDIT: The new version of linux-firmware is now available in the Pop!_OS APT repository, let's try it and hope that it fixes the issue.

@pktiuk
Copy link

pktiuk commented Jul 20, 2023

EDIT: The new version of linux-firmware is now available in the Pop!_OS APT repository, let's try it and hope that it fixes the issue.

I think this issue can be closed for now. In my case I did not have this problem since the update (this is not a very long time, but still). How about you @jacobktm ?

In case if this is not fixed it could be reopened

mmstick pushed a commit that referenced this issue Jul 6, 2024
… rules

[ Upstream commit 16d66a4 ]

rx_create no longer allocates a modify_hdr instance that needs to be
cleaned up. The mlx5_modify_header_dealloc call will lead to a NULL pointer
dereference. A leak in the rules also previously occurred since there are
now two rules populated related to status.

  BUG: kernel NULL pointer dereference, address: 0000000000000000
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  PGD 109907067 P4D 109907067 PUD 116890067 PMD 0
  Oops: 0000 [#1] SMP
  CPU: 1 PID: 484 Comm: ip Not tainted 6.9.0-rc2-rrameshbabu+ #254
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Arch Linux 1.16.3-1-1 04/01/2014
  RIP: 0010:mlx5_modify_header_dealloc+0xd/0x70
  <snip>
  Call Trace:
   <TASK>
   ? show_regs+0x60/0x70
   ? __die+0x24/0x70
   ? page_fault_oops+0x15f/0x430
   ? free_to_partial_list.constprop.0+0x79/0x150
   ? do_user_addr_fault+0x2c9/0x5c0
   ? exc_page_fault+0x63/0x110
   ? asm_exc_page_fault+0x27/0x30
   ? mlx5_modify_header_dealloc+0xd/0x70
   rx_create+0x374/0x590
   rx_add_rule+0x3ad/0x500
   ? rx_add_rule+0x3ad/0x500
   ? mlx5_cmd_exec+0x2c/0x40
   ? mlx5_create_ipsec_obj+0xd6/0x200
   mlx5e_accel_ipsec_fs_add_rule+0x31/0xf0
   mlx5e_xfrm_add_state+0x426/0xc00
  <snip>

Fixes: 94af50c ("net/mlx5e: Unify esw and normal IPsec status table creation/destruction")
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants