Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2020 04:14:26 +0000 (UTC)
From:      Koichiro Iwao <meta@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r527235 - in head/x11-drivers/xorgxrdp: . files
Message-ID:  <202002270414.01R4EQ6N083877@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: meta
Date: Thu Feb 27 04:14:26 2020
New Revision: 527235
URL: https://svnweb.freebsd.org/changeset/ports/527235

Log:
  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

Added:
  head/x11-drivers/xorgxrdp/files/
  head/x11-drivers/xorgxrdp/files/pkg-message.in   (contents, props changed)
Modified:
  head/x11-drivers/xorgxrdp/Makefile

Modified: head/x11-drivers/xorgxrdp/Makefile
==============================================================================
--- head/x11-drivers/xorgxrdp/Makefile	Thu Feb 27 01:01:03 2020	(r527234)
+++ head/x11-drivers/xorgxrdp/Makefile	Thu Feb 27 04:14:26 2020	(r527235)
@@ -3,7 +3,7 @@
 PORTNAME=	xorgxrdp
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.2.12
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-drivers
 DIST_SUBDIR=	xrdp
 
@@ -27,15 +27,26 @@ 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|'
 
 pre-configure:
 	@cd ${WRKSRC} && ./bootstrap
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Added: head/x11-drivers/xorgxrdp/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xorgxrdp/files/pkg-message.in	Thu Feb 27 04:14:26 2020	(r527235)
@@ -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
+}
+]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002270414.01R4EQ6N083877>