Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2020 23:06:35 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Frederic Chardon <chardon.frederic@gmail.com>
Cc:        Niclas Zeising <zeising+freebsd@daemonic.se>, freebsd-x11@freebsd.org, FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Wayland on FreeBSD
Message-ID:  <lfmp-rhno-wny@FreeBSD.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
Frederic Chardon <chardon.frederic@gmail.com> writes:

> Le lun. 20 avr. 2020 =C3=A0 20:54, Jan Beich <jbeich@freebsd.org> a =C3=
=A9crit :
>
>>
>> Frederic Chardon <chardon.frederic@gmail.com> writes:
>>
>> > Le lun. 20 avr. 2020 =C3=A0 15:20, Jan Beich <jbeich@freebsd.org> a =
=C3=A9crit :
>> >
>> >>
>> >> Frederic Chardon <chardon.frederic@gmail.com> writes:
>> >>
>> >> > Le lun. 20 avr. 2020 =C3=A0 12:20, Niclas Zeising
>> >> > <zeising+freebsd@daemonic.se> a =C3=A9crit :
>> >> >
>> >> >>
>> >> >> On 2020-04-20 12:07, Greg V wrote:
>> >> >> > Apr 20, 2020 12:56:35 PM Frederic Chardon <chardon.frederic@gmai=
l.com>:
>> >> >> >
>> >> >> >> Le dim. 19 avr. 2020 =C3=A0 13:50, Jan Beich <jbeich@freebsd.or=
g> a =C3=A9crit :
>> >> >> >>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> I'm using Sway myself primarily with X11 applications. For exa=
mple,
>> >> >> >>> "vblank_mode=3D0 glxgears" shows 3x more FPS than on real Xorg=
 server. ;)
>> >> >> >>>
>> >> >> >>
>> >> >> >> I decided to give it a try, is hardware acceleration supposed t=
o 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 (Iv=
ybridge i5-3320M)
>> >> >> >> no difference between drm-devel-kmod or drm-current-kmod.
[...]
>> >> > 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 t=
his:
>> >> > 28047 eglinfo  CALL  openat(AT_FDCWD,0x7fffffffc820,0x100002<O_RDWR=
|O_CLOEXEC>)
>> >> > 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
[...]
>>
>> Try starting Sway via "ktrace -i" or replace Xwayland binary with a
>> wrapper (see below) that starts it via ktrace. Tracing glxgears is too
>> late as Mesa will simply give up if DRI3 is not initialized.
[...]
>
> The trace shows usage of llvmpipe after the failed ioctl on
> /dev/dri/card0, so as I understand the lack of hardware acceleration
> concerns only Xwayland, whereas wayland itself is accelerated ?

Yep. Check which ioctls fail then try to reproduce outside of Mesa or
hardcode the result. Overriding PCI ID via INTEL_DEVID_OVERRIDE is
unlikely to help e.g.,

https://lists.freebsd.org/pipermail/freebsd-x11/2019-January/022551.html

If you still have no clue try playing with sysctls under compat.linuxkpi
via /boot/loader.conf.



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