Tag: drivers

Firmware files for drivers in Linux

What is Linux Firmware for?

Firmware can be confusing because not all users remember them, and firmware are not always pre-installed on Linux distributions. At the same time, firmware is just as important for the normal operation of devices as are drivers (kernel modules), which usually already exist in the system, since they are part of the Linux kernel.

Due to the lack of firmware, the device may not work completely or partially.

The name of the firmware packages differs in distributions (and sometimes it differs in an unobvious way, for example, by rearranging words). Firmware packages can contain both firmware for devices from different manufacturers, and for devices from the same manufacturer.

Sometimes firmware from one manufacturer is divided in different packages, for example, the firmware-intel-sound package contains firmware for Intel sound devices, and the firmware-iwlwifi package contains firmware for Intel wireless cards.

There are cases when the firmware of devices of the same type and the same manufacturer is divided into different packages, for example, the firmware-ath9k-htc and firmware-atheros packages contain firmware for Atheros wireless adapters.

Examples of problems that missing firmware can cause:

Firmware in Kali Linux

Kali Linux has several firmware packages, for example:

  • firmware-linux-free
  • firmware-linux-nonfree
  • firmware-misc-nonfree

The first two packages contain firmware that was previously included in the Linux kernel. The first package contains firmware that complies with the Debian Free Software Guidelines, the second contains the rest that do not comply with the Free Software Guidelines. Most of the firmware got into the non-free package. And the third package contains… more firmware.

In addition to these packages, there are packages containing firmware for certain devices from certain manufacturers, for example, firmware-realtek, firmware-atheros, firmware-iwlwifi.

The Kali Linux repository also has two metapackages:

  • firmware-linux – includes firmware-linux-free and firmware-linux-nonfree
  • kali-linux-firmware – includes bluez-firmware, firmware-amd-graphics, firmware-atheros, firmware-brcm80211, firmware-intel-sound, firmware-iwlwifi, firmware-libertas, firmware-linux, firmware-misc-nonfree, firmware-realtek, firmware-sof-signed, firmware-ti-connectivity, firmware-zd1211

In order not to experience problems with Wi-Fi and other devices in the future, it is recommended to install the kali-linux-firmware package, which will install most of the necessary firmware.

In Kali Linux, it is convenient to search for firmware packages with a command like

apt search SEARCH_STRING

As SEARCH_STRING, you can specify the name of the device, manufacturer, chipset of the device, the name of the firmware file, if you know it.

Firmware in Debian

In Debian, in addition to the firmware-linux-free, firmware-linux-nonfree, and firmware-misc-nonfree packages already familiar from Kali Linux, there is also the already familiar firmware-linux metapackage that combines the first two.

In addition to those discussed, there are firmware for devices from individual manufacturers, for example, firmware-iwlwifi, firmware-ath9k-htc, firmware-atheros, firmware-amd-graphics and others.

Firmware in Ubuntu, Linux Mint

In these distributions, the firmware is not divided into free and nonfree and is placed in one package called linux-firmware.

In addition to this package, there are also firmware for certain manufacturers, such as firmware-ath9k-htc, nouveau-firmware and others.

In general, in Ubuntu and Linux Mint, most of the firmware is collected in a single linux-firmware package, it is convenient!

But the search for firmware packages with a command like

apt search SEARCH_STRING

practically useless if you are trying to search by device model, chipset or firmware file. If you searched and did not find a separate package for your device, then most likely the firmware you need is contained in the linux-firmware package.

Firmware in Arch Linux, Manjaro, BlackArch

Until recently, all firmware were collected in one linux-firmware package. But some large and rare firmware have been divied into separate packages, details in the article “Changes in the linux-firmware package: kernel requirements, separating large files into separate packages”.

How to install all firmware for various drivers in the Linux kernel

In order to avoid possible problems due to missing firmware in the future, it is recommended to install them, since they take up relatively little disk space. Previously, many firmware were part of the kernel (which is understandable, given their importance), but were removed from the kernel, apparently to save space.

Installation of the main firmware packages is performed by the following commands.

On Kali Linux:

sudo apt install kali-linux-firmware

On Debian:

sudo apt install firmware-linux firmware-misc-nonfree firmware-iwlwifi firmware-ath9k-htc

On Ubuntu, Linux Mint:

sudo apt install linux-firmware firmware-iwlwifi firmware-ath9k-htc

On Arch Linux, Manjaro, BlackArch:

sudo pacman -S linux-firmware

Linux does not see Wi-Fi on Intel chipset. “firmware: failed to load iwlwifi” error (SOLVED)

Built-in Wi-Fi adapter manufactured by Intel is not detected by the system. Linux does not see the Wi-Fi device as if it is not connected.

To view system events since the last boot, run the following command.

journalctl -b

You can scroll through the output or search for “iwlwifi”.

An example output related to a non-working Wi-Fi adapter on an Intel chipset:

Jan 27 11:57:00 HackWare-Kali kernel: Intel(R) Wireless WiFi driver for Linux
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-46.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-46.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-45.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-45.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-44.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-44.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-43.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-43.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-42.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-42.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-41.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-41.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-40.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-40.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-39.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-39.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-38.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-38.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-37.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-37.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-36.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-36.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-35.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-35.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-34.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-34.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-33.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-33.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-32.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-32.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-31.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-31.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-30.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-30.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: minimum version required: iwlwifi-9000-pu-b0-jf-b0-30
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: maximum version supported: iwlwifi-9000-pu-b0-jf-b0-46
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

To search the system log, you can use the following command:

journalctl -b | grep iwlwifi

In the output, the key line is “firmware: failed to load iwlwifi-9000-*.ucode (-2)”, that is, it was not possible to load the iwlwifi firmware.

Searching the package repository

apt search iwlwifi

showed that in Kali Linux, the iwlwifi firmware is placed in the firmware-iwlwifi package, install it:

sudo apt install firmware-iwlwifi

On Ubuntu, Linux Mint and Debian, run the following command to install the firmware:

sudo apt install firmware-iwlwifi

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

Linux does not see Wi-Fi on Realtek chipset. “firmware: failed to load rt2870.bin” error (SOLVED)

When connecting a Wi-Fi adapter with a Realtek chipset, nothing happens, or the device does not work properly.

Command

iw dev

outputs the following information:

phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr 52:e7:b0:49:a2:84
                type managed
                txpower 0.00 dBm

The txpower value is zero, the system does not see the Wi-Fi device.

Run command

journalctl -f

and connect the Wi-Fi adapter to your computer

Jan 27 06:09:24 HackWare-Kali kernel: usb 1-1: reset high-speed USB device number 2 using ehci-pci
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3572, rev 0223 detected
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0009 detected
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Jan 27 06:09:25 HackWare-Kali NetworkManager[612]:   [1643281765.9900] device (wlan0): driver supports Access Point (AP) mode
Jan 27 06:09:25 HackWare-Kali systemd[1]: Starting Load/Save RF Kill Switch Status...
Jan 27 06:09:25 HackWare-Kali NetworkManager[612]:   [1643281765.9949] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Jan 27 06:09:25 HackWare-Kali kernel: usbcore: registered new interface driver rt2800usb
Jan 27 06:09:26 HackWare-Kali systemd-udevd[1328]: Using default interface naming scheme 'v250'.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0124] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:0b.0/usb1/1-1/1-1:1.0/ieee80211/phy0/rfkill0) (driver rt2800usb)
Jan 27 06:09:26 HackWare-Kali systemd[1]: Started Load/Save RF Kill Switch Status.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0298] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jan 27 06:09:26 HackWare-Kali kernel: ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: firmware: failed to load rt2870.bin (-2)
Jan 27 06:09:26 HackWare-Kali kernel: firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: Direct firmware load for rt2870.bin failed with error -2
Jan 27 06:09:26 HackWare-Kali kernel: ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: firmware: failed to load rt2870.bin (-2)
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: Direct firmware load for rt2870.bin failed with error -2
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0307] device (wlan0): firmware may be missing.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0310] device (wlan0): set-hw-addr: set MAC address to 52:E7:B0:49:A2:84 (scanning)
Jan 27 06:09:26 HackWare-Kali dbus-daemon[611]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service' requested by ':1.72' (uid=119 pid=1345 comm="/usr/libexec/colord-sane ")
Jan 27 06:09:26 HackWare-Kali dbus-daemon[611]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
Jan 27 06:09:28 HackWare-Kali ModemManager[639]:   [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:0b.0/usb1/1-1': not supported by any plugin
Jan 27 06:09:31 HackWare-Kali systemd[1]: systemd-rfkill.service: Deactivated successfully.
Jan 27 06:09:33 HackWare-Kali systemd[1]: blueman-mechanism.service: Deactivated successfully.

In the output, the key line is “firmware: failed to load rt2870.bin”, that is, it was not possible to load the firmware rt2870.bin.

In Kali Linux, the rt2870.bin firmware is placed in the firmware-misc-nonfree package, install it:

sudo apt install firmware-misc-nonfree

On Ubuntu, Linux Mint and their derivatives, run the following command:

sudo apt install linux-firmware

On Debian, run:

sudo apt install firmware-misc-nonfree

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

Note that Debian and derivatives have a firmware-realtek package which also contains Realtek firmware. In addition to these two packages, various distributions contain Realtek drivers and firmware in separate packages – to determine exactly which package you need, search your distribution's package repository for the name of the Wi-Fi adapter, as well as the name of the driver and firmware file that may appear in the error message.

See also the section “Drivers and firmware”.

Linux does not see Alfa AWUS036NHA. “firmware: failed to load ath9k_htc” error (SOLVED)

When connecting a Wi-Fi adapter based on the Atheros chipset, such as Alfa AWUS036NHA, a Linux computer does not see the Wi-Fi device. Command

iw dev

does not output anything, as if the device is not connected.

In the Linux Wi-Fi Cheat Sheet: Tips and Troubleshooting, we'll use the advice from the “How to ask a question about a problem with a Wi-Fi adapter” section, namely, open several terminal windows and run the following commands in them:

iw event
ip monitor
journalctl -f

Then plug the Wi-Fi adapter to the computer.

journalctl gave the following messages:

Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: firmware: failed to load ath9k_htc/htc_9271-1.4.0.fw (-2)
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: firmware: failed to load htc_9271.fw (-2)
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: Direct firmware load for htc_9271.fw failed with error -2
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: no suitable firmware found!
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: USB layer deinitialized

The key to solving the problem in these messages is the information that the ath9k_htc firmware is not loaded. For devices to work, in addition to the driver (which can be part of the kernel or installed separately), firmware is required.

Let's search for the firmware:

apt search ath9k_htc

In Kali Linux, the ath9k_htc firmware is placed in a separate firmware-atheros package, install it:

sudo apt install firmware-atheros

On Debian, Ubuntu and Linux Mint, run the following command to install:

sudo apt firmware-ath9k-htc

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

How to uninstall and block updates and drivers from installing in Windows 11

Windows 11 automatically downloads and installs all updates. This includes security updates, feature updates, and driver updates provided through Windows Update. This is usually fine, but if a driver or update is causing problems, you can uninstall it and block it from being installed again.

Step One: See What Updates and Drivers Have Been Recently Installed

If you're not sure which device driver or Windows update you just installed might be causing problems, you can view the list of installed updates. If you need to, boot into safe mode, open Settings (Win+i) → Windows Update and click on Update history.

Here you will see a list of updates and their installation dates.

Step two: Uninstall the problematic update or driver

You then need to uninstall the buggy system or driver update, but this is done in different ways.

How to uninstall system update

The ability to uninstall Windows updates (not driver updates) is buried in the Settings app. Go to Settings (Win+i) → Windows Update → Update history. Click the “Uninstall updates” button here.

This link opens the Installed Updates dialog where you can uninstall an individual Windows update if it causes problems on your system.

This list only lists updates that have been installed since the last major update or “build” of Windows 11.

To roll back a build of Windows 11, select Settings (Win+i) → Windows Update → Advanced options

→ Recovery.

If it's been less than 10 days since you installed the build and you haven't deleted any files with Disk Cleanup, you'll see an option to “Go back to a previous version of Windows 11”. Click “Start” to return to a previous build of Windows 11.

How to roll back a driver

Drivers can be especially problematic. Whether you roll back a driver or install another one yourself, whenever it checks for updates, Windows Update will keep downloading and installing your driver over and over again, overwriting your preferred driver. We'll talk about how to stop this, but first let's talk about how to rollback a driver.

To roll back the driver, press Win+x and select “Device Manager” to launch Device Manager. Locate the device whose driver you want to uninstall, right-click it and select Properties.

Click the Driver tab and click Roll Back Driver.

Step Three: Prevent Driver Installation or Update from Windows Update

Simply removing drivers or updates won't prevent you from reinstalling them. There is no way to "hide" an update or block updates from within Windows itself, but Microsoft provides a tool to do this, which had to be downloaded from their website. Now this tool has been removed from the site, but its copy has been preserved, which you can download from this link: wushowhide.diagcab file. If you are concerned about security, then:

  • firstly, you can check the digital signature of the downloaded file;
  • secondly, you can unpack the file with an archiver and make sure that this file includes several .ps1 scripts, that is, small programs and functions written in PowerShell, that is, it is almost an open source tool

This tool is designed to temporarily hide problematic updates that do not work properly on your system.

You can download the “Show or hide updates troubleshooter” for Windows 11 from Microsoft.

When you run this troubleshooter, it will look for available updates and allow you to “hide” them, preventing Windows from automatically installing them.

Later, you will be able to run this troubleshooter again and show updates when you want to install them.

Changes in the linux-firmware package: kernel requirements, separating large files into separate packages

In Arch Linux, the linux-firmware package, which contains the firmware files, got important changes. In addition to the usual file updates and adding support for new devices, this package has a requirement for a minimum kernel version, and the package itself is divided into several packages.

Recall that device firmware are files that are necessary for the normal operation of the hardware in addition to kernel modules (drivers).

The linux-firmware package now implements kernel firmware compression and also requires Linux kernel version 5.3 or later with support for booting from compressed xz firmware. The CONFIG_FW_LOADER_COMPRESS kernel option must be enabled. All official Arch Linux kernels have supported this for a long time.

The linux-firmware package has been split into smaller packages to further reduce disk space requirements. Some large firmware files for rarely used hardware have been split into separate packages. This affects firmware for Mellanox Spectrum switches, Marvell devices, Qualcomm SoCs, Cavium LiquidIO server adapters, QLogic devices, Broadcom NetXtreme II 10Gb Ethernet adapters. Be sure to install additional firmware packages if needed.

The following packages are now in the official Arch Linux repository:

  • linux-firmware and linux-firmware-whence – the main firmware packages for a wide variety of hardware
  • linux-firmware-bnx2x – firmware for NetXtreme II 10Gb Ethernet adapters
  • linux-firmware-liquidio – Cavium LiquidIO server adapters
  • linux-firmware-marvell – firmware for Marvell devices
  • linux-firmware-mellanox – firmware for Mellanox Spectrum switches
  • linux-firmware-nfp – firmware for Netronome Flow Processors (nfp)
  • linux-firmware-qcom – firmware for Qualcomm SoCs (qcom)
  • linux-firmware-qlogic – firmware for Qlogic devices (qlogic)

How to Install the Latest Linux Kernels on Debian and Debian Based Distributions

Recent versions of the Linux kernel have drivers for new devices and other innovations. Unfortunately, many popular Linux distributions are in no rush to update their kernel. This tutorial will show you how easy it is, without compiling, to install any version of the Linux kernel on Debian and derived distributions, for example, Kali Linux and LMDE (Linux Mint Debian Edition). You can choose to install either a newer kernel or an older one than your distribution's repository suggests.

If you wish, you can easily remove the installed Linux kernels and return to the kernel from the repository.

Note that there are separate instructions for Ubuntu and derivatives, as the process for updating kernels is different: “How to Install the Latest Linux Kernels on Ubuntu and Linux Mint”.

Kernel update warning

It should be remembered that due to the incompatibility of the kernel with programs (first of all, with proprietary GPU drivers), you may encounter problems, including a black screen during boot.

In most cases, the problems encountered can be resolved without reinstalling the distribution. Start by going to the advanced options in the boot menu and boot with the previous version of the kernel. When the computer boots up, remove the problematic kernel.

Proprietary graphics card drivers can cause problems, as older versions may not be compatible with the latest kernels without a patch. If you have proprietary video drivers installed, then seriously consider before following the instructions below. Also get ready, look for instructions on how to solve the problem when loading the distribution into a black screen.

Owners of old distributions should be especially careful – it is strongly recommended to update the kernel only on the latest OS versions.

Another very likely problem that you may encounter if you install the latest kernel is the problem with unresolved dependencies and, as a result, the inability to use the apt package manager to update and install programs. If you are faced with a situation where, after successfully installing a new kernel, you cannot update packages using apt, then try installing older versions of the kernel that suit you, and uninstall the versions that cause dependency problems. Remember that it is impossible to remove the kernel you booted with – boot your computer with any other version of the kernel before uninstalling.

Upgrading the Kernel to the Latest Version on Debian

This section should be suitable for all variations and derivatives of Debian, for example:

  • Debian stable
  • Debian testing
  • Kali Linux
  • Linux Mint Debian Edition (LMDE)
  • MX Linux
  • other

Let's check the current kernel version:

uname -a

In order not to compile the kernel from scratch, we will use the kernels of the XanMod Kernel project.

To install the latest kernel version, just run the following commands:

echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
sudo apt update && sudo apt install linux-xanmod

After the program has exited, a computer restart is required for the changes to take effect.

Let's check the kernel version again:

uname -a

Output example:

Linux HackWare-Kali 5.13.19-xanmod1 #0~git20210919.7960459 SMP PREEMPT Sun Sep 19 13:46:36 UTC 2021 x86_64 GNU/Linux

If for some reason the GRUB menu has not been updated, then run the command:

sudo update-grub

How to choose the XanMod kernel version

In total, the following metapackages are available – the kernel version at the time of writing is indicated in square brackets:

  • linux-xanmod [5.13]
  • linux-xanmod-edge [5.14]
  • linux-xanmod-lts [5.10]
  • linux-xanmod-cacule [5.14-cacule]
  • linux-xanmod-rt [5.10-rt]

You can check the kernel version in the linux-xanmod package with the following command:

apt show linux-xanmod

As you can see, this metapackage has in its dependencies (that is, it will actually install) the linux-image-5.13.19-xanmod1 and linux-headers-5.13.19-xanmod1 packages, hence the kernel version is currently 5.13.19.

Let's check the linux-xanmod-edge kernel version:

apt show linux-xanmod-edge

The current Linux kernel version in this package is 5.14.6.

The XanMod repository contains not only kernels that can be installed using metapackages, but also many other versions, you can find them with the command:

apt search linux-image-[0-9.]+-xanmod[0-9]+

When installing the kernel of the selected version, you need to install the corresponding headers files, both packages must have the name of the form linux-image-VERSION-xanmod1 and linux-headers-VERSION-xanmod1, and the VERSION number must be the same, for example:

sudo apt install linux-image-5.12.19-xanmod1 linux-headers-5.12.19-xanmod1

How to remove XanMod core

If you installed the kernel using the linux-xanmod metapackage, you can remove this metapackage with the command:

sudo apt remove linux-xanmod

However, this will not change anything, the installed kernels will remain on the system! To remove the kernels themselves, use a command like:

sudo apt remove `sudo apt show linux-xanmod | grep Depends | sed 's/,//' | awk '{print $2,$3}'`

If you installed the kernel without using the metapackage, then remove the kernel and the headers file specifying the names of the packages and their versions, for example:

sudo apt remove linux-image-5.12.19-xanmod1 linux-headers-5.12.19-xanmod1

How to recover Linux after installing the kernel

If your computer boots with a black screen, freezes, or something doesn't work after updating the kernel, reboot and select Advanced options for your distribution from the GRUB menu:

Then select the previous kernel version and press Enter:

Regardless of the reason, you need to boot with the previous version of the kernel if you want to remove the latest kernel. This is because you cannot remove the kernel that is currently in use.

If you do not see the GRUB2 menu, press and hold the Shift key or press the Esc key repeatedly (this may vary depending on BIOS or UEFI boot and the version of Ubuntu/Linux Mint you are using) while booting GRUB. The Grub menu should appear allowing you to select a previous kernel version.

After booting the previous kernel, you can remove the faulty kernel.

To remove the XanMod kernel in Debian and derivatives run the commands:

sudo apt remove linux-xanmod
sudo apt remove `sudo apt show linux-xanmod | grep Depends | sed 's/,//' | awk '{print $2,$3}'`

If this was not done automatically, then update your GRUB settings:

sudo update-grub

How to Install the Latest Linux Kernels on Ubuntu and Linux Mint

Recent versions of the Linux kernel have drivers for new devices and other innovations. Unfortunately, many popular Linux distributions are in no rush to update their kernel. This tutorial will show you how easy it is to install any version of the Linux kernel on Ubuntu and Linux Mint without compiling. You can choose to install either a newer kernel or an older one than your distribution's repository suggests.

If you wish, you can easily remove the installed Linux kernels and return to the kernel from the repository.

Since Linux Mint is based on Ubuntu, this instruction is fully applicable to Linux Mint distributions, except for LMDE. For LMDE (Linux Mint Debian Edition) see “How to Install the Latest Linux Kernels on Debian and Debian Based Distributions”.

Kernel update warning

It should be remembered that due to the incompatibility of the kernel with programs (first of all, with proprietary GPU drivers), you may encounter problems, including a black screen during boot.

In most cases, the problems encountered can be resolved without reinstalling the distribution. Start by going to the advanced options in the boot menu and boot with the previous version of the kernel. When the computer boots up, remove the problematic kernel.

Proprietary graphics card drivers can cause problems, as older versions may not be compatible with the latest kernels without a patch. If you have proprietary video drivers installed, then seriously consider before following the instructions below. Also get ready, look for instructions on how to solve the problem when loading the distribution into a black screen.

Owners of old distributions should be especially careful – it is strongly recommended to update the kernel only on the latest OS versions.

Another very likely problem that you may encounter if you install the latest kernel is the problem with unresolved dependencies and, as a result, the inability to use the apt package manager to update and install programs. If you are faced with a situation where, after successfully installing a new kernel, you cannot update packages using apt, then try installing older versions of the kernel that suit you, and uninstall the versions that cause dependency problems. Remember that it is impossible to remove the kernel you booted with – boot your computer with any other version of the kernel before uninstalling.

mainline – Ubuntu kernels repository

For Ubuntu, there is a repository of compiled mainline kernels of all versions, including the most recent, so installation is not too difficult – you do not need to compile the Linux kernel. Moreover, there are tools, including those with a graphical interface, to install any kernels.

In fact, if the kernels have already been compiled, then it is enough to download the following files from one folder from the server:

  • linux-headers-*-generic_*_amd64.deb
  • linux-headers-*_all.deb
  • linux-image-unsigned-*-generic_*_amd64.deb
  • linux-modules-*-generic_*_amd64.deb

And install them with the command:

sudo dpkg -i linux*.deb

But the process can be simplified even further by using utilities for working with kernels.

Mainline (a continuation of the free version of ukuu) – a program with a graphical and console interface for updating the kernel

If you prefer a graphical interface then use Mainline.

To install the program run the following commands:

sudo apt-add-repository -y ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

To launch the graphical interface, run:

mainline-gtk

To run the console version, run:

mainline

Using the graphical version should be straightforward. At startup, you will receive information about the available kernels, you can select any kernel and install it by simply clicking on the “Install” button. Additionally, actions such as removing kernels and viewing the changelog for each kernel version are available.

Using the console version is as follows:

Syntax:

mainline COMMAND [OPTIONS]

Options and Commands Reference:

Commands:

  --check             Check for kernel updates
  --notify            Check for kernel updates and notify current user
  --list              List all available mainline kernels
  --list-installed    List installed kernels
  --install-latest    Install latest mainline kernel
  --install-point     Install latest point update for current series
  --install <name>    Install specified mainline kernel(1)
  --uninstall <name>  Uninstall specified kernel(2)
  --uninstall-old     Uninstall kernels older than the running kernel
  --download <name>   Download specified kernels(2)
  --clean-cache       Remove files from application cache

Options:

  --include-unstable  Include unstable and RC releases
  --hide-unstable     Hide unstable and RC releases
  --debug           Enable verbose debugging output
  --yes             Assume Yes for all prompts (non-interactive mode)
  --user            Override user

Notes:

(1) A version string taken from the output of --list

(2) One or more version strings (comma-separated) taken from the output of --list

Restart your computer to use the new kernel.

By default, your system will boot with the latest kernel, if you want to change this, then go to advanced boot options

and select the version you want from the installed kernels.

The ubuntu-mainline-kernel.sh utility

Installing ubuntu-mainline-kernel.sh

The latest kernel on Ubuntu and Linux Mint can also be installed using the ubuntu-mainline-kernel.sh command line utility.

Download and install the ubuntu-mainline-kernel.sh script:

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
sudo install ubuntu-mainline-kernel.sh /usr/local/bin/

ubuntu-mainline-kernel.sh help

Usage:

ubuntu-mainline-kernel.sh -c|-l|-r|-u

ubuntu-mainline-kernel.sh options:

Arguments:
  -c               Check if a newer kernel version is available
  -i [VERSION]     Install kernel VERSION, see -l for list. You don't have to prefix
                   with v. E.g. -i 4.9 is the same as -i v4.9. If version is
                   omitted the latest available version will be installed
  -l [SEARCH]      List locally installed kernel versions. If an argument to this
                   option is supplied it will search for that
  -r [SEARCH]      List available kernel versions. If an argument to this option
                   is supplied it will search for that
  -u [VERSION]     Uninstall the specified kernel version. If version is omitted,
                   a list of max 10 installed kernel versions is displayed
  -h               Show this message

Optional:
  -s, --signed         Only install signed kernel packages (not implemented)
  -p, --path DIR       The working directory, .deb files will be downloaded into
                       this folder. If omitted, the folder /tmp/ubuntu-mainline-kernel.sh/
                       is used. Path is relative from $PWD
  -ll, --low-latency   Use the low-latency version of the kernel, only for amd64 & i386
  -lpae, --lpae        Use the Large Physical Address Extension kernel, only for armhf
  --snapdragon         Use the Snapdragon kernel, only for arm64
  -do, --download-only Only download the deb files, do not install them
  -ns, --no-signature  Do not check the gpg signature of the checksums file
  -nc, --no-checksum   Do not check the sha checksums of the .deb files
  -d, --debug          Show debug information, all internal command's echo their output
  --rc                 Also include release candidates
  --yes                Assume yes on all questions (use with caution!)

Example of installing the latest kernel version

Checking the current kernel version:

uname -r
5.11.0-36-generic

The kernel is version 5.11.

We check which version of the kernel is the latest:

ubuntu-mainline-kernel.sh -c

To display a list of available kernels versions for installation, run the command:

sudo ubuntu-mainline-kernel.sh -r

For example, we want to install the kernel version v5.12.11, then the command is as follows (you do not need to specify the “v” prefix):

sudo ubuntu-mainline-kernel.sh -i 5.12.11

If you want to install the latest version at the moment, then run the following command:

sudo ubuntu-mainline-kernel.sh -i

You will be asked if you want to continue, enter “y”:

Latest version is: v5.14.6, continue? (y/N)

The program has exited – a restart is required for the changes to take effect.

Check the kernel version again:

How to recover Linux after installing the kernel

If your computer boots with a black screen, freezes, or something doesn't work after updating the kernel, reboot and select Advanced options for your distribution from the GRUB menu:

Then select the previous kernel version and press Enter:

Regardless of the reason, you need to boot with the previous version of the kernel if you want to remove the latest kernel. This is because you cannot remove the kernel that is currently in use.

If you do not see the GRUB2 menu, press and hold the Shift key or press the Esc key repeatedly (this may vary depending on BIOS or UEFI boot and the version of Ubuntu/Linux Mint you are using) while booting GRUB. The Grub menu should appear allowing you to select a previous kernel version.

After booting the previous kernel, you can remove the faulty kernel. ubuntu-mainline-kernel.sh allows you to remove kernels installed from the Ubuntu kernel PPA.

With ubuntu-mainline-kernel.sh you can remove the kernel version by running:

sudo ubuntu-mainline-kernel.sh -u VERSION

Where VERSION is the kernel version, for example 5.14. You can also use this utility with -u without specifying a version, in which case the tool will list up to 10 kernel versions and ask you which one you want to remove. It's worth noting that ubuntu-mainline-kernel.sh will not show official Ubuntu kernels in this list.

Update GRUB settings if not done automatically:

sudo update-grub

How to install Wi-Fi driver in Linux if the computer is offline

If you cannot connect to Wi-Fi because the wireless card driver is not yet installed in your Linux and there is no wired connection, then you get a vicious circle: it is impossible to install the driver because there is no Internet.

There is a way out of the situation – for this you only need an Android phone. Moreover, you do not need to use mobile data, you can use a Wi-Fi connection via your phone.

How to use an Android phone as a USB tethering

It's pretty simple. Start by connecting your phone to your computer with a USB cable.

Then go to settings. The name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “USB tethering”.

Everything is ready – now your computer is online and can connect to the Internet. You can install Wi-Fi drivers or perform other actions you want on the network.

Please note that if the phone is not connected to Wi-Fi, then mobile data will be used – if you do not have an unlimited tariff, then it will cost you money. But you can connect your phone to a Wi-Fi network and still use it as a USB modem. As a result, it turns out that your computer is using Wi-Fi over the phone, and not mobile data.

Loading...
X