How to do firmware updates with QubesOS 4.2?

Hi,
I am new to QubesOS and currently looking for a way to update the firmware of my Notebook.
I had a Linux distro before which had the option of doing the firmware updates via a GUI.
I searched online for a way and found that since the Qubes 4.2 version that the fwupd is included.

I searched on their github and tried the following command:
fwupdmgr refresh

I got this response:
updating lvfs
downloading…
failed to download file: Could not resolve host: cdn.fwupd.org.

It seems that dom0 does not have access to get the updates.

Then I was looking in the forum and people were recommending this approach:
qubes-fwupdmgr

I thought this “workaround” is not necessary anymore since the 4.2 version. Or is this the normal way to use commands in dom0?

thx.

1 Like

Welcome!
Theres documentation for this feature currently missing:

The command you’re looking for is sudo qubes-fwupdmgr --help
Unfortunately it didn’t work for me. Command always froze and never finished even after multiple minutes, tried sys-firewall and sys-whonix.

This is by design. dom0 is isolated for security reasons.
Since you’re new you might want to do a bit of reading the documentation:

1 Like

I was curious about this so I just tried it out. The packages were not installed for me in dom0. I had to install fwupd-qubes-dom0 (version: 1.8.14-5.fc37).

Running sudo qubes-fwupdmgr get-devices listed out several devices on my system.

I then found that I needed to run refresh before get-updates.

Running sudo qubes-fwupdmgr get-updates just hangs, as I believe previously mentioned. I suspect that the tool and command get-updates is attempting to read some data from a file that is empty or does not exist (until after running refresh). The traceback shows execution at a line intended to read data. Instead of generating an error, it just hangs.

Traceback after interrupting get-updates:

Traceback (most recent call last):
  File "/usr/sbin/qubes-fwupdmgr", line 731, in <module>
    main()
  File "/usr/sbin/qubes-fwupdmgr", line 709, in main
    q.get_updates_qubes()
  File "/usr/sbin/qubes-fwupdmgr", line 586, in get_updates_qubes
    self._get_dom0_updates()
  File "/usr/sbin/qubes-fwupdmgr", line 196, in _get_dom0_updates
    new_data = os.read(mstdout, 4096)
               ^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

Running commands in this order seems to work:

  1. sudo qubes-fwupdmgr refresh
  2. sudo qubes-fwupdmgr get-updates

Generates:

======================================================
Dom0 updates:
======================================================
No updates available.
1 Like

Would your provided CLI instructions apply to a Star Labs build with AMI (American MegaTrends) installed as the UEFI BIOS?

It does look like Star Labs has some LVFS support so it might work. However, Star Labs is outside my knowledge and experience.

Good luck.

1 Like

Thank you for the resources link! :pray:t3:

sudo qubes-fwupdmgr refresh doesn’t work for me:

Traceback (most recent call last):
  File "/usr/bin/qubes-vmexec", line 5, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/qubesagent/vmexec.py", line 55, in main
    os.execvp(command[0], command)
  File "<frozen os>", line 574, in execvp
  File "<frozen os>", line 597, in _execvpe
FileNotFoundError: [Errno 2] No such file or directory
Failed to refresh remote 'lvfs': Metadata download failed.
1 Like
1 Like

Thanks! Installing fwupd-qubes-vm fixed it. Currently no updates found for me so I can’t check if actually installing updates works.

I checked through a live Ubuntu stick; I had one update and performed it there; dom0 had said there were none.