fwupd icon indicating copy to clipboard operation
fwupd copied to clipboard

Add the concept of a plugin inhibit

Open hughsie opened this issue 1 year ago • 2 comments

On the Acer 501 dock the i2c bus is used by two different plugins with different exposed devices. Using each one in isolation works fine, but together they explode as they both try probing the device at the same time in different ways.

Type of pull request:

hughsie avatar Jul 01 '24 09:07 hughsie

The plugins aren't processed serially

When the USB device appears, the rts54hub polls for the version number, which seems to upset the cros_ec plugin which assumes it can write to the same device as soon as the [same] device appears. The alternative might be to put a big delay in the cros_ec write_firmware() for the device to settle -- but then it depends on what event fwupd processes first as it's single threaded.

hughsie avatar Jul 01 '24 12:07 hughsie

Hmm, so really this is asking for USB events or Udev events to be inhibited, not plugins to be inhibited then, isn't it?

superm1 avatar Jul 01 '24 14:07 superm1

Hmm, so really this is asking for USB events or Udev events

Well, it's specific to that one plugin -- but we could also make it specific to the device if you think that's cleaner.

hughsie avatar Jul 01 '24 17:07 hughsie

Hmm, so really this is asking for USB events or Udev events

Well, it's specific to that one plugin -- but we could also make it specific to the device if you think that's cleaner.

Well I'm worried it's a baby with the bath water; doing too much for a small problem. How about just the device for now and some comments that it can be switched to plugin inhibit if necessary later?

superm1 avatar Jul 01 '24 18:07 superm1

@superm1 something like hughsie/d501-device-inhibit perhaps? Untested as I'm not near the hardware, but it should work.

hughsie avatar Jul 03 '24 20:07 hughsie