Bug 32864 - wayland "libEGL warning: failed to create DRM screen"
Summary: wayland "libEGL warning: failed to create DRM screen"
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 17:25 UTC by Darxus
Modified: 2011-01-08 16:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
wayland compositor strace output, failing, commit 6d9ca78ef7bf831b9b63f4bda68623cbae627508 (latest) (70.14 KB, text/plain)
2011-01-06 20:22 UTC, Darxus
no flags Details
Output of "wayland/compositor/compositor > ld_debug.all.txt 2>&1" with LD_DEBUG=all, for mesa commit 90e29afcb62411b69d57dac76fe89c69c9936ed6 (336.33 KB, application/x-gzip)
2011-01-08 13:17 UTC, Darxus
no flags Details

Description Darxus 2011-01-05 17:25:58 UTC
Running the wayland compositor used to give output including:

libEGL debug: searching for pipe module nouveau
libEGL debug: loaded /home/darxus/install/lib/egl/pipe_nouveau.so

But now instead of saying it loaded pipe_nouveau.so, it says:

libEGL warning: failed to create DRM screen

Git commit 6a102074bb30e44273e999ee8cdd2afbfbc4e333 works (last before problem).
Git commit 997f84ff4efb62779a19f6bd0441cbae1b7bad70 has this problem.

I tried adding a bunch of prints to nouveau_drm_screen_create() in src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c, none of them printed.
Comment 1 Darxus 2011-01-05 17:30:57 UTC
From git://anongit.freedesktop.org/mesa/mesa
Comment 2 Darxus 2011-01-05 17:37:47 UTC
$ lspci | grep -i vga
01:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 9300 GE] (rev a1)

Someone else replicated the problem with a nv94 card.
Comment 3 wucan 2011-01-05 20:12:23 UTC
(In reply to comment #2)
> $ lspci | grep -i vga
> 01:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 9300 GE]
> (rev a1)
> 
> Someone else replicated the problem with a nv94 card.

reproduct and confirm this problem with:
01:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 9300M GS] (rev a1)
Comment 4 wucan 2011-01-06 00:16:24 UTC
I found, it's in src/gallium/target/egl/egl.c failed to dlopen("pipe_nouveaus.so", ...).

Who know why dlopen() failed? Since all so files are there.
Comment 5 Darxus 2011-01-06 00:33:53 UTC
Looks like this was fixed in:

commit 84ebd8e2d7b13cf43069a2b79168cf7a1df02b71
Author: Vinson Lee <vlee@vmware.com>
Date:   Thu Jan 6 00:06:38 2011 -0800

    nvc0: Fix typo of nvc0_mm.c in SConscript.
Comment 6 Darxus 2011-01-06 20:21:11 UTC
I no-longer believe this is fixed.  84ebd8e2d7b13cf43069a2b79168cf7a1df02b71 is giving me the same "failed to create DRM screen" error as I had been getting.  Don't know why I thought it was fixed.

6a102074bb30e44273e999ee8cdd2afbfbc4e333 still works.
997f84ff4efb62779a19f6bd0441cbae1b7bad70 still doesn't work.

This (and my previous report of it working) is on a different card:

$ lspci | grep -i vga
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GT] (rev a2)

(The latest commit is also not working: 6d9ca78ef7bf831b9b63f4bda68623cbae627508 )

Also, strace shows pipe_nouveau.so being opened, it just doesn't get mentioned in the output.

Full output:

$ ~/wayland/wayland/compositor/compositor 
libEGL debug: EGL search path is /home/darxus/install/lib/egl
libEGL debug: added /home/darxus/install/lib/egl/egl_gallium.so to module array
libEGL debug: added /home/darxus/install/lib/egl/egl_dri2.so to module array
libEGL debug: added /home/darxus/install/lib/egl/egl_glx.so to module array
libEGL debug: dlopen(/home/darxus/install/lib/egl/egl_gallium.so)
libEGL info: use DRM for display 0x5
libEGL debug: searching for pipe module nouveau
libEGL warning: failed to create DRM screen
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize(no usable display)

libEGL debug: dlopen(/home/darxus/install/lib/egl/egl_dri2.so)
libEGL debug: EGL user error 0x3003 (EGL_BAD_ALLOC) in DRI2: failed to get driver name

libEGL debug: dlopen(/home/darxus/install/lib/egl/egl_glx.so)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize

failed to initialize display
failed to create compositor
Comment 7 Darxus 2011-01-06 20:22:14 UTC
Created attachment 41737 [details]
wayland compositor strace output, failing, commit 6d9ca78ef7bf831b9b63f4bda68623cbae627508 (latest)
Comment 8 Marcin Slusarz 2011-01-08 11:49:55 UTC
if it's still a linking problem running wayland with LD_DEBUG set to "all" might help find the root cause
Comment 9 Darxus 2011-01-08 12:52:11 UTC
The wayland compositor is now starting, but shows up as a completely garbled apparently random chunk of video memory.  

Output:


$ ~/wayland/wayland/compositor/compositor 
libEGL debug: added /usr/lib/egl/egl_gallium.so to module array
libEGL debug: added /usr/lib/egl/egl_dri2.so to module array
libEGL debug: added /usr/lib/egl/egl_glx.so to module array
libEGL debug: dlopen(/usr/lib/egl/egl_gallium.so)
libEGL info: use DRM for display 0x5
libEGL debug: searching for pipe module nouveau
libEGL debug: loaded /usr/lib/egl/pipe_nouveau.so
libEGL debug: Failed to get KMS resources.  Disable modeset.
libEGL debug: the best driver is Gallium (score 100)
libEGL debug: searching for st module GLESv2
libEGL debug: loaded /usr/lib/egl/st_GLESv2.so
nv50_screen_get_param:162 -  Unknown PIPE_CAP 11
XDG_RUNTIME_DIR not set, falling back to .
using socket ./wayland-0
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glClear(incomplete framebuffer)

Mesa git commit: 6a102074bb30e44273e999ee8cdd2afbfbc4e333
Comment 10 Darxus 2011-01-08 12:57:36 UTC
Ignore my last comment, it shows I was loading all the wrong libraries, instead of from ~/install/
Comment 11 Darxus 2011-01-08 13:17:04 UTC
Created attachment 41777 [details]
Output of "wayland/compositor/compositor > ld_debug.all.txt 2>&1" with LD_DEBUG=all, for mesa commit 90e29afcb62411b69d57dac76fe89c69c9936ed6
Comment 12 Marcin Slusarz 2011-01-08 14:32:23 UTC
/home/darxus/install/lib/egl/pipe_nouveau.so: error: symbol lookup error: undefined symbol: nvc0_screen_create (fatal)

These commands should fix it:

make distclean
./autogen.sh
./configure ...
make
Comment 13 Darxus 2011-01-08 15:03:14 UTC
Wiped my entire build and install directories, recloned and built everything, same error.

Still getting:

     31798:	/home/darxus/install/lib/egl/pipe_nouveau.so: error: symbol lookup error: undefined symbol: nvc0_screen_create (fatal)
Comment 14 Marcin Slusarz 2011-01-08 15:55:14 UTC
fixed by commit 69191d41231b95af7565e32393c5487163859d7e "targets/egl: add libnvc0.a to nouveau libs"
Comment 15 Darxus 2011-01-08 16:06:08 UTC
Confirmed, works with commit 69191d41231b95af7565e32393c5487163859d7e


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.