[systemd-devel] Reliably waiting for udevd to finish processing triggered events
Ray Strode
halfline at gmail.com
Mon Mar 9 13:06:34 PDT 2015
Hi,
On Mon, Mar 9, 2015 at 1:21 PM, Tom Gundersen <teg at jklm.no> wrote:
> This sounds like a broken model (even if the problems you outlined
> below were fixed). There is no reason to believe that all drm devices
> will be available by the time udev has finished coldplug. Devices may
> be enumerated at any time.
The code doesn't depend on all drm devices being available, it depends
on *any* drm devices being available. Anyway, I think we all agree using
a static timeout is a better approach.
> Yes, without the ping that udev-settle does, this is racy. Why not
> just order plymouth after udev-settle, if that is what you need?
plymouth used to do this a while back, but we stopped because it means
that the splash isn't shown as soon as a drm device becomes available.
Then we did this hack:
ExecStartPost=-/usr/bin/udevadm settle --timeout=30
--exit-if-exists=/sys/class/drm/card0/dev ; -/usr/bin/udevadm settle
--timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ;
-/usr/bin/plymouth show-splash
which makes it show-splash as soon as the graphics card becomes available,
but it falls over for optimus hardware, so plymouth switched to
listening to udev
on its own.
Plymouth listening for udev events is right, but it figuring out when
to fallback is wrong based on coldplug completion is wrong.
--Ray
More information about the systemd-devel
mailing list