Dear Lennart,

Am 01.04.20 um 17:10 schrieb Lennart Poettering:
On Mi, 01.04.20 14:23, Paul Menzel (pmenzel+systemd-de...@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.

That did the trick. In `systemd-analyze critical-chain` the device shows up with three seconds. Quite a lot, but unfortunately the Linux drivers do not seem to be optimized for speed.

But my problem turned out to be something else. getty@tty1.service and Weston on tty1 were apparently conflicting causing the permission denied errors, and adding `Conflict=getty@tty1.service` seems to have fixed it.

I created merge/pull request #15307 for adding the tags anyway [1].


Kind regards,

Paul


[1]: https://github.com/systemd/systemd/pull/15307
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to