Dear systemd folks,

I am using Debian Sid/unstable with systemd 245.2 and Weston 8.0.0.

I amtrying to start a graphical desktop as soon as possible. Currently, I use Weston, but unfortunately accessing `/dev/dri/card0` it gets a permission denied error. The Weston service unit is ordered after `systemd-logind.service`.

Weston now fails to start, because it gets a permission denied error accessing `/dev/dri/card0` [1][2].

drmModeSetCrtc(backend->drm.fd, output->crtc_id, scanout_state->fb->fb_id, 0, 0, connectors, n_conn, &mode->mode_info);

Right before Weston starts, the permission and ownership are like below.

    $ ls -l /dev/dri:
    insgesamt 0
    crw------- 1 root root 226,   0 Mär 19 17:29 card0
    crw------- 1 root root 226, 128 Mär 19 17:29 renderD128

After udev applied the rules, it looks like below, meaning users in group `video` are allowed to access the device.

    $ ls -l /dev/dri
    insgesamt 0
    drwxr-xr-x  2 root root         80 Mär 19 17:29 by-path
    crw-rw----+ 1 root video  226,   0 Mär 19 17:29 card0
    crw-rw----+ 1 root render 226, 128 Mär 19 17:29 renderD128

Is there a way to order a service in such a way, that it’s guaranteed that udev rules to devices were applied?

A small script applying permissions and ownership manually in `ExecStartPre=` seems to work around the (graphics) issue.

If it cannot be solved with ordering, what would you suggest?

[1]: https://gitlab.freedesktop.org/wayland/weston/issues/382
[2]: https://gitlab.freedesktop.org/wayland/weston/-/blob/master/libweston/backend-drm/kms.c#L741
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to