Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Replace logind CanGraphical with udev monitoring #2093

Closed
emersion opened this issue Apr 2, 2020 · 4 comments
Closed

Replace logind CanGraphical with udev monitoring #2093

emersion opened this issue Apr 2, 2020 · 4 comments

Comments

@emersion
Copy link
Member

emersion commented Apr 2, 2020

See https://lists.freedesktop.org/archives/systemd-devel/2020-April/044245.html

@ascent12
Copy link
Member

ascent12 commented Apr 2, 2020

One way to do this is to make wlr_session a type that the user is expected to deal with during initialization.

  1. User creates a wlr_session
  2. Listens for a "device added" signal
  3. Creates a DRM backend from the device, possibly mulitple
  4. Starts the backend

This would also help out with DRM device hotplugging, but is quite a breaking change. It doesn't fit the X11/Wayland backend initialization either, because they have no need for wlr_session. We could make the user just deal with the DRM backend acting differently, or add some kind no-op wlr_session that X11/Wayland would use.

Another easier but crappier way is to just block inside the wlr_session, waiting for a device to show up.

@emersion
Copy link
Member Author

emersion commented Apr 2, 2020

I don't know whether multiple DRM backends is a good idea. Could just have one DRM backend for all DRM devices.

@ascent12
Copy link
Member

ascent12 commented Apr 2, 2020

We still need a way to notify the user that a new device has appeared or disappeared. They may want to selectively enable/disable devices based on user configuration.

@emersion
Copy link
Member Author

emersion commented Apr 2, 2020

That's a good point. They also may want not to use udev and have a custom list of DRM devices to open.

emersion added a commit to emersion/wlroots that referenced this issue Nov 6, 2020
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.

This supersedes the logind CanGraphical property.

To test, e.g. with i915 and sway:

    rmmod -f i915
    sway &
    modprobe i915

Closes: swaywm#2093
kennylevinsen pushed a commit to kennylevinsen/wlroots that referenced this issue Nov 7, 2020
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.

This supersedes the logind CanGraphical property.

To test, e.g. with i915 and sway:

    rmmod -f i915
    sway &
    modprobe i915

Closes: swaywm#2093
emersion added a commit to emersion/wlroots that referenced this issue Nov 25, 2020
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.

This supersedes the logind CanGraphical property.

To test, e.g. with i915 and sway:

    rmmod -f i915
    sway &
    modprobe i915

Closes: swaywm#2093
udfn pushed a commit to udfn/wlroots that referenced this issue Dec 8, 2020
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.

This supersedes the logind CanGraphical property.

To test, e.g. with i915 and sway:

    rmmod -f i915
    sway &
    modprobe i915

Closes: swaywm#2093
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants