From owner-freebsd-x11@freebsd.org Mon Apr 20 13:20:30 2020 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 4C6E42C2B2A; Mon, 20 Apr 2020 13:20:30 +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 495S4G1C8Hz4LJP; Mon, 20 Apr 2020 13:20:30 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 0456B15DE4; Mon, 20 Apr 2020 13:20:30 +0000 (UTC) From: Jan Beich To: Frederic Chardon Cc: Niclas Zeising , freebsd-x11@freebsd.org, FreeBSD Questions Mailing List Subject: Re: Wayland on FreeBSD References: <6c7abdcf-aeef-4af4-b8f4-9d7fd0e45cf0@localhost> <7fba319c-c012-8893-3ce0-e2a166c38d2d@daemonic.se> Date: Mon, 20 Apr 2020 15:20:26 +0200 In-Reply-To: (Frederic Chardon's message of "Mon, 20 Apr 2020 13:59:03 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 20 Apr 2020 13:20:30 -0000 Frederic Chardon writes: > Le lun. 20 avr. 2020 =C3=A0 12:20, Niclas Zeising > a =C3=A9crit : > >> >> On 2020-04-20 12:07, Greg V wrote: >> > Apr 20, 2020 12:56:35 PM Frederic Chardon : >> > >> >> Le dim. 19 avr. 2020 =C3=A0 13:50, Jan Beich a = =C3=A9crit : >> >> >> >>> >> >>> >> >>> I'm using Sway myself primarily with X11 applications. For example, >> >>> "vblank_mode=3D0 glxgears" shows 3x more FPS than on real Xorg serve= r. ;) >> >>> >> >> >> >> I decided to give it a try, is hardware acceleration supposed to work? >> >> glxgears gives 10x less fps than with X, and 3D is incredibly >> >> sluggish. >> >> eglinfo output that leads me to believe it is not: >> >> GBM platform: >> >> i965_dri.so does not support the 0xffffffff PCI ID. >> >> >> >> It is with sway, -current from yesterday, intel HD4000 iGPU (Ivybridg= e i5-3320M) >> >> no difference between drm-devel-kmod or drm-current-kmod. >> > >> > Sway itself wouldn't even start without hardware rendering, it doesn't= *have* a software renderer. >> > >> > For the X applications like glxgears, I guess with the mesa build >> > that's in official ports currently you still need that DRI3 >> > something environment variable.. >> >> You shouldn't need that one. We switched the default to use DRI3 not >> long after xorg-server was updated to 1.20. >> https://svnweb.freebsd.org/ports?view=3Drevision&revision=3D528071 >> It should also be in the latest quarterly branch. >> Regards >> -- >> Niclas > > With or without LIBGL_DRI3_ENABLE=3D1 in the environment the result is > the same. I use official packages, updated yesterday. > > The problem I face might be due to permission issue. ktrace shows this: > 28047 eglinfo CALL openat(AT_FDCWD,0x7fffffffc820,0x100002) > 28047 eglinfo NAMI "/dev/dri/card0" > 28047 eglinfo RET openat 3 > /..../ > 28047 eglinfo CALL ioctl(0x3,0xc0106446,0x7fffffffbc70) > 28047 eglinfo RET ioctl -1 errno 13 Permission denied What initializes DRI3 is Xwayland which is started by Sway. DRI3 can fail for weird reasons (e.g., bug 241821), so make sure you have https://reviews.freebsd.org/D23846 As graphics/mesa-demos doesn't install eglgears_wayland to check OpenGL acceleration in native Wayland clients try multimedia/mpv instead e.g., $ pkg install mpv $ mpv --no-config --msg-level=3Dvo/gpu=3Dv --gpu-api=3Dopengl --gpu-conte= xt=3Dwayland /path/to/foo.mp4