Fix Direct Firmware Load for Regulatory DB Failed
In this article
If you see direct firmware load for regulatory.db failed with error -2 in your Linux system logs, it means the wireless regulatory database file is missing or not found by the kernel. This guide walks you through the steps to fix it, usually by installing the correct firmware package or updating the kernel.
What You'll Need
- Root or sudo access to your Linux system
- An internet connection (wired or another working wireless device)
- Basic familiarity with the terminal
Step-by-Step
- Identify your distribution. The fix differs slightly between Debian/Ubuntu, Fedora, Arch, and others. Run
cat /etc/os-releaseto see which one you have. - Check if the regulatory database is already installed. Look for files named
regulatory.dbandregulatory.db.p7sin/lib/firmware/or/usr/lib/firmware/. Usels -l /lib/firmware/regulatory*orls -l /usr/lib/firmware/regulatory*. - Install the wireless-regdb package. This package provides the regulatory database.
- Debian/Ubuntu:
sudo apt install wireless-regdb - Fedora:
sudo dnf install wireless-regdb - Arch:
sudo pacman -S wireless-regdb
- Debian/Ubuntu:
- Update the initramfs (if needed). On some systems, the firmware files need to be included in the initramfs. Run
sudo update-initramfs -u(Debian/Ubuntu) orsudo dracut --force(Fedora) after installing the package. - Reboot. A reboot ensures the kernel picks up the new firmware. After reboot, check the log again with
dmesg | grep regulatoryorjournalctl -k | grep regulatory. The error should be gone. - If the error persists, manually download the firmware. Some older kernels expect the files in a different location. Download
regulatory.dbandregulatory.db.p7sfrom the linux-firmware repository (e.g., from kernel.org) and copy them to/lib/firmware/withsudo cp regulatory.db* /lib/firmware/. - Set correct permissions. Ensure the files are readable by all:
sudo chmod 644 /lib/firmware/regulatory.db*. - Reboot again and verify the error is resolved.
Common Mistakes
- Installing the wrong package. Some distributions split the regulatory database into a separate package like
linux-firmwareorcrda. Make sure you installwireless-regdbspecifically. - Forgetting to update initramfs. On systems with an initramfs, the kernel loads firmware from the initramfs at boot. If you don't update it, the new files won't be seen.
- Copying files to the wrong directory. Some systems use
/usr/lib/firmwareinstead of/lib/firmware. Check both withls -ld /lib/firmware /usr/lib/firmware. - Ignoring file permissions. If the files are not readable, the kernel will still fail to load them. Always set 644 permissions.
Tips
- Use your package manager first. It's the cleanest way to get the correct files for your kernel version.
- Check kernel version. Very old kernels (before 4.15) might not support the newer regulatory.db format. In that case, you may need to update the kernel or use an older firmware version.
- Keep your system updated. This error often appears after a kernel upgrade but before the firmware package is updated. Running a full system update usually fixes it.
- Use the exact filenames. The error mentions
regulatory.db; make sure you have bothregulatory.dbandregulatory.db.p7s– the signature file is required.
Troubleshooting
If the error persists after following all steps, try these:
- Check the exact error code.
-2means ENOENT (file not found), but-13means permission denied. If you see a different code, the problem may be different. - Look for the file in the kernel source. The regulatory.db is also generated by the kernel build. If you compile your own kernel, ensure
CONFIG_CFG80211_INTERNAL_REGDBis set or the external db is enabled. - Try loading the module manually. Run
sudo modprobe -r cfg80211 && sudo modprobe cfg80211to reload the wireless module. This sometimes triggers the firmware load without a reboot. - Verify the file is not corrupted. Compare the checksum with the one from the package:
sha256sum /lib/firmware/regulatory.dband compare with the package's checksum. - Check if the issue is with a specific wireless driver. Some drivers (like iwlwifi) have their own firmware requirements. Look for other firmware errors in
dmesgaround the same time.
Frequently Asked Questions
What does this error mean?
It means the kernel cannot find the regulatory database file that defines wireless frequency and power limits for your region. This can affect Wi-Fi performance or prevent certain channels from being used.
Is it dangerous to ignore this error?
Usually not dangerous, but your wireless card may not operate optimally. It might default to a conservative regulatory domain, limiting transmit power or available channels.
Why did this happen after a kernel update?
Kernel updates sometimes change the expected firmware path or version. If the wireless-regdb package wasn't updated at the same time, the kernel can't find the new file.
Can I just copy the file from another Linux machine?
Yes, but it must be the same version or newer. Copying an older version might still work, but it's safer to use your package manager.
Do I need to recompile the kernel?
No, in most cases not. Installing the firmware package is sufficient. Only if you're using a custom kernel with unusual options might you need to adjust configuration.
Will this affect my Wi-Fi speed?
It could, because the regulatory database sets allowed channels and power levels. If the database is missing, the driver may use conservative defaults, potentially reducing range or speed.