On Wed, Jan 03, 2024 at 07:52:56PM -0700, Chris Waddey wrote: > Hello. Hi,
> I was able to get the latest version of sway working on my box after > getting the latest version of wlroots to work, which was after applying > the following patch to the latest version of libdrm (source obtained > from https://gitlab.freedesktop.org/mesa/drm.git). I don't know if we > have some patches somewhere else that handle this, but I figured I > would send it your way in case it would save some effort. Does this include the removal of the wlr_drm protocol which was committed to sway/wlroots a few hours ago ? I wasn't sure if OpenBSD libdrm / mesa supports linux-dmabuf which is supposed to replace it. If it works with linux-dmabuf, that's great news. I don't think there are any other significant changes since the released versions packaged in ports that could impact OpenBSD. > I also had to do > > doas chmod $USER:$USER /dev/dri/* && env WLR_RENDERER=pixman > startsway.sh Normally if you log in on the text console where you want to run sway, the /dev/dri/* owndership is taken care of by fbtab(5). I think setting WLR_RENDERER to pixman means that you don't use the new linux-dmabuf protocol. What happens if you leave that variable undefined (defaults to 'auto') ? > to get everything just right. And of course I applied the patches I > found in ports to sway and wlroots, but nothing else that I can > think of. This diff is present in the /usr/xenocara/lib/libdrm tree. (not exactly the same though: the whole #ifdef __OpenBSD__ part can be removed now). > > ~ 0$ pkg-config --modversion libdrm > 2.4.119 > ~ 0$ pkg-config --modversion wlroots > 0.18.0-dev > ~ 0$ sway --version > sway version 1.9-dev-52eaa5be (Jan 3 2024, branch 'master') > > diff --git xf86drm.h xf86drm.h > index 2cb14156..c91f157b 100644 > --- xf86drm.h > +++ xf86drm.h > @@ -77,8 +77,8 @@ extern "C" { > #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) > > #ifdef __OpenBSD__ > -#define DRM_DIR_NAME "/dev" > -#define DRM_PRIMARY_MINOR_NAME "drm" > +#define DRM_DIR_NAME "/dev/dri" > +#define DRM_PRIMARY_MINOR_NAME "card" > #define DRM_CONTROL_MINOR_NAME "drmC" /* deprecated */ > #define DRM_RENDER_MINOR_NAME "drmR" > #else >