FuProgress - Incorrect percent

7 views
Skip to first unread message

Sanjay Sheth

unread,
Jun 8, 2022, 8:28:58 PM6/8/22
to fwupd
With latest code base, seeing following errors during  _write_firmware():

22:46:45:0273 FuDeviceList         no replug or re-enumerate required
Writing…                 [***************************************]
22:46:45:0274 FuProgress           percentage should not go down from 100 to 51: 0) ../src/fu-engine.c:2970 (16/18)

22:46:45:0274 FuDeviceList         no replug or re-enumerate required
Restarting device…       [***************************************]
22:46:45:0274 FuProgress           percentage should not go down from 100 to 51: 0) ../src/fu-engine.c:2970 (16/18)

22:46:45:0274 FuDeviceList         no replug or re-enumerate required
22:46:45:0274 FuEngine             detach -> FuLogitechBulkcontrollerDevice:
...................<snip>..........................................
22:54:05:0809 FuPluginLogitechBulkController firmware update status: Updating. progress: 1
22:54:05:0809 FuProgress           percentage should not go down from 90 to 1: 3) ../src/fu-engine.c:2970 (16/18)
2) ../plugins/logitech-bulkcontroller/fu-logitech-bulkcontroller-device.c:1127 (1/4)
1) ../plugins/logitech-bulkcontroller/fu-logitech-bulkcontroller-device.c:709 (3/4)
0) (null) (0/0)
...................<snip>..........................................

Richard Hughes

unread,
Jun 9, 2022, 5:15:05 AM6/9/22
to Sanjay Sheth, fwupd
Hi Sanjay,

Is there a reason the updateProgress property goes from 90% to 1%?
Does https://github.com/fwupd/fwupd/pull/4725 fix things?

Richard.
> --
> You received this message because you are subscribed to the Google Groups "fwupd" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fwupd+un...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/fwupd/3d3e0633-2f66-4828-b785-bd06816de001n%40googlegroups.com.

Sanjay Sheth

unread,
Jun 9, 2022, 6:39:19 AM6/9/22
to fwupd
Thanks a bunch Richard for prompt response/fix.

Our updater has 2 major (time consuming) steps.
1. Push firmware image (>1GB)  to device in 8k chunks (FWUPD_STATUS_DEVICE_WRITE)
2. Device validates, uploads new image on inactive partition, reboot itself (FWUPD_STATUS_DEVICE_VERIFY)
We invoke fu_progress_set_percentage_full() for both tasks. Your fix helped with 2nd task. How do we update progress for 1st task!
Also, can we still use FU_PROGRESS_FLAG_GUESSED flag (on our dev setup) to determine percent allocation for each steps?

Richard Hughes

unread,
Jun 9, 2022, 7:51:02 AM6/9/22
to Sanjay Sheth, fwupd
On Thu, 9 Jun 2022 at 11:39, Sanjay Sheth <ssh...@logitech.com> wrote:
> We invoke fu_progress_set_percentage_full() for both tasks. Your fix helped with 2nd task. How do we update progress for 1st task!

I think that should work find as it is; i.e.
fu_progress_set_percentage_full() is being called with the
blocks/block_total which I think is the right thing to do.

> Also, can we still use FU_PROGRESS_FLAG_GUESSED flag (on our dev setup) to determine percent allocation for each steps?

Yes, if you use FU_PROGRESS_FLAG_GUESSED then the daemon will tell you
(in red text, no less) what step values are appropriate.

Richard.
Reply all
Reply to author
Forward
0 new messages