From owner-freebsd-x11@freebsd.org Sun Sep 15 13:07:48 2019 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5010AECFE4 for ; Sun, 15 Sep 2019 13:07:48 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46WV6D1R8bz4Ktb for ; Sun, 15 Sep 2019 13:07:48 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 2F463ECFE2; Sun, 15 Sep 2019 13:07:48 +0000 (UTC) Delivered-To: x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DF93ECFE1 for ; Sun, 15 Sep 2019 13:07:48 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46WV6D0KfGz4KtZ; Sun, 15 Sep 2019 13:07:48 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id EAAF5EE3E; Sun, 15 Sep 2019 13:07:47 +0000 (UTC) From: Jan Beich To: raichoo Cc: x11@freebsd.org Subject: Re: wayland: hotplugging additional screens References: <20190915114155.GA1483@lain> Date: Sun, 15 Sep 2019 15:07:45 +0200 In-Reply-To: <20190915114155.GA1483@lain> (raichoo@acmelabs.space's message of "Sun, 15 Sep 2019 13:41:55 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2019 13:07:48 -0000 raichoo writes: > Hi, > > I'm currently developing a wayland compositor on FreeBSD and got started on > adding support for multiple screens. It seems that a running compositor is not > getting notified when a new screen is attached to the system. I need to restart > the compositor for it to get recognized. The library I'm using is wlroots. > > Is anyone else having the same issue? Does the following help? Index: devel/libudev-devd/Makefile =================================================================== --- devel/libudev-devd/Makefile (revision 512101) +++ devel/libudev-devd/Makefile (working copy) @@ -2,8 +2,12 @@ PORTNAME= libudev-devd PORTVERSION= 0.4 +PORTREVISION= 1 CATEGORIES= devel +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= f11ee5b418c7.patch:-p1 + MAINTAINER= x11@FreeBSD.org COMMENT= libudev-compatible interface for devd Index: devel/libudev-devd/distinfo =================================================================== --- devel/libudev-devd/distinfo (revision 512101) +++ devel/libudev-devd/distinfo (working copy) @@ -1,3 +1,5 @@ TIMESTAMP = 1527795819 SHA256 (FreeBSDDesktop-libudev-devd-0.4-fbe5a0b_GH0.tar.gz) = 4f6423caf9b673e8bae14c2ec94f0ac1c3fc90b2a1b96315ce11caba1ac342e2 SIZE (FreeBSDDesktop-libudev-devd-0.4-fbe5a0b_GH0.tar.gz) = 17111 +SHA256 (f11ee5b418c7.patch) = 5f7ed7a4158295356310b838a8f0363c8c6a197dab8e24cc4ca9ee2ded4cc6a5 +SIZE (f11ee5b418c7.patch) = 2768 Index: x11-toolkits/wlroots/Makefile =================================================================== --- x11-toolkits/wlroots/Makefile (revision 511956) +++ x11-toolkits/wlroots/Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= wlroots DISTVERSION= 0.7.0 +PORTREVISION= 1 CATEGORIES= x11-toolkits MAINTAINER= jbeich@FreeBSD.org Index: x11-toolkits/wlroots/files/patch-backend_session_session.c =================================================================== --- x11-toolkits/wlroots/files/patch-backend_session_session.c (nonexistent) +++ x11-toolkits/wlroots/files/patch-backend_session_session.c (working copy) @@ -0,0 +1,22 @@ +Enable DRM hotplug on FreeBSD + +--- backend/session/session.c.orig 2019-08-27 03:32:24 UTC ++++ backend/session/session.c +@@ -288,11 +288,6 @@ size_t wlr_session_find_gpus(struct wlr_session *sessi + return explicit_find_gpus(session, ret_len, ret, explicit); + } + +-#ifdef __FreeBSD__ +- // XXX: libudev-devd does not return any GPUs (yet?) +- return explicit_find_gpus(session, ret_len, ret, "/dev/drm/0"); +-#else +- + struct udev_enumerate *en = udev_enumerate_new(session->udev); + if (!en) { + wlr_log(WLR_ERROR, "Failed to create udev enumeration"); +@@ -360,5 +355,4 @@ size_t wlr_session_find_gpus(struct wlr_session *sessi + udev_enumerate_unref(en); + + return i; +-#endif + }