Enabling automatic fwupd refresh via systemd

How does one go about enabling fwupd-refresh? I note that both fwupd-refresh.service & fwupd-refresh.timer are available but inactive. The fwupd - ArchWiki contains no help on the subject.

My output from systemctl status fwupd.service fwupd-refresh.service fwupd-refresh.timer is below:

● fwupd.service - Firmware update daemon
     Loaded: loaded (/usr/lib/systemd/system/fwupd.service; static)
     Active: active (running) since Thu 2021-03-25 08:32:32 GMT; 57min ago
       Docs: https://fwupd.org/
   Main PID: 18616 (fwupd)
      Tasks: 6 (limit: 38403)
     Memory: 56.0M
     CGroup: /system.slice/fwupd.service
             ├─18616 /usr/lib/fwupd/fwupd
             └─18641 gpg-agent --homedir /var/lib/fwupd/gnupg --use-standard-socket --daemon

Mar 25 08:32:31 Haku systemd[1]: Starting Firmware update daemon...
Mar 25 08:32:32 Haku systemd[1]: Started Firmware update daemon.
Mar 25 08:32:32 Haku fwupd[18616]: 08:32:32:0587 FuPluginLinuxSwap    could not parse /proc/swaps: no volumes for devnum 53
Mar 25 08:32:33 Haku fwupd[18616]: 08:32:33:0378 FuPluginLinuxSwap    could not parse /proc/swaps: no volumes for devnum 53
Mar 25 08:33:07 Haku fwupd[18616]: 08:33:07:0740 FuPluginLinuxSwap    could not parse /proc/swaps: no volumes for devnum 53

● fwupd-refresh.service - Refresh fwupd metadata and update motd
     Loaded: loaded (/usr/lib/systemd/system/fwupd-refresh.service; static)
     Active: inactive (dead)
       Docs: man:fwupdmgr(1)

● fwupd-refresh.timer - Refresh fwupd metadata regularly
     Loaded: loaded (/usr/lib/systemd/system/fwupd-refresh.timer; disabled; vendor preset: disabled)
     Active: inactive (dead)
    Trigger: n/a
   Triggers: ● fwupd-refresh.service

Basically, do I need to enable fwupd-refresh.service or fwupd-refresh.timer or both?

enable the timer.

The service is a oneshot that is called by the timer.

In general, whenever you have a service and timer with the same name it is reasonable to expect that the service is being used by the timer.

Of course, you could manually start the service if you wanted to force a onetime refresh but it wouldn’t stay running.



1 Like