NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.11k forks source link

Wifi network connection is not started automatically by NetworkManager using linux kernels higher than version >6.1 #227591

Open ionutnechita opened 1 year ago

ionutnechita commented 1 year ago

Hi NixOS Team,

A few days ago I completely reinstalled my system and the kernel is in the stable zone, but I notice a difference compared to 6.1.

On the 6.1 kernel, Network Manager is correctly initialized for wifi connections, I am not asked for the password for the wifi connection every time I turn on the laptop; on 6.2 and 6.3 I see that every time the system starts it asks for my password.

From what I can see, it would be a kernel issue, because adjustments were made in the wifi area 6, 6E and 7. But I think that the Network Manager should realize the new changes in the kernel and automatically adjust the authentication and control operations for wifi connections.

I think that this problem should be investigated on several kernel versions, desktop environments and new wifi modules.

At the moment I use: Kernel: 6.2.11 #1-NixOS SMP PREEMPT_DYNAMIC Thu Apr 13 15:02:59 UTC 2023 x86_64 GNU/Linux OS: 23.05pre475225.645bc49f34 / 23.05 (Stoat) / system.stateVersion = "23.05"; Wifi Controller: Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter (mt7921e) DE: KDE 5.27.4

In configuration.nix i have: boot.kernelPackages = pkgs.linuxPackages_latest;

In this case, until this issue is clarified, I will stay on 6.1 kernel version/lts zone.

Ticket without using template.

SmolPatches commented 1 year ago

I've been having a similar issue with MT7921K after upgrading, I'm going to try reverting to 6.1. Expect now nmtui/cli or even ip link / ip addr show my wireless interface.

alex-nt commented 1 year ago

I just had the same problem with the following config:

  networking = {
    wireless = {
      enable = true;
      networks = {
        <ssid> = {
          psk = "<pass>";
        };
      };
    };
  };

Adding the following config solved the issue (on RPI Zero 2 W):

networking.interfaces.wlan0.useDHCP = true;
networking.wireless.interfaces = ["wlan0"];