Updating Firmware In Linux Using LVFS

calendar

October 15, 2021

categories
Guides
tags
firmware fwupd lvfs update

Content:

The Linux Vendor Firmware Service (LVFS for short) is a service designed to allow hardware vendors to upload firmware updates in one central location.

Firmware updates are released for a number of reasons,including bug fixes, security updates, and enabling additional features.

Typically, device firmware has been very difficult (or in many cases, impossible) to update using a Linux system – the only option being a Windows .exe, or if you’re lucky, a bootable USB installer. LVFS aims to make it not only simpler for users to keep their firmware up to date, but to provide an easier way for manufacturers to manage

A wide range of firmware is available through LVFS, from the more basic devices such as keyboard/mouse receivers, to more complex devices such as SSD controllers, embedded motherboard controllers, and even motherboard BIOS updates.

LVFS is open to any vendor that wishes to use it, and a number of the big brands are currently making use of the service, with Dell and Lenovo both having over 1000 firmware files each at the time of writing.

The LVFS website allows you to search for vendors and devices, to check manually if there is firmware available for your device.

So, that sounds great, but how do we actually use it?

How to use LVFS

For our system to access LVFS and manage our firmware, there is a tool available called <b>fwupd</b>. fwupd has the ability to scan our system, and check LVFS for any updates available for our devices.

Depending on the Linux distribution you use, you may already have fwupd installed on your system.

GUI

If you use a GNOME-based distribution, such as Fedora or Ubuntu, you can access firmware updates through the GNOME software application.

Available updates will show up in the ‘Updates’ tab, alongside any available software updates. This makes updating your firmware simple, and means you will be notified of any updates when they become available.

Similarly, users of KDE will find any updates through the KDE Discover app, again alongside software updates.

CLI

If a GUI solution is not an option, of if you want greater access to the features of fwupd, you can run the application through a terminal.

To see a list of devices on your system detected by the tool, run:

fwupdmgr get-devices

The output of this will look something like the below.

Devices detected by fwupdmgr
Devices detected on my system

In my case, the system has 2 devices available – a Samsung 960 EVO nVME drive, and a Logitech unifying receiver.

To update the list of current firmware from LVFS, run:

fwupdmgr refresh

Next, we can check for updates by running

fwupdmgr get-updates

Showing an available update
The Logitech unifying receiver has an available update

The first part of the output will list devices that have no firmware updates available through LVFS. In my case, the Samsung 960 EVO has no firmware available. Note that in this case, Samsung do not currently provide firmware through this service – it is possible an update is available through their website.

Below this, we can see that the Logitech unifying receiver has 2 newer firmware versions available, the most recent being the first in the list. The older of the 2 was released back in 2017, so it’s fair to say I am rather behind in keeping this up to date.

If there are no updates available, congratulations! You can skip the next section. Otherwise, you can install the updates using

fwupdmgr update

Before installing, fwupdmgr will advise on the conditions required for the update. For example, inthe case below, connected devices may not be usable during the update. There are some updates which will require a reboot to apply, this will be explained here.

The update process

If we get the list of devices, we can confirm that the update has been applied.

Confirming the update
The Logitech unifying receiver now reports the newer firmware version

Why isn’t my BIOS update being detected?

It is important to note that, for certain motherboard related updates such as the BIOS, you need to have your system running in UEFI mode. This is because BIOS updates are dispatched and applied to the system using the UEFI. If your system does not support UEFI, or is running in legacy boot mode, you will not be able to use LVFS/fwupd to update the BIOS.

It is also worth double checking that the firmware is actually available through LVFS – updates posted to manufacturer websites will not show up unless using the service.

Note for Gentoo Users

At the time of writing, by default sys-apps/fwupd on the 17.1 systemd profile only has the following use flags enabled:

  • introspection
  • man
  • policykit
  • systemd

To allow the detection of other devices, the following flags need to be enabled as neccesary:

  • gusb – Enables updates for usb devices
  • nvme – Enables updates for nVME devices
  • uefi – Enables BIOS updates through UEFI
  • thunderbolt – Enable updates for thunderbolt devices
  • synaptics – Enable updates for synaptic touch devices

If you like what we do, consider supporting us on Ko-fi