0

I would like to know whether all the firmware is copied to my PC if I install a non-free Linux distribution. What I mean is does the firmware of all the devices like WiFi adapters, keyboards etc. get copied to my PC even if my PC does not use those devices? Will this unnecessary firmware bloat/slow down the kernel?

1
  • 2
    I added an answer to your question, but I'm not entirely sure if it tells you what you want to know exactly. Maybe you could clarify what you're worried about and why you want to know what is (not) installed? Commented Mar 28, 2020 at 9:08

2 Answers 2

4
+50

Typically, when you install a Linux distribution, firmware gets installed into /lib/firmware. When firmware is needed for a device, the Linux kernel looks in that directory for the right firmware file and loads it into the device.

It depends on the distribution which firmware files are installed (by default), but often these are separated in different packages for different hardware vendors. For example, Debian has various packages that contain firmware files, most of which (e.g. firmware-iwlwifi, firmware-realtek, firmware-amd-graphics) come from the upstream linux-firmware repository. For a list of the non-free firmware packages that come from this repo, see the firmware-nonfree source package. The free firmware files from that repo are all packaged in a single firmware-linux-free package (built from the firmware-free source package.

Often, Linux installers will ask if you want to install non-free firmwares, or they might even autodetect which to install based on your hardware.

For example, if you use Debian non-free installer, if a device driver requests firmware that is not available, debian-installer will display a dialog offering to load the missing firmware. If this option is selected, debian-installer will scan available devices for either loose firmware files or packages containing firmware. If found, the firmware will be copied to the correct location (/lib/firmware) and the driver module will be reloaded.

Some other Linux distributions (like Ubuntu) also contain nonfree binary blobs in drivers packaged with the kernel.

2
  • linux-firmware-nonfree does not include firmware-iwlwifi. Confirmed in Debian bookworm with the repository components main contrib non-free non-free-firmware. Commented Feb 19, 2023 at 18:33
  • 1
    Hm, I thought that linux-firmware-nonfree would depend on firmware-iwlwifi (and others), but you are right, that does not seem to be the case. I've updated my answer accordingly. Thanks! Commented Feb 20, 2023 at 6:51
3

About the concern that firmware will somehow bloat/slow down the kernel, it is loaded once from disk and stashed into the device. After that, there is no more (direct) involvement of the kernel. Many devices today are complex enough to have their own CPU and software, that is loaded and booted on startup (and stashing it in ROM makes it imposssible to fix bugs/expand functionality without changing the physical device).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.