Fix: Activation of Network Connection Failed in Linux
Your Linux distribution may fail to activate network connection due to the misconfiguration of your network. Also, incorrect date/time settings of your system may also cause the error under discussion.
The affected user encounters the error when he logs in to the system or tries to use the internet. Some users faced it just after installing the OS, whereas other users encounter it after some time. This issue is not limited to a particular Linux distro, nearly all the distros are affected by it. Moreover, the issue can occur on ethernet as well as on the Wi-Fi connection.
Before moving on with the solutions, make sure your router and modem are connected. If the issue is with a USB modem, then try to connect to a different port of the system. Moreover, restart your system and networking equipment. If both ethernet and Wi-Fi are not working, then try to use a USB dongle to connect to the internet or try to use the hotspot of your phone. Additionally, enable/disable the airplane mode of your system and check if the problem is solved.
Solution 1: Disable/Enable the Network Connection
The issue could be caused by a temporary software glitch and could be cleared by reinitializing the network connection. For illustration, we will discuss the process for Ubuntu.
- Open Settings of your system and in the left pane of the window, click on Network.
- Now disable the problematic connection by toggling the switching to the off position.
- Then restart your system. Upon restart, enable the network connection and check if the problem is solved.
- If not, press the Alt + F2 keys simultaneously to open the run command box and type:
nm-connection-editor
- Now expand the type of network you were having issues with e.g. ethernet and delete all the entries under it.
- Then close all the network editor and click on the network icon in the system tray.
- Now disable the network and then reenable it.
- Now restart your system and then check if the problem is solved.
Solution 2: Disable Fast Boot (Dual Boot System)
The fast startup option of Windows is known to create issues for dual boot systems with Linux. The same could be the reason for the current issue. In this context, disabling fast boot in Windows may solve the problem.
- In the Windows environment of your system, click on the Windows Search box and type Control Panel. In the search results shown, click on Control Panel.
- Now click on Hardware and Sound.
- Then click on Power Options.
- Now in the left pane of the window, click on Choose What the Power Buttons Do.
- Uncheck the option of Turn on Fast Startup. If the option is grayed out, click on Change Settings that are Currently Unavailable and then uncheck the said option.
- Now save changes and boot into the Linux environment to check if the problem is solved. You may have to fully uninstall/reinstall your Linux distro.
Solution 3: Disable Connect Automatically for the Network
It can be quite annoying for a user to get the error prompts for a connection type he is not using e.g. a USB ethernet. You can get rid of the prompt for that particular network by disabling the Connect Automatically option.
- Open Settings of your Linux distro and click on Network.
- Then click on the gear icon next to the problematic network.
- Now uncheck the option of Connect Automatically and apply your changes.
- Then check if the connection issue is resolved.
Solution 4: Change DNS to DNSMASQ for the Network
You may encounter the error under discussion if your system is having trouble with DNS. In this scenario, switching to the free DNSMASQ (which requires low system resources) may solve the problem.
- Execute the following command in the Linux terminal:
sudo gedit /etc/NetworkManager/NetworkManager.conf
- Now change dns with dnsmasq and close the file after saving the changes.
- Now restart your system and then check if the issue has been resolved.
Solution 5: Correct Date/Time Settings of Your System
The date/time settings of your system play different roles in the operation of your system. You may encounter the error under discussion if the date/time settings of your system are not correct. In this context, correcting the date/time settings of your system may solve the problem.
- Near the left bottom of the screen, click on Show Applications and then click on Settings.
- Now, in the left pane of the window, click on Date & Time.
- Then disable Automatic Date & Time.
- Now correct the date and time of your system and then check if the issue has been resolved.
Solution 6: Delete the Bluetooth Devices in the Settings of Your System
If you have configured many Bluetooth devices, which are not available (at the occurrence of the error), then the error is triggered as the network manager will not be able to connect any of those devices. In this context, deleting the Bluetooth devices may solve the problem.
- Remove any Bluetooth devices connected to your system.
- Open Settings of your system and in the left pane of the window, click on Bluetooth.
- Now disable Bluetooth.
- Now launch the Linux terminal and type:
bluetoothctl
- Now a list of all Bluetooth devices will be shown. Then type the following command:
bluetoothctl remove AA:BB:CC:DD:EE:FF
- Replace AA:BB:CC:DD:EE:FF with the ID string of the device. You can find the ID string by selecting the network icon>>Device Name>>Gear Icon.
- Repeat the process for all the Bluetooth devices and then check if the problem is solved.
- If not, check the path of the .crt file. If there are spaces in the name of the folder (in which .crt file is stored), remove spaces and then check if the problem is solved.
Solution 7: Blacklist Other Communication Devices
You may encounter the error under discussion if there is second ethernet/Wi-Fi like device present on the system like a built-in 4G device and your system is trying to use that device to connect to the internet. In this scenario, blacklisting other communication devices may solve the problem.
- Open the Linux terminal and type:
sudo lshw -C network
- Then a list of network devices will show up. Now check for the device that you are not using. For example, cdc_ether (which you are not using) is shown in the network devices.
- Now, type the following command in the terminal (which will create a new blacklist file):
sudo -H gedit /etc/modprobe.d/blacklist-cdc_ether.conf
- Now add following two lines in the file:
blacklist cdc_ether blacklist usbnet
- Now save the file and restart your system.
- Upon restart, check if the issue has been resolved. Keep in mind that whenever you have to use the internal 4G device, you should enable it.
Solution 8: Remove the Network Drivers from the Blacklist
You may encounter the error under discussion if the network device is blacklisted in the system. In this context, removing the files from the blacklist may solve the problem.
- Type the following command in the Linux terminal and press the enter key:
sudo gedit /etc/modprobe.b/blacklist.conf
- Now, in the file opened, check if the network-related drivers/modules are blacklisted. For example, if you are using a Broadcom network card, then remove the entries related to bcma and bcmsmac.
- Now restart your system and then check if the problem is solved.
Solution 9: Reinstall the Network Manager
The network manager is responsible for all the network-related operations in a Linux distro. You may encounter the error at hand if the installation of your network manager has corrupted. In this context, reinstalling the network manager may solve the problem.
- Launch the Linux Shell of your system and type the following command:
sudo systemctl restart network-manager.service
- Now check if the problem is solved.
- If not, then run the following command:
sudo /etc/init.d/network-manager force-reload
- If asked for, then enter your user password and then check if the problem is solved.
- If not, then run the following command:
sudo apt-get install -d --reinstall network-manager network-manager-gnome
- Now check if the problem is solved.
Solution 10: Disable Power Management of the Network Card/Driver
Power management implementation is known to cause issues for network connections. The same could be the reason for the current error. In this context, disabling power management may solve the problem. For illustration, we will discuss the process for Ubuntu and RTL8192CU driver.
- Open the Linux terminal and execute the following commands one by one:
sudo apt-get install linux-headers-generic build-essential dkms sudo apt-get install git git clone https://github.com/pvaret/rtl8192cu-fixes.git sudo dkms add ./rtl8192cu-fixes sudo dkms install 8192cu/1.11 sudo depmod -a sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
- Now reboot your system and then check if the problem is solved.
Solution 11: Disable the Hardware Encryption by the Network Device
You may encounter the error under discussion if your network device is having trouble in encryption. In this context, disabling the hardware encryption may solve the problem. For elucidation, we will discuss the process for Ubuntu and RT2800PCI device.
- Execute the following command in the Linux terminal:
echo "options rt2800pci nohwcrypt=y"
- Then execute the following commands one by one:
sudo tee /etc/modprobe.d/rt2800pci.conf sudo modprobe -rfv rt2800pci sudo modprobe -v rt2800pci sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*
- Now restart your system and then check if the problem has been solved.
Solution 12: Update the Kernel of Your Linux Distro to the Latest Build
The Linux kernel is the central core of the OS and is a mediator between software applications and computer hardware. It is the foundation of all the different types of Linux distro. The kernel is regularly updated to cater to new technological advancements and patch the known bugs. You may encounter the error under discussion if the kernel of your Linux distro is an outdated one. In this context, updating the Linux kernel may solve the problem. We will discuss the process for Ubuntu.
- Open the Linux shell and type:
sudo apt-get upgrade linux-image-generic
- Now restart your system and then check if the connection problem has been solved.
Solution 13: Upgrade Your Linux Variant to the Latest Build
To add new features and patch the known bugs, every variant of Linux is updated. You may encounter the error under discussion if you are using an outdated version of the Linux distro. In this context, updating the distro may solve the problem. For elucidation, we will discuss the process for Ubuntu.
- Open the Linux terminal and type:
sudo apt-get upgrade
- Enter the password of the user account and a list of available updates will be shown.
- Press the y key to confirm the update and then the Enter key.
- Now wait for the completion of the update process and then check if the problem has been solved.
If nothing has helped you so far, then you may have to reinstall your Linux distro. But before reinstalling, it will be a good idea to try the iwconfig command. Also, try to update BIOS of your system. Moreover, try the WICD network manager. Furthermore, try to use IPV6 (Link-Local) or disable TCP.