Back to Blog
raspberry pitroubleshootingwifi speedlinux

How to Fix WiFi Issues on Raspberry Pi: Slow Speeds, Drops, and Connection Failures

Raspberry Pi WiFi problems range from “can’t connect at all” to frustrating random drops and mysteriously slow speeds. This guide walks through every fix — from country codes and rfkill to HDMI interference and WPA3 compatibility.

How to Fix WiFi Issues on Raspberry Pi: Slow Speeds, Drops, and Connection Failures
8 min read

The Raspberry Pi’s built-in WiFi is capable and convenient, but it comes with a unique set of quirks that can leave even experienced users stumped. Whether your Pi won’t connect at all, keeps dropping the connection, or hits speeds far below what the rest of your devices get, there’s almost always a specific, fixable cause. This guide covers every common issue in order from quickest to diagnose to most involved.

Fix 1: Set Your WiFi Country Code

This is the single most common reason a Raspberry Pi won’t connect to WiFi out of the box. Raspberry Pi OS disables the WiFi radio entirely until it knows your country, because different countries permit different frequency channels and transmit power levels. Until the country is set, the wireless interface is blocked by rfkill and won’t appear to work at all.

To set it, run sudo raspi-config, navigate to Localisation Options → WLAN Country, and select your country. Alternatively, add country=US (replace with your two-letter country code) to /etc/wpa_supplicant/wpa_supplicant.conf. Reboot after making the change. Country codes are case-sensitive — use uppercase letters only (e.g., GB for the UK, not gb).

Fix 2: Check rfkill Status

Even after setting a country code, the WiFi adapter can remain blocked by rfkill. Run rfkill list to see the current state. If you see “Soft blocked: yes” next to phy0 or wlan0, unblock it with:

sudo rfkill unblock wlan0
sudo rfkill unblock all

Then bring the interface up: sudo ip link set wlan0 up. If the block returns after every reboot, the underlying cause is usually a missing or incorrect country code — go back to Fix 1.

Fix 3: Verify wpa_supplicant.conf Syntax

A malformed /etc/wpa_supplicant/wpa_supplicant.conf file will silently prevent any connection. Check the file looks like this:

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YourNetworkName"
    psk="YourPassword"
    key_mgmt=WPA-PSK
}

One subtle issue: if you edited this file on a Windows PC, it may have Windows-style line endings (CRLF) that confuse the parser. Fix it with sudo dos2unix /etc/wpa_supplicant/wpa_supplicant.conf (install the package first: sudo apt install dos2unix). After editing the file, restart the service: sudo systemctl restart wpa_supplicant.

Fix 4: Update Firmware and System Packages

Raspberry Pi OS ships updated WiFi firmware as part of the normal package manager. Running the system update command installs the latest wireless driver fixes and kernel patches:

sudo apt update && sudo apt full-upgrade -y
sudo reboot

This alone resolves many intermittent drop and slow-speed issues, especially on Pi 4 and Pi 5 models. Check the current firmware version with vcgencmd version if you want to confirm the update took effect.

Fix 5: Resolve HDMI Interference on 2.4 GHz

This one surprises most people: running a high-resolution display (2560×1440 or 4K) at high refresh rates through an unshielded HDMI cable generates radio frequency interference that directly overlaps the 2.4 GHz WiFi band. If your Pi’s WiFi worked fine on a 1080p screen but becomes unreliable after connecting a 4K monitor, this is likely the cause.

Solutions, in order of effectiveness:

  • Switch to a shielded HDMI cable — look for cables rated for 4K with braided shielding.
  • Force your WiFi to the 5 GHz band, which is not affected by HDMI interference (see Fix 6).
  • Add hdmi_drive=1 to /boot/config.txt to reduce HDMI output power slightly.

Fix 6: Force the 5 GHz Band

Pi 4, Pi 400, Pi 5, and the Pi Zero 2 W all support both 2.4 GHz and 5 GHz. If your router broadcasts both bands under the same SSID (band steering), the Pi may connect to whichever band gives a stronger signal at boot — often 2.4 GHz, which is slower and more congested. To force 5 GHz, add a frequency hint in wpa_supplicant.conf:

network={
    ssid="YourNetworkName"
    psk="YourPassword"
    key_mgmt=WPA-PSK
    freq_list=5180 5200 5220 5240
}

The values above are common 5 GHz channels (36, 40, 44, 48). Alternatively, log into your router and split the 2.4 GHz and 5 GHz bands into separate SSIDs, then connect the Pi to the 5 GHz one. See our 2.4 GHz vs 5 GHz guide for more detail on when each band is the better choice.

Fix 7: WPA3 Compatibility Issues

The Raspberry Pi’s WiFi drivers have historically had inconsistent WPA3 support. If your router is set to WPA3-only security, the Pi may fail to connect entirely or connect intermittently. Change your router’s security mode to WPA2/WPA3 mixed mode, which allows the Pi to negotiate WPA2 while newer devices use WPA3. This is the simplest fix and has no meaningful security downside for home networks.

Fix 8: Disable WiFi Power Management

By default, the Pi’s WiFi adapter uses power management to reduce energy consumption. This causes the radio to “doze” between packets, which creates random connection drops — especially during periods of low activity followed by a burst of traffic. Check the current state:

iwconfig wlan0 | grep "Power Management"

If it shows Power Management:on, disable it persistently by creating a file at /etc/NetworkManager/conf.d/wifi-power-save-off.conf with the following content:

[connection]
wifi.powersave = 2

On systems using dhcpcd instead of NetworkManager, add noarp to /etc/dhcpcd.conf and run sudo iwconfig wlan0 power off in /etc/rc.local.

Fix 9: Diagnose with iwconfig and iwlist

If you’re still stuck, use built-in tools to gather diagnostics. iwconfig wlan0 shows your current signal strength (look for Signal level — anything below −70 dBm is weak), link quality, and bit rate. sudo iwlist wlan0 scan shows all visible networks and their signal levels, which helps confirm whether the issue is the Pi not seeing the network at all or failing to authenticate. See our guide on WiFi signal strength and dBm values for what these numbers mean in practice.

Quick Checklist

  1. Set WiFi country code via raspi-config
  2. Run rfkill list and unblock if needed
  3. Check wpa_supplicant.conf for syntax errors and Windows line endings
  4. Run sudo apt update && sudo apt full-upgrade
  5. Replace HDMI cable if using a 4K display with 2.4 GHz WiFi
  6. Force 5 GHz band or split router SSIDs
  7. Switch router to WPA2/WPA3 mixed mode
  8. Disable WiFi power management

Most Raspberry Pi WiFi problems are configuration issues rather than hardware failures. Work through this list in order and you’ll find the fix. If you’ve exhausted all software options and still have problems, a USB WiFi adapter (such as the Edimax EW-7811Un or a Wi-Fi 5 USB dongle) is a reliable fallback — and often gives better signal than the on-board antenna anyway.

Related Articles