diff options
author | meta <meta@FreeBSD.org> | 2020-02-27 12:14:26 +0800 |
---|---|---|
committer | meta <meta@FreeBSD.org> | 2020-02-27 12:14:26 +0800 |
commit | a19c94d453737d6b881bff0efec92589c50fc699 (patch) | |
tree | da9bf3ec090038c3f88d010f623e0b63836d4981 | |
parent | 35852d66e1cd558966749f4456f4740710a6d0cd (diff) | |
download | freebsd-ports-gnome-a19c94d453737d6b881bff0efec92589c50fc699.tar.gz freebsd-ports-gnome-a19c94d453737d6b881bff0efec92589c50fc699.tar.zst freebsd-ports-gnome-a19c94d453737d6b881bff0efec92589c50fc699.zip |
x11-drivers/xorgxrdp: enable DRI3/glamor support
With the advent of 1.20.x x11-server/xorg-server xorgxrdp can support
dri3/glamor [1] to enable hardware supported OpenGL acceleration with an
xorgxrdp desktop.
Also add pkg-message to explain how to enable hardware acceleration.
While here, fix misuse of "-I" flag to specify LIBDIR.
[1] https://github.com/neutrinolabs/xrdp/issues/1029
PR: 244298
Submitted by: Derek Schrock <dereks@lifeofadishwasher.com> (initial revision)
Approved by: meta (myself, maintainer)
Sponsored by: HAW International
-rw-r--r-- | x11-drivers/xorgxrdp/Makefile | 19 | ||||
-rw-r--r-- | x11-drivers/xorgxrdp/files/pkg-message.in | 39 |
2 files changed, 54 insertions, 4 deletions
diff --git a/x11-drivers/xorgxrdp/Makefile b/x11-drivers/xorgxrdp/Makefile index 993a02114455..5229fd75147e 100644 --- a/x11-drivers/xorgxrdp/Makefile +++ b/x11-drivers/xorgxrdp/Makefile @@ -3,7 +3,7 @@ PORTNAME= xorgxrdp DISTVERSIONPREFIX= v DISTVERSION= 0.2.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers DIST_SUBDIR= xrdp @@ -27,10 +27,21 @@ GNU_CONFIGURE= yes INSTALL_TARGET= install-strip CFLAGS+= -I${LOCALBASE}/include -LIBS= -I${LOCALBASE}/lib +LIBS= -L${LOCALBASE}/lib CONFIGURE_ENV= XRDP_CFLAGS=-I${WRKSRC_xrdp}/common -OPTIONS_DEFINE= DEBUG +OPTIONS_DEFINE= DEBUG DRI3 +OPTIONS_DEFAULT= DRI3 + +DRI3_DESC= DRI3/Glamor OpenGL Support +DRI3_CONFIGURE_ENABLE= glamor +DRI3_LIB_DEPENDS= libepoxy.so:graphics/libepoxy + +.include <bsd.port.pre.mk> + +.if ${PORT_OPTIONS:MDRI3} +SUB_FILES= pkg-message +.endif post-patch-DEBUG-on: ${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's|#define LOG_LEVEL [0-9]*|#define LOG_LEVEL 20|' @@ -38,4 +49,4 @@ post-patch-DEBUG-on: pre-configure: @cd ${WRKSRC} && ./bootstrap -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/x11-drivers/xorgxrdp/files/pkg-message.in b/x11-drivers/xorgxrdp/files/pkg-message.in new file mode 100644 index 000000000000..88ef7fe81820 --- /dev/null +++ b/x11-drivers/xorgxrdp/files/pkg-message.in @@ -0,0 +1,39 @@ +[ +{ type: install + message: <<EOM + +xorgxrdp supports hardware acceleration as well as usual xorg-server. +To configure hardware acceleration, follow the following steps. + +1. Install drm-kmod + # pkg install drm-kmod + +2. Configure to load kernel module (either one of the following) + # sysrc kld_list="/boot/modules/i915kms.ko" + # sysrc kld_list="/boot/modules/amdgpu.ko" + # sysrc kld_list="/boot/modules/radeonkms.ko" + +3. Ensure users who login via xrdp are member of the "video" group + # pw groupmod video -m username|| pw groupmod wheel -m username + +4. Edit /etc/X11/xrdp/xorg.conf to fit your environment + "/dev/dri/renderD128" might be different depending on your environment. + + Find the following line and change it to the actual path. + Option "DRMDevice" "/dev/dri/renderD128" + +5. Restart your system and login via xrdp + +See also the Wiki page for detailed instructions: + https://wiki.freebsd.org/Graphics#Hardware_Support + + +If hardware acceleration is properly configured, you will see logs like the +following in ~/.local/share/xorg/Xorg.10.log. 10 can be replaced with display +number. + + "glamor X acceleration enabled on Mesa DRI Intel(R) Ivybridge Desktop" + +EOM +} +] |