X server gbm: failed to open any driver

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

X server gbm: failed to open any driver

Denis Lapshin-2
When X server starts on OpenBSD6.4amd64 I'm getting the message below

...
(II) [KMS] Kernel modesetting enabled.
gbm: failed to open any driver (search paths /usr/X11R6/lib/modules/dri)
gbm: Last dlopen error: File not found
failed to load driver: redeonsi
EGL_MESA_drm_image required.
spectrwm: Welcome to spectrwm ...

Can it be fixed?

Reply | Threaded
Open this post in threaded view
|

Re: X server gbm: failed to open any driver

Jonathan Gray-11
On Mon, Dec 03, 2018 at 08:06:18PM +0300, Denis wrote:

> When X server starts on OpenBSD6.4amd64 I'm getting the message below
>
> ...
> (II) [KMS] Kernel modesetting enabled.
> gbm: failed to open any driver (search paths /usr/X11R6/lib/modules/dri)
> gbm: Last dlopen error: File not found
> failed to load driver: redeonsi
> EGL_MESA_drm_image required.
> spectrwm: Welcome to spectrwm ...
>
> Can it be fixed?
>

As the radeonsi Mesa driver depends on libLLVM and libelf it can not
currently be included in the xenocara sets.

With -current using Mesa 17.3.9 in xenocara and LLVM 6.0 from ports it
is possible to build it yourself.

Install libelf and llvm packages, apply the below patch and then build
xenocara.

Index: lib/mesa/Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/xenocara/lib/mesa/Makefile.bsd-wrapper,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile.bsd-wrapper
--- lib/mesa/Makefile.bsd-wrapper 23 Oct 2018 06:35:32 -0000 1.21
+++ lib/mesa/Makefile.bsd-wrapper 4 Dec 2018 02:44:28 -0000
@@ -11,7 +11,7 @@ GALLIUM_DRIVERS= swrast
 
 .if ${MACHINE} == i386 || ${MACHINE} == amd64
 DRI_DRIVERS=swrast,radeon,r200,i915,i965
-GALLIUM_DRIVERS=swrast,r300,r600
+GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
 .endif
 
 .if ${MACHINE} == arm64 || ${MACHINE} == loongson || \
@@ -23,7 +23,8 @@ GALLIUM_DRIVERS=swrast,r300,r600
 CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
  --with-gallium-drivers=${GALLIUM_DRIVERS} \
  --disable-silent-rules \
- --disable-llvm \
+ --enable-llvm \
+ --with-llvm-prefix=/usr/local \
  --disable-glx-tls \
  --disable-regen-sources \
  --enable-gles1 --enable-gles2 \
@@ -70,6 +71,25 @@ O2= ${O1} -fthread-jumps -fcrossjumping
 
 CONFIGURE_ARGS+=       USER_CFLAGS="-O0 ${O2}"
 .endif
+
+PKGCONFIG_LIBDIR= /usr/lib/pkgconfig:${X11BASE}/lib/pkgconfig:/usr/local/lib/pkgconfig
+
+XENOCARA_PATH= /bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+config.status:
+ PKG_CONFIG_LIBDIR="${PKGCONFIG_LIBDIR}" \
+ CONFIG_SITE=$(CONFIG_SITE) \
+ CC=${CC} \
+ CFLAGS="${CFLAGS}" \
+ CXX=${CXX} \
+ CXXFLAGS="${CXXFLAGS}" \
+ AR_FLAGS="cruD" \
+ MAKE="${MAKE}" \
+ PATH=$(XENOCARA_PATH) \
+ sh ${_SRCDIR}/configure --prefix=${X11BASE} \
+ --sysconfdir=/etc \
+ --mandir=${X11BASE}/man \
+ ${CONFIGURE_ARGS}
 
 ${.OBJDIR}/src/util/format_srgb.c:
  lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}

Reply | Threaded
Open this post in threaded view
|

Re: X server gbm: failed to open any driver

Denis Lapshin-2
I've just rebuilt Xenocara from -current with bsd-wrapper patch implemented.

Getting the error when run startx:
...
(==) Using system config derectory "/usr/X11R6/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
        at http://wiki.x.org
for help.
(EE) Please also check the log file at
"/home/deniza/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connecto to X server: Connection refused
xinit: server error

On 12/4/2018 6:08 AM, Jonathan Gray wrote:

> On Mon, Dec 03, 2018 at 08:06:18PM +0300, Denis wrote:
>> When X server starts on OpenBSD6.4amd64 I'm getting the message below
>>
>> ...
>> (II) [KMS] Kernel modesetting enabled.
>> gbm: failed to open any driver (search paths /usr/X11R6/lib/modules/dri)
>> gbm: Last dlopen error: File not found
>> failed to load driver: redeonsi
>> EGL_MESA_drm_image required.
>> spectrwm: Welcome to spectrwm ...
>>
>> Can it be fixed?
>>
>
> As the radeonsi Mesa driver depends on libLLVM and libelf it can not
> currently be included in the xenocara sets.
>
> With -current using Mesa 17.3.9 in xenocara and LLVM 6.0 from ports it
> is possible to build it yourself.
>
> Install libelf and llvm packages, apply the below patch and then build
> xenocara.
>
> Index: lib/mesa/Makefile.bsd-wrapper
> ===================================================================
> RCS file: /cvs/xenocara/lib/mesa/Makefile.bsd-wrapper,v
> retrieving revision 1.21
> diff -u -p -r1.21 Makefile.bsd-wrapper
> --- lib/mesa/Makefile.bsd-wrapper 23 Oct 2018 06:35:32 -0000 1.21
> +++ lib/mesa/Makefile.bsd-wrapper 4 Dec 2018 02:44:28 -0000
> @@ -11,7 +11,7 @@ GALLIUM_DRIVERS= swrast
>  
>  .if ${MACHINE} == i386 || ${MACHINE} == amd64
>  DRI_DRIVERS=swrast,radeon,r200,i915,i965
> -GALLIUM_DRIVERS=swrast,r300,r600
> +GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
>  .endif
>  
>  .if ${MACHINE} == arm64 || ${MACHINE} == loongson || \
> @@ -23,7 +23,8 @@ GALLIUM_DRIVERS=swrast,r300,r600
>  CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
>   --with-gallium-drivers=${GALLIUM_DRIVERS} \
>   --disable-silent-rules \
> - --disable-llvm \
> + --enable-llvm \
> + --with-llvm-prefix=/usr/local \
>   --disable-glx-tls \
>   --disable-regen-sources \
>   --enable-gles1 --enable-gles2 \
> @@ -70,6 +71,25 @@ O2= ${O1} -fthread-jumps -fcrossjumping
>  
>  CONFIGURE_ARGS+=       USER_CFLAGS="-O0 ${O2}"
>  .endif
> +
> +PKGCONFIG_LIBDIR= /usr/lib/pkgconfig:${X11BASE}/lib/pkgconfig:/usr/local/lib/pkgconfig
> +
> +XENOCARA_PATH= /bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
> +
> +config.status:
> + PKG_CONFIG_LIBDIR="${PKGCONFIG_LIBDIR}" \
> + CONFIG_SITE=$(CONFIG_SITE) \
> + CC=${CC} \
> + CFLAGS="${CFLAGS}" \
> + CXX=${CXX} \
> + CXXFLAGS="${CXXFLAGS}" \
> + AR_FLAGS="cruD" \
> + MAKE="${MAKE}" \
> + PATH=$(XENOCARA_PATH) \
> + sh ${_SRCDIR}/configure --prefix=${X11BASE} \
> + --sysconfdir=/etc \
> + --mandir=${X11BASE}/man \
> + ${CONFIGURE_ARGS}
>  
>  ${.OBJDIR}/src/util/format_srgb.c:
>   lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}
>

Reply | Threaded
Open this post in threaded view
|

Re: X server gbm: failed to open any driver

Denis Lapshin-2
In reply to this post by Denis Lapshin-2
I started startx from local user previously...

Found that from

"2018/10/26 - setuid bit removed from /usr/X11R6/bin/Xorg
The Xorg binary is no longer installed setuid. So startx(1) can no
longer be used by non-root users. The xenodm(1) display manager has to
be used."

Is possible to run Xorg by startx as user since than?
Why setuid has been removed from Xorg?

On 12/3/2018 8:06 PM, Denis wrote:

> When X server starts on OpenBSD6.4amd64 I'm getting the message below
>
> ..
> (II) [KMS] Kernel modesetting enabled.
> gbm: failed to open any driver (search paths /usr/X11R6/lib/modules/dri)
> gbm: Last dlopen error: File not found
> failed to load driver: redeonsi
> EGL_MESA_drm_image required.
> spectrwm: Welcome to spectrwm ...
>
> Can it be fixed?
>

Reply | Threaded
Open this post in threaded view
|

Re: X server gbm: failed to open any driver

Denis Lapshin-2
In reply to this post by Denis Lapshin-2
It seems a bug in xlock program also.

When exit from xlock getting this:

...
/usr/X11R6/bin/xlock
(EE) Segmentation fault at address 0xac986a95000
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
...

On 12/5/2018 8:05 PM, Denis wrote:

> I've just rebuilt Xenocara from -current with bsd-wrapper patch implemented.
>
> Getting the error when run startx:
> ..
> (==) Using system config derectory "/usr/X11R6/share/X11/xorg.conf.d"
> (EE)
> Fatal server error:
> (EE) no screens found(EE)
> (EE)
> Please consult the The X.Org Foundation support
> at http://wiki.x.org
> for help.
> (EE) Please also check the log file at
> "/home/deniza/.local/share/xorg/Xorg.0.log" for additional information.
> (EE)
> (EE) Server terminated with error (1). Closing log file.
> xinit: giving up
> xinit: unable to connecto to X server: Connection refused
> xinit: server error
>
> On 12/4/2018 6:08 AM, Jonathan Gray wrote:
>> On Mon, Dec 03, 2018 at 08:06:18PM +0300, Denis wrote:
>>> When X server starts on OpenBSD6.4amd64 I'm getting the message below
>>>
>>> ...
>>> (II) [KMS] Kernel modesetting enabled.
>>> gbm: failed to open any driver (search paths /usr/X11R6/lib/modules/dri)
>>> gbm: Last dlopen error: File not found
>>> failed to load driver: redeonsi
>>> EGL_MESA_drm_image required.
>>> spectrwm: Welcome to spectrwm ...
>>>
>>> Can it be fixed?
>>>
>>
>> As the radeonsi Mesa driver depends on libLLVM and libelf it can not
>> currently be included in the xenocara sets.
>>
>> With -current using Mesa 17.3.9 in xenocara and LLVM 6.0 from ports it
>> is possible to build it yourself.
>>
>> Install libelf and llvm packages, apply the below patch and then build
>> xenocara.
>>
>> Index: lib/mesa/Makefile.bsd-wrapper
>> ===================================================================
>> RCS file: /cvs/xenocara/lib/mesa/Makefile.bsd-wrapper,v
>> retrieving revision 1.21
>> diff -u -p -r1.21 Makefile.bsd-wrapper
>> --- lib/mesa/Makefile.bsd-wrapper 23 Oct 2018 06:35:32 -0000 1.21
>> +++ lib/mesa/Makefile.bsd-wrapper 4 Dec 2018 02:44:28 -0000
>> @@ -11,7 +11,7 @@ GALLIUM_DRIVERS= swrast
>>  
>>  .if ${MACHINE} == i386 || ${MACHINE} == amd64
>>  DRI_DRIVERS=swrast,radeon,r200,i915,i965
>> -GALLIUM_DRIVERS=swrast,r300,r600
>> +GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
>>  .endif
>>  
>>  .if ${MACHINE} == arm64 || ${MACHINE} == loongson || \
>> @@ -23,7 +23,8 @@ GALLIUM_DRIVERS=swrast,r300,r600
>>  CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
>>   --with-gallium-drivers=${GALLIUM_DRIVERS} \
>>   --disable-silent-rules \
>> - --disable-llvm \
>> + --enable-llvm \
>> + --with-llvm-prefix=/usr/local \
>>   --disable-glx-tls \
>>   --disable-regen-sources \
>>   --enable-gles1 --enable-gles2 \
>> @@ -70,6 +71,25 @@ O2= ${O1} -fthread-jumps -fcrossjumping
>>  
>>  CONFIGURE_ARGS+=       USER_CFLAGS="-O0 ${O2}"
>>  .endif
>> +
>> +PKGCONFIG_LIBDIR= /usr/lib/pkgconfig:${X11BASE}/lib/pkgconfig:/usr/local/lib/pkgconfig
>> +
>> +XENOCARA_PATH= /bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
>> +
>> +config.status:
>> + PKG_CONFIG_LIBDIR="${PKGCONFIG_LIBDIR}" \
>> + CONFIG_SITE=$(CONFIG_SITE) \
>> + CC=${CC} \
>> + CFLAGS="${CFLAGS}" \
>> + CXX=${CXX} \
>> + CXXFLAGS="${CXXFLAGS}" \
>> + AR_FLAGS="cruD" \
>> + MAKE="${MAKE}" \
>> + PATH=$(XENOCARA_PATH) \
>> + sh ${_SRCDIR}/configure --prefix=${X11BASE} \
>> + --sysconfdir=/etc \
>> + --mandir=${X11BASE}/man \
>> + ${CONFIGURE_ARGS}
>>  
>>  ${.OBJDIR}/src/util/format_srgb.c:
>>   lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}
>>
>