Fwupd excessive power draw

Clear linux is not getting the battery life expected. On ubuntu and fedora I can obtain 6+ hours of battery life on my x1 carbon. It seems like fwupd is using a lot of draw.

The battery reports a discharge rate of 12.4 W
The power consumed was 260 J
The estimated remaining time is 2 hours, 31 minutes

Summary: 1096.6 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 4.0% CPU use

Power est. Usage Events/s Category Description
1.54 W 5.1 ms/s 386.9 Timer tick_sched_timer
1.20 W 585.7 µs/s 302.4 Process [PID 4093] /usr/libexec/fwupd/fwupd

any ideas?

Ah! I found it, service seems to be flapping

❯ sudo systemctl status clr-fwupd-update.service
● clr-fwupd-update.service - Auto-firmware update
Loaded: loaded (/usr/lib/systemd/system/clr-fwupd-update.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-04-19 13:39:31 EDT; 21h ago
Process: 15229 ExecStart=/usr/bin/clr-fwupd-update (code=exited, status=255/EXCEPTION)
Main PID: 15229 (code=exited, status=255/EXCEPTION)

Apr 19 13:39:30 clr-live systemd[1]: Starting Auto-firmware update…
Apr 19 13:39:31 clr-live systemd[1]: clr-fwupd-update.service: Main process exited, code=exited, status=255/EXCEPTION
Apr 19 13:39:31 clr-live systemd[1]: clr-fwupd-update.service: Failed with result ‘exit-code’.
Apr 19 13:39:31 clr-live systemd[1]: Failed to start Auto-firmware update.

NVM - I saw fwupd.service

Can confirm tho, disabling fwupd services brought my power draw down to ~ 7w

but looks like something is going to kick this one on it’s own:

● fwupd.service - Firmware update daemon
Loaded: loaded (/usr/lib/systemd/system/fwupd.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: https://fwupd.org/

Apr 20 11:33:19 clr-live systemd[1]: Stopping Firmware update daemon…
Apr 20 11:33:19 clr-live systemd[1]: fwupd.service: Succeeded.
Apr 20 11:33:19 clr-live systemd[1]: Stopped Firmware update daemon.
Apr 20 12:44:58 clr-live systemd[1]: Starting Firmware update daemon…
Apr 20 12:44:59 clr-live systemd[1]: Started Firmware update daemon.
Apr 20 12:44:59 clr-live fwupd[39513]: 16:44:59:0493 FuPluginThunderbolt got change event for unknown device, adding instead
Apr 20 12:50:36 clr-live systemd[1]: Stopping Firmware update daemon…
Apr 20 12:50:36 clr-live systemd[1]: fwupd.service: Succeeded.
Apr 20 12:50:36 clr-live systemd[1]: Stopped Firmware update daemon.

Also had the same problem with fwupd high CPU usage, masked it.

How did you do a mask? My method was just to rename the service file to .bak - but I assume there’s a better more systemd way to do this.

systmctl has a mask subcommand.

From man systemctl

mask UNIT...
	       Mask one or more units, as specified on the command line. This will
	       link these unit files to /dev/null, making it impossible to start
	       them. This is a stronger version of disable, since it prohibits all
	       kinds of activation of the unit, including enablement and manual
	       activation. Use this option with care. This honors the --runtime
	       option to only mask temporarily until the next reboot of the
	       system. The --now option may be used to ensure that the units are
	       also stopped. This command expects valid unit names only, it does
	       not accept unit file paths.

You may also check man man :slight_smile: