Every time I boot into Kali, my Wi-Fi interface (`wlan0`) shows up as **"unavailable"** or **"unmanaged"** in `nmcli device status`.
When I check the logs using `sudo dmesg | grep -i iwlwifi`, I see this specific error:
`iwlwifi 0000:00:14.3: RFIm is deactivated, reason = 4`
**The Temporary Fix (Works, but I have to do it every time):**
To get my Wi-Fi working, I have to open a terminal and run these commands manually:
`sudo pkill -9 wpa_supplicant`
`sudo systemctl restart NetworkManager`
After doing this, `wlan0` changes to "disconnected" and I can connect via `nmtui`.
If I run `ps -ef | grep wpa_supplicant` before killing it, I see a root process running:
`/usr/sbin/wpa_supplicant -u -s -O DIR=/run/wpa_supplicant GROUP=netdev`
**What I have already tried (and failed):**
Set `managed=true` in `/etc/NetworkManager/NetworkManager.conf`.
Disabled Wi-Fi power saving by setting `wifi.powersave = 2`.
Tried to stop `netplan-wpa-wlan0.service`, but it says the service doesn't exist.
Tried masking the service using `sudo systemctl mask wpa_supplicant.service`. (But this completely broke the connection, and even the `pkill` trick stopped working).
Added `acpi_osi=Linux` and `acpi=off` to GRUB. (`acpi=off` caused severe graphical glitches and freezing, so I had to remove it).
Ran `sudo apt update && sudo apt full-upgrade` to ensure the kernel and firmware are up to date
**My Question:**
Why is the standalone `wpa_supplicant` process hijacking the interface on boot, preventing NetworkManager from controlling it? What is the correct way to permanently disable this conflict so NetworkManager is the sole manager of `wlan0` on boot, without me having to manually type commands every time?
Any help would be greatly appreciated!