On focal, this reproduces with 5.4 and 5.15 kernels.
One of the causes for the delay is that udev is reading efivars for secure boot, which takes 0.3 seconds. And it does it multiple times.
When running a 5.19 kernel on focal, however, the test seems to be able to detach the device before udev starts reading the efivars. Same udev version here. Perhaps events are pushed in a different order?
On focal, this reproduces with 5.4 and 5.15 kernels.
One of the causes for the delay is that udev is reading efivars for secure boot, which takes 0.3 seconds. And it does it multiple times.
When running a 5.19 kernel on focal, however, the test seems to be able to detach the device before udev starts reading the efivars. Same udev version here. Perhaps events are pushed in a different order?
Cascardo.