17
October
2022
22:58

Fix modprobe error: FATAL: Module p80211 not found in directory ... Failed to load p80211.ko

17 October 2022 22:58

In Debian Bullseye, a complex error began to occur: ping ya.ru "Unknown service" did not work, when restarting the networking service, the error "Module p80211 not found", a failure in DNS name resolution.

On my home PC I use the TP-Link TL-WN821N 300Mbps Wireless N USB Adapter. Operating system Sparky Linux version 6 (Debian Bullseye) has been working for me for two years. But after trying to compile and install the driver for the Atheros chip, as well as experiments with Oracle VirtualBox, the Wi-Fi network stopped starting normally. Symptoms: ping does not work, when restarting sudo service networking restart the error is:
modprobe: FATAL: Module p80211 not found in directory /lib/modules/6.0.0-sparky-amd64 Failed to load p80211.ko

searching for the error did not lead me to either a solution or an explanation of the cause of the problem. Since the module p80211.ko not present in any Linux kernels.
Therefore, the error is "induced" and the message is not true.

A way to solve the problem of not connecting to a Wi-Fi network from Debian

1) Removed incorrect, extra driver

sudo apt-get remove linux-wlan-ng

2) Installed the wpa-supplicant package, which is a “layer” between NetworkManager and the driver in the kernel.

sudo apt install wpasupplicant

3) Just in case, I checked that the NetWorkManager package called network-manager is installed

sudo apt-get install network-manager network-manager-gnome

4) I brought the contents of the NetworkManager configuration file to the appropriate form:

sudo nano /etc/Networkmanager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

To NetworkManager didn't manage network, and the configuration file worked /etc/network/interfaces).

5) Renamed the resolv.conf file

sudo mv /etc/resolv.conf /etc/resolv.old

6) Created a soft symbolic link to the automatic runtime file "resolv.conf".

sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

7) Configuration file type /etc/network/interfaces, which is applied when "[ifupdown]managed=false",
when NetworkManager is not involved in network management:

auto lo
iface lo inet loopback

auto enp2s0
allow-hotplug enp2s0
iface enp2s0 inet dhcp
iface enp2s0 inet6 dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
iface wlan0 inet6 dhcp
wpa-essid wi-fi_name
wpa-psk wi-fi_password
dns-nameservers 192.168.1.1

where 192.168.1.1 is the IP address of the Wi-Fi router.

If "[ifupdown]managed=true" this file is not used, Wi-Fi settings must be entered into the Network Manager applet.

8) If the Wi-Fi network “fell”, I raise it with two commands

sudo ifdown wlan0
sudo ifup wlan0

If the ifup command writes about lock, I delete the file that prevented the launch

sudo rm /run/network/ifstate.wlan0

9) Enabled and started the WPA-supplicant service

sudo systemctl unmask wpa_supplicant.service
sudo systemctl start wpa_supplicant.service

Alternatively, you can run the following command, which does the same thing:

sudo systemctl --now enable wpa_supplicant

As a result, the applet nm-tray shows whether you are connected to a Wi-Fi network.
(The nm-tray applet is a complete analogue of the nm-applet. Installed with the command apt install nm-tray).

10) Restarted so he could see managed=false, and checked the status of the NetworkManager service

sudo systemctl restart NetworkManager.service
sudo systemctl status NetworkManager.service


Related publications