Date: Thu, 23 Apr 2020 11:43:56 +0200 From: Frederic Chardon <chardon.frederic@gmail.com> To: Emmanuel Vadot <manu@bidouilliste.com> Cc: Jan Beich <jbeich@freebsd.org>, Niclas Zeising <zeising+freebsd@daemonic.se>, freebsd-x11@freebsd.org Subject: No hardware acceleration with Xwayland and i915kms (was: Wayland on FreeBSD) Message-ID: <CAMODbkmxhoGWubGNOEduXcuh3n64Rr7OReVC-0J3qYsgOWGxtw@mail.gmail.com> In-Reply-To: <20200423113619.846772c919fece1861a8cca7@bidouilliste.com> References: <CAFYkXjmfyLZAi1HZe-RE3wLxa6GRNP6GkmtZG-4T2puRDOz0JA@mail.gmail.com> <o8rn-snio-wny@FreeBSD.org> <CAMODbkmL5PT0Q3inE=o9T2T-Gw-d6_JcHCXZSYpfm_UGdXfzxg@mail.gmail.com> <6c7abdcf-aeef-4af4-b8f4-9d7fd0e45cf0@localhost> <7fba319c-c012-8893-3ce0-e2a166c38d2d@daemonic.se> <CAMODbkkGvUUwXqzFieyM-MMwQiRu2b6L1hmvgMn9MchDkpB7ig@mail.gmail.com> <d082-pa3p-wny@FreeBSD.org> <CAMODbknWFRzru%2B1Ej3XGV6fUmdKRQB-wUf-3bEqqrQJryw37MQ@mail.gmail.com> <wo6a-ouni-wny@FreeBSD.org> <CAMODbkkreoL=RsUF9B9z1pVtL2SMK%2BaXA6Z%2BYY1xcZP4h8U9rQ@mail.gmail.com> <lfmp-rhno-wny@FreeBSD.org> <CAMODbkk0pr0cbxKJ51RG2jqEWA%2BCg07ZNzO3bdgqoLh2QJDHuA@mail.gmail.com> <sggv-lgjn-wny@FreeBSD.org> <CAMODbk=bpMZQVskTKCMAZNMbyXk6Vt=w1G0RLAO%2B4i4f_3yV_g@mail.gmail.com> <d07z-rvwn-wny@FreeBSD.org> <CAMODbkkhW=uY7J3i55SQED7Sv1Tv_bwCYXzWq-tmRNzeTH=jdA@mail.gmail.com> <20200423113619.846772c919fece1861a8cca7@bidouilliste.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Le jeu. 23 avr. 2020 =C3=A0 11:36, Emmanuel Vadot <manu@bidouilliste.com> a= =C3=A9crit : > > On Thu, 23 Apr 2020 11:24:37 +0200 > Frederic Chardon <chardon.frederic@gmail.com> wrote: > > > Le jeu. 23 avr. 2020 =C3=A0 00:35, Jan Beich <jbeich@freebsd.org> a =C3= =A9crit : > > > > > > Frederic Chardon <chardon.frederic@gmail.com> writes: > > > > > > > Le mer. 22 avr. 2020 =C3=A0 16:51, Jan Beich <jbeich@freebsd.org> a= =C3=A9crit : > > > > > > > >> > > > >> Frederic Chardon <chardon.frederic@gmail.com> writes: > > > >> > > > >> > Le lun. 20 avr. 2020 =C3=A0 23:06, Jan Beich <jbeich@freebsd.org= > a =C3=A9crit : > > > >> > > > > >> >> > > > >> >> Frederic Chardon <chardon.frederic@gmail.com> writes: > > > >> >> > > > >> >> > > > > >> >> > The trace shows usage of llvmpipe after the failed ioctl on > > > >> >> > /dev/dri/card0, so as I understand the lack of hardware accel= eration > > > >> >> > concerns only Xwayland, whereas wayland itself is accelerated= ? > > > >> >> > > > >> >> Yep. Check which ioctls fail then try to reproduce outside of M= esa or > > > >> >> hardcode the result. Overriding PCI ID via INTEL_DEVID_OVERRIDE= is > > > >> >> unlikely to help e.g., > > > >> > > > > >> > All below failure occurs only in xwayland, X11 and wayland succe= ed. > > > >> > > > > >> > The first failure is with I915_PARAM_CHIPSET_ID. When I hardcode= the > > > >> > correct ID I get a failure with I915_PARAM_HAS_RELAXED_DATA. Whe= n I > > > >> > force the result to be true (as with X11 and Wayland), the ioctl > > > >> > DRM_I915_GEM_EXECBUFFER2_WR fails with errno EPERM. > > > >> > > > >> Thanks for investigating. Maybe either DRM_AUTH or DRM_RENDER_ALLO= W fails. > > > >> Does setuid bit on Xwayland binary help? > > > > Yes, hardware acceleration works. eglinfo still complain about inva= lid > > > > 0xffffffff PCI ID though > > > > > > > >> Does disabling render node help > > > >> e.g., chmod 0000 /dev/dri/renderD128 ? > > > > No > > > > > > > > What helps however is to mount the different linux filesystems afte= r > > > > i915kms is loaded. > > > > eg I added "late" keyword to fstab as below > > > > devfs /compat/linux/dev devfs rw,late 0 0 > > > > fdesc /compat/linux/dev/fd fdescfs rw,late,linrdlnk 0 0 > > > > linproc /compat/linux/proc linprocfs rw,late 0 0 > > > > linsys /compat/linux/sys linsysfs rw,late 0 0 > > > > > > > > without the late keyword, acceleration works if devfs alone is > > > > mounted. any other fs (with or without devfs) makes Xwayland use > > > > software rendering. > > > > As with setuid Xwayland, eglinfo complains about invalid PCI ID. > > > > > > manu@ fixed major/minor usage upstream. Can you try the following pat= ch? > > > > No change. major are still different, minor doesn't have the 0x80 bit > > set, and hw accel is disabled if I mount linux pseudofs before kldload > > i915kms > > major/minor are irrelevent on FreeBSD, upstream code now don't care > about them and should properly detect the node type. > I haven't followed the whole thread as it's a typical mailing list > thread that switched to troll and unreleated content. Can someone > explain what is the problem that you have please ? > Yes, let's fork the thread System is a recent -current (from last Sunday), intgegrated intel HD4000 and drm-devel-kmod Hardware acceleration works with X11 and native wayland, but not with Xwayl= and. With help of Jan I found a weird workaround to mount devfs, fdescfs, linprocfs and linsysfs under /compat/linux _after_ i915kms is loaded.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMODbkmxhoGWubGNOEduXcuh3n64Rr7OReVC-0J3qYsgOWGxtw>