[systemd-devel] Start service after video drivers have been loaded
Lennart Poettering
lennart at poettering.net
Mon Jun 17 09:07:10 UTC 2019
On So, 09.06.19 19:45, Germano Massullo (germano.massullo at gmail.com) wrote:
> Il giorno mar 21 mag 2019 alle ore 16:59 Mantas Mikulėnas
> <grawity at gmail.com> ha scritto: > Actually, maybe having udev
> > trigger BOINC startup would be a good option? After all that's how
> > BlueZ already works -- it doesn't go in multi-user.target, it has
> > WantedBy=bluetooth.target and there's an udev rule that makes every
> > Bluetooth device pull in bluetooth.target as a dependency. And
> > that's already an official systemd thing, too.
>
> No because BOINC client can even run on systems without graphic card.
> I will try an approach of restarting BOINC client as soon a new
> dev-dri-card0.device appears
The clean way to handle this is to make your software handle hardware
dynamically internally: make use of the graphics devices it can make
use of the moment they pop up, and not earlier, and do so with any
device showing up, regardless if there are zero initially, one
eventually, or even more...
systemd is not really designed to be used as work-around for software
that deals with hardware but doesn't really understand that hw is
dynamic these days.
Hence my recommendation would be to work with the upstream developers
of your project to natively hook up things with libudev or a similar
library to watch for devices popping up and going away.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list