[systemd-devel] Start service after video drivers have been loaded

Mantas Mikulėnas grawity at gmail.com
Tue May 21 14:56:30 UTC 2019


On Tue, May 21, 2019 at 1:39 PM Germano Massullo <germano.massullo at gmail.com>
wrote:

> Hello, Fedora / EPEL BOINC comaintainer here.
> On BOINC client we have a problem. On some Linux distributions BOINC
> gets loaded before the videocard drivers are loaded, so it does not
> detect OpenCL/CUDA capabilities.
> We cannot use graphical.target as wait condition because there can be
> headless systems without graphic server so this condition cannot be
> used.
> What can be a good solution in your opinion?
>

You cannot really know when *all* devices have been detected. Although,
since graphics cards are probably always fixed PCI devices, maybe a limited
form of `udevadm settle` (one that doesn't block the rest of boot process)
would work?

You can know when the *first* device has been detected. This is probably
just as poor a suggestion as above, but worth a try: Add a dependency on
dev-dri-card0.device (and an udev rule to apply TAG+="systemd" to drm
devices).

(Even crazier would be to allow BOINC to start as normal, but then
*restart* it as soon as the first GPU driver has been loaded.)

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190521/b35c7157/attachment.html>


More information about the systemd-devel mailing list