Quick Fixes for WiFi Disconnection on Ubuntu

Method 1: Disable WiFi Power Management

Ubuntu might automatically turn off WiFi to save power. Here’s how to stop that:

  1. Check Your Network Interface Name: Use
    iwconfig
    to find your network interface name (it’s wlan0 for many but can differ).
  2. Turn Off Power Management: Execute
    sudo iwconfig wlan0 power off
    , replacing wlan0 with your actual interface name.

Method 2: Edit NetworkManager Configuration

Prevent automatic disconnections by tweaking NetworkManager:

  1. Open Configuration File: Run
    sudo vi /etc/NetworkManager/NetworkManager.conf.
  2. Add Power Save Setting: Insert the following lines:
    [connection]
    wifi.powersave = 2
  3. Restart NetworkManager: Apply changes with
    sudo systemctl restart NetworkManager.

Encountered “Operation not supported”? If disabling power management directly doesn’t work, try this alternative:

Alternative Method: Use TLP for Advanced Power Management

TLP offers granular control over power settings, including WiFi:

  1. Install TLP: Update your system and install TLP with
    sudo apt update
    followed by
    sudo apt install tlp tlp-rdw.
  2. Start TLP: Activate TLP using
    sudo tlp start.
  3. Edit TLP Configuration: Modify
    /etc/tlp.conf
    to disable WiFi power management. Uncomment (or add) the lines:
    WIFI_PWR_ON_AC=off
    WIFI_PWR_ON_BAT=off
  4. Restart TLP: Make your changes effective with
    sudo tlp start

留下评论

通过 WordPress.com 设计一个这样的站点
从这里开始