[systemd-devel] Ordering after udev applied rules to `/dev/dri/card0`

Lennart Poettering mzxreary at 0pointer.de
Wed Apr 1 15:10:57 UTC 2020


On Mi, 01.04.20 14:23, Paul Menzel (pmenzel+systemd-devel at molgen.mpg.de) wrote:

> > > After=device should work. udev announces device after all rules have
> > > been processed.
> >
> > After= only orders, but this doesn't pull the device unit into the job
> > queue. To do that, you need to add Wants= on the device unit as well.
>
> Trying this,
>
>     After=dev-dri-card0.device
>     Wants=dev-dri-card0.device
>
> the service times out waiting for the device.
>
>     $ journalctl -a
>     […]
>     Apr 01 14:15:42.672430 kodi systemd[1]: Reached target Multi-User
> System.
>     […]
>     Apr 01 14:17:09.805001 kodi systemd[1]: dev-dri-card0.device: Job
> dev-dri-card0.device/start timed out.
>     Apr 01 14:17:09.805839 kodi systemd[1]: Timed out waiting for device
> /dev/dri/card0.
>     Apr 01 14:17:09.806464 kodi systemd[1]: dev-dri-card0.device: Job
> dev-dri-card0.device/start failed with result 'timeout'.
>     Apr 01 14:17:09.809847 kodi systemd[1]: Starting Weston, a Wayland
> compositor, as a system service...
>     […]
>     $ ls -l /dev/dri/card0
>     crw-rw---- 1 root video 226, 0 Apr  1 14:15 /dev/dri/card0

DRM devices are currently not tagged with "systemd", and thus no
.device units are syntesized for them in systemd. Add a udev rule that
matches against them and sets the "systemd" tag and they will appear
in systemd, so that you can order your stuff against it.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list