On Fri, Dec 7, 2018 at 9:36 AM Belisko Marek <[email protected]> wrote:
> Hi Tomasz, > > On Fri, Dec 7, 2018 at 6:26 AM Tomasz Torcz <[email protected]> wrote: > > > > On Thu, Dec 06, 2018 at 10:58:31PM +0100, Belisko Marek wrote: > > > Hi, > > > > > > I'm trying to run qt qml application on intel nuc but when booted from > > > hdd I'll get an eror when app is started: > > > > > > I think it is some kind of timing issue as when booting same image > > > from usb stick application will automatically start while when booting > > > from hdd I get above error. Would be possible to postpone it somehow > > > until DRM display is initialized? Thanks. > > > > This is exactly the problem GDM (GNOME Display Manager) encountered > > few years ago. The solution was devised – your application needs to wait > > until CanGraphical property goes to yes on the seat application is > > using. > Thanks for info. But I'm not suing any GDM (nor X) just qml > application. So IIRC then I need to code something in my application > to wait until > CanGraphical is available? Yes, to use this method you would need to access logind's D-Bus API. I'm not sure whether QML provides D-Bus access, although Qt does. > I was thinking about > approach that systemd can postpone starting of my application until > DRM is available (not sure is such trigger exists though). > It sounds more like you're looking for a dependency, not a trigger. (Although either would work, I guess.) In systemd itself, the only available built-in dependency is "device now available in /dev or /sys". For example, you could use this, assuming there's only one card and it's always called "card0": [Unit] Requires=dev-dri-card0.device After=dev-dri-card0.device (Note: This also needs udev/rules.d/99-systemd.rules to be extended with an apropriate TAG+="systemd".) -- Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
