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.

Activation of Network Connection Failed

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.

  1. Open Settings of your system and in the left pane of the window, click on Network.
  2. Now disable the problematic connection by toggling the switching to the off position.
    Disable the Network Connection
  3. Then restart your system. Upon restart, enable the network connection and check if the problem is solved.
  4. If not, press the Alt + F2 keys simultaneously to open the run command box and type:
    nm-connection-editor
  5. Now expand the type of network you were having issues with e.g. ethernet and delete all the entries under it.
    Delete the Connection
  6. Then close all the network editor and click on the network icon in the system tray.
  7. Now disable the network and then reenable it.
    Disable the Network Connection from the System Tray
  8. 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.

  1. 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.
    Open Control Panel
  2. Now click on Hardware and Sound.
    Open “Hardware and Sound”
  3. Then click on Power Options.
    Click Power Options in Control Panel
  4. Now in the left pane of the window, click on Choose What the Power Buttons Do.
    Choose what Power Buttons do – Control Panel
  5. 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.
    Uncheck the Turn on fast startup
  6. 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.

  1. Open Settings of your Linux distro and click on Network.
  2. Then click on the gear icon next to the problematic network.
    Click the Gear Icon of the Network
  3. Now uncheck the option of Connect Automatically and apply your changes.
    Disable Connect Automatically
  4. 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.

  1. Execute the following command in the Linux terminal:
    sudo gedit /etc/NetworkManager/NetworkManager.conf
    Edit Network Manager Configuration
  2. Now change dns with dnsmasq and close the file after saving the changes.
  3. 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.

  1. Near the left bottom of the screen, click on Show Applications and then click on Settings.
  2. Now, in the left pane of the window, click on Date & Time.
  3. Then disable Automatic Date & Time.
  4. Now correct the date and time of your system and then check if the issue has been resolved.
    Change Date & Time

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.

  1. Remove any Bluetooth devices connected to your system.
  2. Open Settings of your system and in the left pane of the window, click on Bluetooth.
  3. Now disable Bluetooth.
    Disable Bluetooth
  4. Now launch the Linux terminal and type:
    bluetoothctl
    Open Bluetooth Contro
  5. Now a list of all Bluetooth devices will be shown. Then type the following command:
    bluetoothctl remove AA:BB:CC:DD:EE:FF
  6. 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.
  7. Repeat the process for all the Bluetooth devices and then check if the problem is solved.
  8. 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.

  1. Open the Linux terminal and type:
    sudo lshw -C network
    Open Network Connections through Linux Terminal
  2. 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.
  3. 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
    Create a File to Blacklist the Problematic Connection
  4. Now add following two lines in the file:
    blacklist cdc_ether
    
    blacklist usbnet
    Blacklist the Network Device
  5. Now save the file and restart your system.
  6. 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.

  1. Type the following command in the Linux terminal and press the enter key:
    sudo gedit /etc/modprobe.b/blacklist.conf
    Open the Blacklist File
  2. 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.
  3. 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.

  1. Launch the Linux Shell of your system and type the following command:
    sudo systemctl restart network-manager.service
    Restart Network Service
  2. Now check if the problem is solved.
  3. If not, then run the following command:
    sudo /etc/init.d/network-manager force-reload
    Force Reload Network Manager
  4. If asked for, then enter your user password and then check if the problem is solved.
  5. If not, then run the following command:
    sudo apt-get install -d --reinstall network-manager network-manager-gnome
    Reinstall Network Manager
  6. 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.

  1. 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/
  2. 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.

  1. Execute the following command in the Linux terminal:
    echo "options rt2800pci nohwcrypt=y"
    Disable Hardware Encryption by the Network Device
  2. 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/*
  3. 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.

  1. Open the Linux shell and type:
    sudo apt-get upgrade linux-image-generic
    Update the Linux Kernel
  2. 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.

  1. Open the Linux terminal and type:
    sudo apt-get upgrade
    Upgrade Ubuntu
  2. Enter the password of the user account and a list of available updates will be shown.
  3. Press the y key to confirm the update and then the Enter key.
  4. 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.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.