Fix Wi-Fi for Intel Wi-Fi 6 AX201 on Ubuntu 18.04---GPT

zhaopw5發表於2024-09-22

GPT4 helped me do it successfully, so the follow steps are correct (at least for my ThinkPad computer)


How to Find Your Hardware Info for Wi-Fi Troubleshooting

Before attempting to fix Wi-Fi issues on Ubuntu, it's important to gather detailed hardware information about the system's Wi-Fi adapter and drivers. This helps to diagnose and apply the correct solution. Below are the key commands to find the necessary information:

Step 1: Identify Your Network Devices

Run the following command to list all network devices and their respective drivers. This will show both Ethernet and Wi-Fi hardware:

lspci -nnk | grep -iA3 net

Example Output:

00:14.3 Network controller [0280]: Intel Corporation Device [8086:51f0] (rev 01)
    Subsystem: Intel Corporation Device [8086:0074]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi
  • This shows the Wi-Fi adapter model and the driver used (iwlwifi in this case).
  • Note the PCI ID ([8086:51f0]), which uniquely identifies the hardware and is important when searching for drivers or firmware.

Step 2: Check If the Wi-Fi Module Is Loaded

Ensure the Wi-Fi module is loaded and check if it's active:

lsmod | grep iwlwifi

This command lists the loaded kernel modules related to Wi-Fi (like iwlwifi in the example above). If no output is shown, it means the driver is not loaded and needs to be installed or reloaded.

Step 3: Check for Firmware or Driver Errors in Kernel Logs

If your Wi-Fi adapter isn't working, the kernel logs might have clues about missing drivers or firmware:

dmesg | grep -i iwlwifi

Look for lines related to firmware loading errors or driver issues, such as:

iwlwifi 0000:00:14.3: no suitable firmware found!
iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-89.ucode failed

This output helps to identify whether the firmware is missing or incompatible, guiding you to download the right firmware files.

Step 4: Check for Software or Hardware Blocks

Sometimes the Wi-Fi interface can be blocked by software or hardware settings. To check this, use:

rfkill list

If the output shows Soft blocked: yes or Hard blocked: yes for Wi-Fi, you can unblock it by running:

sudo rfkill unblock all

Conclusion: Gather These Key Details

  • Wi-Fi Adapter Model: Found using lspci -nnk | grep -iA3 net.
  • Loaded Driver: Verified using lsmod | grep iwlwifi.
  • Firmware Errors: Check kernel logs with dmesg | grep -i iwlwifi.
  • Block Status: Verify with rfkill list.

Having this information will make it easier to follow the correct troubleshooting steps and find appropriate drivers or firmware. You can use this as a reference for troubleshooting Wi-Fi problems on different systems.


Then:

How to Fix Wi-Fi for Intel Wi-Fi 6 AX201 on Ubuntu 18.04

If you reinstall Ubuntu 18.04 on a ThinkPad with an Intel Wi-Fi 6 AX201 card, follow these steps to get the Wi-Fi working:

Step 1: Install Required Build Tools and Headers

You need the correct build tools to install the Wi-Fi drivers.

  1. Open a terminal (Ctrl + Alt + T) and run:
    sudo apt update
    sudo apt install build-essential linux-headers-$(uname -r) git
    

Step 2: Download and Install the Latest Wi-Fi Firmware

The Intel AX201 chipset requires specific firmware that isn't included in Ubuntu 18.04 by default.

  1. Download the required firmware file:

    wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-so-a0-hr-b0-89.ucode
    
  2. Move the downloaded file to the system firmware directory:

    sudo mv iwlwifi-so-a0-hr-b0-89.ucode /lib/firmware/
    
  3. Set the correct permissions for the firmware:

    sudo chmod 644 /lib/firmware/iwlwifi-so-a0-hr-b0-89.ucode
    

Step 3: Download and Install the Backported iwlwifi Driver

You'll need to backport the latest iwlwifi driver for your Wi-Fi card.

  1. Clone the backport repository:

    git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git
    
  2. Navigate to the cloned directory:

    cd backport-iwlwifi
    
  3. Build and install the driver:

    make defconfig-iwlwifi-public
    make -j4
    sudo make install
    

Step 4: Load the Wi-Fi Driver

Now, load the newly installed driver and ensure it works.

  1. Unload any existing iwlwifi module:

    sudo modprobe -r iwlwifi
    
  2. Load the new module:

    sudo modprobe iwlwifi
    

Step 5: Reboot the System

Reboot your system to apply the changes:

sudo reboot

Step 6: Verify Wi-Fi is Working

After rebooting:

  1. Check that the Wi-Fi interface is active:

    iwconfig
    

    You should see a wireless interface like wlp0s20f3.

  2. Check available Wi-Fi networks:

    nmcli device wifi list
    
  3. If needed, connect to a network:

    nmcli device wifi connect <SSID> password <Wi-Fi password>
    

Conclusion

By following these steps, you?ll get your Intel Wi-Fi 6 AX201 card working on Ubuntu 18.04 after a fresh installation. Keep this guide handy for future re-installations!


This guide should help you get Wi-Fi working without any issues in the future!

相關文章