Git Product home page Git Product logo

egl-wayland's Introduction

Wayland EGL External Platform library

Overview

This is a work-in-progress implementation of a EGL External Platform library to add client-side Wayland support to EGL on top of EGLDevice and EGLStream families of extensions.

This library implements an EGL External Platform interface to work along with EGL drivers that support the external platform mechanism. More information about EGL External platforms and the interface can be found at:

https://github.com/NVIDIA/eglexternalplatform

Building and Installing the library

This library build-depends on:

  • EGL headers

    https://www.khronos.org/registry/EGL/
    
  • Wayland libraries & protocols

    https://wayland.freedesktop.org/
    
  • EGL External Platform interface

    https://github.com/NVIDIA/eglexternalplatform
    

To build, run:

./autogen.sh
make

To install, run:

make install

You can also use meson build system to build and install:

meson builddir
cd builddir
ninja
ninja install

Notes:

The NVIDIA EGL driver uses a JSON-based loader to load all EGL External platforms available on the system.

If this library is not installed as part of a NVIDIA driver installation, a JSON configuration file must be manually added in order to make the library work with the NVIDIA driver.

The default EGL External platform JSON configuration directory is:

/usr/share/egl/egl_external_platform.d/

Acknowledgements

Thanks to James Jones for the original implementation of the Wayland EGL platform.

Wayland EGL External platform library

The Wayland EGL External platform library itself is licensed as follows:

Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

buildconf

The Wayland EGL External platform library uses the buildconf autotools bootstrapping script 'autogen.sh':

http://freecode.com/projects/buildconf

This script carries the following copyright notice:

Copyright (c) 2005-2009 United States Government as represented by
the U.S. Army Research Laboratory.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

egl-wayland's People

Contributors

adamant-pwn avatar amshafer avatar cubanismo avatar dkorkmazturk avatar fafryd1125 avatar kbrenneman avatar kepstin avatar kontrabant avatar kraj avatar leigh123linux avatar lyude avatar maniraj87 avatar molytho avatar q234rty avatar sulix avatar szihs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

egl-wayland's Issues

'WARNING: CPU' when weston-eglstream is running

Description:

The first case:
WARNING: CPU when weston-eglstream is running

Second case:
weston-eglstream freezes system and causes artifacts on the screen

Steps to reproduce:

  1. boot in runlevel 5 and switch to tty2
  2. weston-launch -- --use-egldevice
  3. run weston terminal and type dmesg

Second case:

  1. boot in runlevel 3
  2. weston-launch -- --use-egldevice
  3. system freeze (only a hard reset helps)

Additional info:

$ inxi -GS
Resuming in non X mode: xrandr not found. For package install advice run: inxi --recommends
System:    Host: pasazer Kernel: 4.12.8-2-ARCH x86_64 (64 bit) Desktop: N/A Distro: Arch Linux
Graphics:  Card: NVIDIA GF116 [GeForce GTX 550 Ti]
           Display Server: N/A driver: nvidia tty size: 110x32

eglinfo

[43771.505517] ------------[ cut here ]------------
[43771.505523] WARNING: CPU: 1 PID: 17321 at drivers/gpu/drm/drm_atomic_helper.c:1612 drm_atomic_helper_commit_hw_done+0x97/0xa0 [drm_kms_helper]
[43771.505536] Modules linked in: uas usb_storage overlay cfg80211 rfkill nls_iso8859_1 nvidia_drm(PO) nvidia_modeset(PO) nls_cp437 nvidia(PO) vfat fat intel_rapl x86_pkg_temp_thermal intel_powerclamp cor
[43771.505567]  snd_hda_codec_generic mac_hid pcspkr snd_soc_ssm4567 intel_cstate intel_rapl_perf snd_soc_rt5640 snd_soc_rl6231 snd_soc_core i2c_hid snd_compress snd_pcm_dmaengine ac97_bus xt_limit xt_tcp
[43771.505589]  hid_generic usbhid hid sr_mod cdrom sd_mod serio_raw atkbd libps2 ahci libahci libata xhci_pci ehci_pci scsi_mod xhci_hcd ehci_hcd usbcore usb_common i8042 serio sdhci_acpi sdhci led_class
[43771.505601] CPU: 1 PID: 17321 Comm: kworker/u8:2 Tainted: P        W  O    4.12.8-2-ARCH #1
[43771.505602] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z97 Pro4, BIOS P2.50 05/27/2016
[43771.505604] Workqueue: events_unbound commit_work [drm_kms_helper]
[43771.505605] task: ffff954ac8070e40 task.stack: ffffad54c3c1c000
[43771.505607] RIP: 0010:drm_atomic_helper_commit_hw_done+0x97/0xa0 [drm_kms_helper]
[43771.505608] RSP: 0018:ffffad54c3c1fdb8 EFLAGS: 00010286
[43771.505609] RAX: ffff954aaff90000 RBX: 0000000000000002 RCX: ffff954c4ccd2000
[43771.505609] RDX: ffff954afe0ff380 RSI: ffff954c4871be48 RDI: ffff954c48528808
[43771.505610] RBP: ffffad54c3c1fdd8 R08: ffff954c5ec90470 R09: 0000000000000000
[43771.505610] R10: ffffad54c3c1fd88 R11: 000000000000024d R12: 0000000000000000
[43771.505611] R13: ffff954c4871be40 R14: ffff954c1c63d408 R15: ffff954c48528808
[43771.505611] FS:  0000000000000000(0000) GS:ffff954c5ec80000(0000) knlGS:0000000000000000
[43771.505612] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[43771.505613] CR2: 000055e70fb709e0 CR3: 000000011ba09000 CR4: 00000000001406e0
[43771.505613] Call Trace:
[43771.505616]  nvidia_drm_atomic_helper_commit_tail+0x131/0x1a0 [nvidia_drm]
[43771.505619]  commit_tail+0x3f/0x70 [drm_kms_helper]
[43771.505620]  commit_work+0x12/0x20 [drm_kms_helper]
[43771.505622]  process_one_work+0x1de/0x430
[43771.505623]  worker_thread+0x47/0x3f0
[43771.505625]  kthread+0x125/0x140
[43771.505625]  ? process_one_work+0x430/0x430
[43771.505627]  ? kthread_create_on_node+0x70/0x70
[43771.505629]  ret_from_fork+0x25/0x30
[43771.505630] Code: 49 8d 7d 30 e8 bb 6c 73 f7 48 89 df e8 33 f5 cc f7 49 8b 4e 08 41 83 c4 01 44 39 a1 40 03 00 00 7f 9a 5b 41 5c 41 5d 41 5e 5d c3 <0f> ff eb c2 f3 c3 0f 1f 00 0f 1f 44 00 00 48 8b 4f 0
[43771.505646] ---[ end trace 411edfbf3150c4ba ]---

package versions:

weston-eglstream 3.0.0-1
[*] nvidia-drivers 384.69-1
[*] egl-wayland-git r14.1f4b1fd-1
[*] eglexternalplatform-git r2.76e2948-1
[*] libglvnd-git r538.3ed1275-1
[*] mesa-demos-git 8.3.0.r37.g66136b95-1
wayland 1.14.0-1
wayland-protocols 1.10-1

[*] locally installed https://github.com/fafryd1125/PKGBUILDs

nvidia-bug-report.log.gz

Certain Wayland apps/games fail with EGL_BAD_ALLOC

Hello,

I've initially been trying to figure out why running Minecraft with Wayland on my NVIDIA GPU didn't work, and it led to this issue being made

So certain Wayland apps/games (I tested Alacritty, osu!lazer and of course Minecraft) don't start when run on the NVIDIA GPU with PRIME

In GNOME/mutter, this error is shown: “failed to import supplied dmabufs: EGL failed to allocate resources for the requested operation.”
And in sway: ‘importing the supplied dmabufs failed" (sway gives a EGL_BAD_ALLOC error for eglCreatelmageKHR in its logs which is probably the same error mutter is returning) (also sway points to the dri2_create_image_khr_texture function inside Mesa: The relevant function)

What's weird is that SuperTuxKart and Xonotic work and they definitely use Wayland

Running the apps listed above with XWayland (using WINIT_UNIX_BACKEND=x11 and SDL_VIDEODRIVER=x11; Minecraft is special because of GLFW) makes them work on the NVIDIA GPU

I'm not sure what logs/traces to give, so I'll just attach a Wayland debug log of Alacritty with both AMD and NVIDIA GPU being used:
alacrittywlamd.log
alacrittywlnv.log

And now time for the all important system info 🐸:
Distro: Arch Linux
egl-wayland version: 1.1.11 (1.1.10 also fails)
Mesa version: 22.1.7 (trying the Git version also fails)
Driver version: 515.76
Kernel version: 5.19.11
Compositor: mutter 42.5/sway 1.7 (with wlroots 0.15.1)
CPU: Ryzen 5 4600H
GPU: Renoir iGPU + GTX 1650 Ti Mobile (as I said a PRIME setup)

EGLWayland F30/19.04 lockup on app launch

So I gave eglstreams/eglwayland a spin on gnome 3.32 and got the strangest behaviour.

Setup:
This occurred using 418 and 430 on both f30 and u19.04.
Both ship with some version of kernel 5.0.
I am using a P4000 but also have 5 Radeon Pro Duo around for rocm.
This does not happen on X.

If I launch an app after the desktop loads there is about 10-15 second of the mouse not moving and the app not loading. The display still seems to be okay as I can see the mouse pinwheeling, but I can't move the mouse and the UI does not respond to keyboard keys. After the hang completes, everything returns to normal and I can happily use the app.

Gome-shell itself is very fluent and does not seem to load slower than expected.

I'm currently on F30 with 418 and can provide whatever logs might be helpful, but I'm not sure where to start.

Chromium Segmentation fault in libnvidia-egl-wayland.so.1 with use_system_libwayland

When using recent Chromium with NVIDIA and wayland, with the GN build option use_system_libwayland (that is intended to use the system available libwayland library instead of build the local copy available in third_party/wayland in chromium tree), Chromium crashes because of the check in wlEglCheckInterfaceType reported in #28.

But the fix for #28 is not enough. And I am afraid that check is wrong for cases like Chromium's, where it provides a wrapper of wayland symbols with hidden visibility, to be able to dynamically load system wayland library when available. It fails because dladdr in that case will return null dli_saddr and dli_sname. Because of that, I think the check should be just removed, as dladdr is not going to be reliable for that purpose.

Could we just get rid of that check? That's going to make upstream Chromium official future wayland support fail when used with NVIDIA drivers.

❯ WAYLAND_DISPLAY="wayland-0" retroarch retroarch: symbol lookup error: /usr/lib/libnvidia-vulkan-producer.so: undefined symbol: wlEglInitializeSurfaceExport

Linux 5.18.5-hardened1-2-hardened #1 SMP PREEMPT_DYNAMIC Mon, 20 Jun 2022 04:26:51 +0000 x86_64 GNU/Linux
❯ pacman -Q 
lib32-nvidia-cg-toolkit 3.1-8
lib32-nvidia-utils 515.48.07-1
lib32-opencl-nvidia 515.48.07-1
libnvidia-container 1.9.0-1
libnvidia-container-tools 1.9.0-1
nvidia-cg-toolkit 3.1-6
nvidia-container-runtime 3.9.0-1
nvidia-container-toolkit 1.9.0-1
nvidia-dkms 515.48.07-2
nvidia-force-comp-pipeline 1.0-1
nvidia-settings 515.48.07-1
nvidia-utils 515.48.07-2
nvidia-vaapi-driver-git 0.0.6.r4.g9270ce6-1
opencl-nvidia 515.48.07-2
egl-wayland-git 1.1.10.r0.g247335d-1
eglexternalplatform-git 1.1.r0.g7c8f8e2-1
ffmpeg-vulkan 2:5.0-2
lib32-vulkan-icd-loader 1.3.217-1
lib32-vulkan-intel 22.1.2-1
lib32-vulkan-mesa-layers 22.1.2-1
vulkan-caps-viewer-wayland 1:3.22-1
vulkan-extra-layers 1.3.216.0-1
vulkan-headers 1:1.3.217-1
vulkan-icd-loader 1.3.217-1
vulkan-intel 22.1.2-1
vulkan-mesa-layers 22.1.2-1
vulkan-swrast 22.1.2-1
vulkan-tools 1.3.217-1
vulkan-validation-layers 1.3.216.0-1
lib32-vkd3d 1.3-1
vkd3d 1.3-1
❯ WAYLAND_DISPLAY="wayland-0" retroarch retroarch: symbol lookup error: /usr/lib/libnvidia-vulkan-producer.so: undefined symbol: wlEglInitializeSurfaceExport

egl-wayland 1.1.9 or later must be present, nvidia-drivers 495.29.05

GBM documentation of the latest nvidia 495.29.05 beta driver http://us.download.nvidia.com/XFree86/Linux-x86_64/495.29.05/README/gbm.html mentions:

  • egl-wayland version 1.1.8 or later must be present (if installed separately from the the NVIDIA driver). To support applications that use the wl_drm Wayland protocol to select a GPU to render on, such as Xwayland, version 1.1.9 or later must be present.

Yet the last commit in this repository is ce4c963 and I also can't see any braches other than master, so where's the code and where can 1.1.9 be obtained from?

How to actually use this library

I have installed nvidia driver and all wayland egl related libraries, and run ubuntu 20.10 on wayland successfully on nvidia driver 455.

But my wayland egl client program still loads mesa driver. I have both 10_nvidia.json and 50_mesa.json in my /usr/share/glvnd/egl_vendor.d directory. And I have /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json and related .so file.

If I remove 50_mesa.json or specify env var: export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json,
then eglGetDisplay() returns NULL.

My example program source is at
https://github.com/xuzhongxing/tutorials/blob/master/wayland-egl.c

Attached is strace output of the test program. I can see it actually opens /lib/x86_64-linux-gnu/libnvidia-egl-wayland.so.1.
nv.log

tags missing

Hi, you don't have tags for 1.0.4, 1.0.5 or 1.1.0. At least the latest should have one.

1.1.10: missing libdrm build dependency

Looks like there is missing check for libdrm in meson

+ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu
The Meson build system
Version: 0.62.2
Source dir: /home/tkloczko/rpmbuild/BUILD/egl-wayland-1.1.10
Build dir: /home/tkloczko/rpmbuild/BUILD/egl-wayland-1.1.10/x86_64-redhat-linux-gnu
Build type: native build
Project name: wayland-eglstream
Project version: 1.1.10
C compiler for the host machine: /usr/bin/gcc (gcc 12.1.1 "gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)")
C linker for the host machine: /usr/bin/gcc ld.bfd 2.38-14
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency eglexternalplatform found: YES 1.1
Run-time dependency wayland-server found: YES 1.20.0
Run-time dependency wayland-client found: YES 1.20.0
Run-time dependency wayland-egl-backend found: YES 3
Run-time dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Build-time dependency wayland-scanner found: YES 1.20.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Configuring wayland-eglstream.pc using configuration
Configuring wayland-eglstream-protocols.pc using configuration
src/meson.build:1: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
src/meson.build:2: WARNING: Consider using the built-in werror option instead of using "-Werror".
Compiler for C supports arguments -Wpedantic: YES
Run-time dependency wayland-protocols found: YES 1.25
Build targets in project: 10
NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'}

wayland-eglstream 1.1.10

  User defined options
    auto_features : enabled
    bindir        : /usr/bin
    buildtype     : plain
    datadir       : /usr/share
    includedir    : /usr/include
    infodir       : /usr/share/info
    libdir        : /usr/lib64
    libexecdir    : /usr/libexec
    localedir     : /usr/share/locale
    localstatedir : /var
    mandir        : /usr/share/man
    prefix        : /usr
    sbindir       : /usr/sbin
    sharedstatedir: /var/lib
    sysconfdir    : /etc
    wrap_mode     : nodownload

Found ninja-1.10.2 at /usr/bin/ninja
+ /usr/bin/meson compile -C x86_64-redhat-linux-gnu -j 48 --verbose
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/egl-wayland-1.1.10/x86_64-redhat-linux-gnu'
[1/26] /usr/bin/wayland-scanner client-header ../wayland-eglstream/wayland-eglstream.xml wayland-eglstream/wayland-eglstream-client-protocol.h
[2/26] /usr/bin/wayland-scanner server-header ../wayland-eglstream/wayland-eglstream.xml wayland-eglstream/wayland-eglstream-server-protocol.h
[3/26] /usr/bin/wayland-scanner private-code ../wayland-eglstream/wayland-eglstream.xml wayland-eglstream/wayland-eglstream-protocol.c

[..]

FAILED: src/libnvidia-egl-wayland.so.1.1.10.p/wayland-eglsurface.c.o
/usr/bin/gcc -Isrc/libnvidia-egl-wayland.so.1.1.10.p -Isrc -I../src -I../include -I../wayland-egl -Iwayland-eglstream -Iwayland-drm -I/usr/include/EGL -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -Wall -Werror -fvisibility=hidden -DWL_HIDE_DEPRECATED -Wno-pedantic -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -pthread -MD -MQ src/libnvidia-egl-wayland.so.1.1.10.p/wayland-eglsurface.c.o -MF src/libnvidia-egl-wayland.so.1.1.10.p/wayland-eglsurface.c.o.d -o src/libnvidia-egl-wayland.so.1.1.10.p/wayland-eglsurface.c.o -c ../src/wayland-eglsurface.c
../src/wayland-eglsurface.c:43:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
   43 | #include <libdrm/drm_fourcc.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

[Suggestion] Releases on github?

Would it be possible to use releases on: https://github.com/NVIDIA/egl-wayland/releases ?

It's not really a big deal as people can just use git clone, or download the .zip, as-is. But I
kind of like having stable entry points to archives I can just easily wget from the commandline
or use in scripts. It's possible via git clone too, of course, but for some reason I prefer
entry points in releases.

I understand that egl-wayland may not yet be mega-stable, but perhaps in the future
there comes a point where you guys feel that this now meets a desired quality
standard, and then releases could be made on github as well, aside from git clone.

Either way this is just a suggestion - please feel free to close it for any reason at
any moment in time.

Incomplete resizes with ≥1.1.10

Greetings,
I've recently updated to egl-wayland 1.1.10 and I noticed that several applications do not resize properly in a Wayland session. Specifically part of the window is disappearing while actively resizing and it is only fully shown when the resize operation is finished. The examples below are for gnome-weather (GTK 4) but that also happens with QtQuick/Qt5 based applications (wayland backend) and also other applications like alacritty. Please note that in the second example the window is not actually black, this is probably an artifact of the screencap. The contents are still visible although not rearranged until after resizing finished. Latest build from git also exhibits the issue and occasionally the application segfaults outright. Perhaps unsurprisingly the first commit that exhibits the issue is ddaa2720. The issue is not specific to mutter as it can be replicated under KWin+Wayland.

My current system configuration
Distribution: Arch Linux
NVIDIA Driver version: 515.48.07
Kernel version: 5.18.5
GPU: NVIDIA 3070

egl-wayland_1_1_9.mp4
egl-wayland_1_1_10.mp4

cannot draw to different `EGLSurface` with the same `EGLContext`

Hi,

I am currently experience the issues when eglMakeCurrent from EGL_NO_SURFACE to a valid egl surface. The intension is using the same shader to different wl_surface. While EGL_KHR_Surfaceless_context is present and I can successfully create shaders and vao, vbos, I cannot see the drawing result, however, after eglMakeCurrent from EGL_NO_SURFACE to a valid EGLSurface, I see only blank framebuffer on the screen.

This issue however does not present with Mesa implementation, so I think this is a bug with nvidia's implementation.

I hope there is a way to fix it.

Regards,
sichem

Crash in libwayland-client when using nvidia driver

firefox[6175]: segfault at 7fd2bd927ad8 ip 00007fd2be2d4758 sp 00007fff2d056510 error 4 in libwayland-client.so.0.21.0[7fd2be2d2000+8000]

The crash occurs only when launching firefox, not in any other program.

(gdb) bt
#0  queue_event (display=0x56155f2efe40, len=4080) at ../src/wayland-client.c:1511
#1  0x00007fd2be2d4b5b in read_events (display=0x56155f2efe40) at ../src/wayland-client.c:1634
#2  0x00007fd2be2d4cb3 in wl_display_read_events (display=0x56155f2efe40)
    at ../src/wayland-client.c:1717
#3  0x00007fd2be2d4fc6 in wl_display_dispatch_queue
    (display=0x56155f2efe40, queue=0x56155f2eff10) at ../src/wayland-client.c:1956
#4  0x00007fd2be2d42da in wl_display_roundtrip_queue
    (display=0x56155f2efe40, queue=0x56155f2eff10) at ../src/wayland-client.c:1370
#5  0x00007fd2be2d4342 in wl_display_roundtrip (display=0x56155f2efe40)
    at ../src/wayland-client.c:1399
#6  0x00007fd2b3b2dc02 in  () at /usr/lib/firefox/libxul.so
#7  0x00007fd2b3b2e3f2 in  () at /usr/lib/firefox/libxul.so
#8  0x00007fd2b3b22299 in  () at /usr/lib/firefox/libxul.so
#9  0x00007fd2b3b2a0be in  () at /usr/lib/firefox/libxul.so
#10 0x00007fd2b3b2a6bd in  () at /usr/lib/firefox/libxul.so
#11 0x000056155e915d81 in  ()
#12 0x000056155e91515d in  ()
#13 0x00007fd2bfe951b7 in  () at /usr/lib/libc.so.6
#14 0x00007fd2bfe95275 in __libc_start_main () at /usr/lib/libc.so.6
#15 0x000056155e915511 in _start ()
(gdb) p *proxy
$10 = {object = {interface = 0x7fd2bd927ac0, implementation = 0x7fd2bd927bf0, id = 6}, 
  display = 0x56155f2efe40, queue = 0x56155f3339a0, flags = 0, refcount = 1, 
  user_data = 0x56155f330e60, dispatcher = 0x0, version = 3, tag = 0x0}
(gdb) p proxy->object
$11 = {interface = 0x7fd2bd927ac0, implementation = 0x7fd2bd927bf0, id = 6}
(gdb) p *proxy->object->interface
Cannot access memory at address 0x7fd2bd927ac0

Seems like a use after free

Dunno if it's a firefox bug, libwayland bug or nvidia bug. It only happens when using sway with gbm, not eglstreams. It doesn't impact any functionality either, firefox runs just fine, but with these messages:

[Parent 8381, Main Thread] WARNING: Failed to parse GL version!: file /home/testuser/.cache/kiss/proc/32123/build/firefox/widget/gtk/GfxInfo.cpp:271
[Parent 8381, Main Thread] WARNING: Failed to detect GL vendor!: file /home/testuser/.cache/kiss/proc/32123/build/firefox/widget/gtk/GfxInfo.cpp:342
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=1.05835) [GFX1-]: No GPUs detected via PCI
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=1.05835) |[1][GFX1-]: glxtest: process failed (received signal 11) (t=1.05838) [GFX1-]: glxtest: process failed (received signal 11)
Initializing context 0x7fa8d80055b1 surface (nil) on display 0x7fa8d80b10e0
GL_VENDOR: NVIDIA Corporation
mVendor: NVIDIA
GL_RENDERER: NVIDIA GeForce GTX 1660/PCIe/SSE2
mRenderer: Unknown
mIsMesa: 0
#0  0x00007fa95e3dd0cc in wl_display_read_events ()
    at /usr/lib/libwayland-client.so.0
#1  0x00007fa95e3dd981 in wl_display_dispatch_queue ()
    at /usr/lib/libwayland-client.so.0
#2  0x00007fa95e3ddc4f in wl_display_roundtrip_queue ()
    at /usr/lib/libwayland-client.so.0
#3  0x00007fa952810cc8 in wayland_egltest ()
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/glxtest.cpp:933
#4  childgltest() ()
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/glxtest.cpp:1151
#5  0x00007fa952810fa8 in fire_glxtest_process() ()
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/glxtest.cpp:1200
#6  0x00007fa952805ddd in XREMain::XRE_mainInit(bool*)
    (this=this@entry=0x7ffc9f9dc8f0, aExitFlag=aExitFlag@entry=0x7ffc9f9dc86f)
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/nsAppRunner.cpp:3992
#7  0x00007fa95280ddfe in XREMain::XRE_mainInit(bool*)
    (aExitFlag=0x7ffc9f9dc86f, this=0x7ffc9f9dc8f0)
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/nsAppRunner.cpp:3879
#8  XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)
    (this=this@entry=0x7ffc9f9dc8f0, argc=argc@entry=1, argv=argv@entry=0x7ffc9f9ddc18, aConfig=...)
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/nsAppRunner.cpp:5867
#9  0x00007fa95280e192 in XRE_main(int, char**, mozilla::BootstrapConfig const&) (argc=1, argv=0x7ffc9f9ddc18, aConfig=...)
    at /home/testuser/.cache/kiss/proc/32123/build/firefox/toolkit/xre/nsAppRunner.cpp:5949
--Type <RET> for more, q to quit, c to continue without paging--c
#10 0x000055bbe4a072d8 in do_main(int, char**, char**) (argc=<optimized out>, argv=<optimized out>, envp=envp@entry=0x7ffc9f9ddc28) at /home/testuser/.cache/kiss/proc/32123/build/firefox/browser/app/nsBrowserApp.cpp:227
#11 0x000055bbe4a066f0 in main(int, char**, char**) (argc=<optimized out>, argv=<optimized out>, envp=0x7ffc9f9ddc28) at /home/testuser/.cache/kiss/proc/32123/build/firefox/browser/app/nsBrowserApp.cpp:414

WL Vulkan apps are broken with PRIME

Hello,

This is sort of a continuation of #41 but for Vulkan apps/games

So Vulkan apps (like PPSSPP or vkcube) fail to work with Wayland on my PRIME setup:

$ prime-run vkcube-wayland 
Selected GPU 0: NVIDIA GeForce GTX 1650 Ti, type: DiscreteGpu 
[destroyed object]: error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a

As you can see it's identical to the OpenGL error (but the OpenGL one has already been fixed) but I also checked the Wayland logs and the (probably) NVIDIA modifier is present (so the linear modifier needs to be used somehow)

Running both PPSSPP and vkcube with XWayland removes the problem (by using SDL_VIDEODRIVER=x11 variable or the X11 vkcube executable)

And now time for the all important system info 🐸 (although it's kinda redundant here):
Distro: Arch Linux
egl-wayland version: 1.1.11 (Git version also fails)
Mesa version: 22.2.1
Driver version: 515.76
Kernel version: 6.0.6
Compositor: mutter 43.0 (through an unofficial repo)
CPU: Ryzen 5 4600H
GPU: Renoir iGPU + GTX 1650 Ti Mobile (as I said a PRIME setup)

egl-wayland uses mesa

Continued from negativo17/nvidia-driver#27

Using mutter-eglstream from https://copr.fedorainfracloud.org/coprs/mvicomoya/mutter-eglstream/

$ dnf list mutter
Last metadata expiration check: 8 days, 13:04:09 ago on Sun 13 Aug 2017 23:23:09 BST.
Installed Packages
mutter.x86_64             3.24.4-1.fc26              @mvicomoya-mutter-eglstream
Available Packages
mutter.i686               3.24.4-1.fc26              updates                    
mutter.src                3.24.4-1.fc26              mvicomoya-mutter-eglstream 

and fedora egl-wayland (same result using either version)

$ dnf --showduplicates list egl-wayland
Last metadata expiration check: 8 days, 13:05:50 ago on Sun 13 Aug 2017 23:23:09 BST.
Installed Packages
egl-wayland.x86_64 1.0.2-0.4.20170802git1f4b1fd.fc26  @@commandline
Available Packages
egl-wayland.i686   1.0.1-0.1.20170308git582fbf3.fc26  fedora       
egl-wayland.x86_64 1.0.1-0.1.20170308git582fbf3.fc26  fedora       
egl-wayland.i686   1.0.2-0.1.20170628git818b613.fc26  updates      
egl-wayland.x86_64 1.0.2-0.1.20170628git818b613.fc26  updates      
egl-wayland.x86_64 1.0.2-0.4.20170802git1f4b1fd.fc26  @@commandline

and nvidia 375.66, 384.59 from rpm or official .run file all result in wayland using mesa instead of nvidia

$ eglinfo
EGL API version: 1.4
EGL vendor string: Mesa Project
EGL version string: 1.4 (DRI2)
EGL client APIs: OpenGL OpenGL_ES 
EGL extensions string:
    EGL_KHR_config_attribs EGL_KHR_create_context
    EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace
    EGL_KHR_no_config_context EGL_KHR_reusable_sync
    EGL_KHR_surfaceless_context EGL_MESA_configless_context
EGL client extensions string:
    EGL_EXT_platform_base EGL_EXT_device_base
    EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions
    EGL_KHR_debug EGL_EXT_platform_x11 EGL_EXT_platform_device
    EGL_EXT_platform_wayland EGL_MESA_platform_gbm
    EGL_MESA_platform_surfaceless
Configurations:
     bf lv colorbuffer dp st  ms    vis   cav bi  renderable  supported
  id sz  l  r  g  b  a th cl ns b    id   eat nd gl es es2 vg surfaces 
---------------------------------------------------------------------
0x01 32  0  8  8  8  8  0  0  0 0 0x24TC      a  y  y  y     win,pb,pix
0x02 32  0  8  8  8  8 16  0  0 0 0x24TC      a  y  y  y     win,pb,pix
0x03 32  0  8  8  8  8 24  0  0 0 0x24TC      a  y  y  y     win,pb,pix
0x04 32  0  8  8  8  8 24  8  0 0 0x24TC      a  y  y  y     win,pb,pix
0x05 32  0  8  8  8  8 32  0  0 0 0x24TC      a  y  y  y     win,pb,pix
0x06 24  0  8  8  8  0  0  0  0 0 0x24TC      y  y  y  y     win,pb,pix
0x07 24  0  8  8  8  0 16  0  0 0 0x24TC      y  y  y  y     win,pb,pix
0x08 24  0  8  8  8  0 24  0  0 0 0x24TC      y  y  y  y     win,pb,pix
0x09 24  0  8  8  8  0 24  8  0 0 0x24TC      y  y  y  y     win,pb,pix
0x0a 24  0  8  8  8  0 32  0  0 0 0x24TC      y  y  y  y     win,pb,pix
0x0b 32  0  8  8  8  8  0  0  0 0 0x25DC      a  y  y  y     win,pb,pix
0x0c 32  0  8  8  8  8 16  0  0 0 0x25DC      a  y  y  y     win,pb,pix
0x0d 32  0  8  8  8  8 24  0  0 0 0x25DC      a  y  y  y     win,pb,pix
0x0e 32  0  8  8  8  8 24  8  0 0 0x25DC      a  y  y  y     win,pb,pix
0x0f 32  0  8  8  8  8 32  0  0 0 0x25DC      a  y  y  y     win,pb,pix
0x10 24  0  8  8  8  0  0  0  0 0 0x25DC      y  y  y  y     win,pb,pix
0x11 24  0  8  8  8  0 16  0  0 0 0x25DC      y  y  y  y     win,pb,pix
0x12 24  0  8  8  8  0 24  0  0 0 0x25DC      y  y  y  y     win,pb,pix
0x13 24  0  8  8  8  0 24  8  0 0 0x25DC      y  y  y  y     win,pb,pix
0x14 24  0  8  8  8  0 32  0  0 0 0x25DC      y  y  y  y     win,pb,pix
$ inxi -GS
System:    Host: localhost.localdomain Kernel: 4.12.6-300.fc26.x86_64 x86_64 bits: 64 Desktop: Gnome 3.24.3
           Distro: Fedora release 26 (Twenty Six)
Graphics:  Card: NVIDIA GK106 [GeForce GTX 660]
           Display Server: wayland (X.org 119.3 ) drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
           Resolution: [email protected]
           OpenGL: renderer: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) version: 2.1 Mesa 17.1.5

wayland-nvidia-bug-report.log.gz

The only thing in the log that is noticeable is the nvidia related kernel trace

[   33.357271] ------------[ cut here ]------------
[   33.357295] WARNING: CPU: 4 PID: 163 at drivers/gpu/drm/drm_atomic_helper.c:1612 drm_atomic_helper_commit_hw_done+0x93/0xa0 [drm_kms_helper]
[   33.357297] Modules linked in: rfcomm fuse ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables bnep it87 hwmon_vid sunrpc arc4 snd_hda_codec_hdmi iwlmvm edac_mce_amd mac80211 kvm_amd btusb kvm btrtl btbcm btintel bluetooth snd_hda_codec_realtek snd_hda_codec_generic irqbypass iwlwifi crct10dif_pclmul crc32_generic snd_hda_intel crc32_pclmul ghash_clmulni_intel f2fs snd_hda_codec ecdh_generic fam15h_power
[   33.357350]  k10temp snd_hda_core snd_hwdep snd_seq cfg80211 snd_seq_device snd_pcm snd_timer snd sp5100_tco rfkill soundcore i2c_piix4 shpchp tpm_infineon acpi_cpufreq tpm_tis tpm_tis_core tpm vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) hid_logitech_hidpp nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) mxm_wmi serio_raw crc32c_intel drm_kms_helper hid_logitech_dj drm wmi
[   33.357382] CPU: 4 PID: 163 Comm: kworker/u16:4 Tainted: P           OE   4.12.6-300.fc26.x86_64 #1
[   33.357384] Hardware name: Gigabyte Technology Co., Ltd. GA-990XA-UD3/GA-990XA-UD3, BIOS F14e 09/09/2014
[   33.357397] Workqueue: events_unbound commit_work [drm_kms_helper]
[   33.357400] task: ffff9d6216930000 task.stack: ffffab8f82104000
[   33.357413] RIP: 0010:drm_atomic_helper_commit_hw_done+0x93/0xa0 [drm_kms_helper]
[   33.357415] RSP: 0018:ffffab8f82107dc0 EFLAGS: 00010286
[   33.357418] RAX: ffff9d61c987bc00 RBX: 0000000000000000 RCX: ffff9d621396d800
[   33.357420] RDX: ffff9d61d7eca900 RSI: ffff9d621659a548 RDI: ffff9d61fe6dbc08
[   33.357421] RBP: ffffab8f82107de0 R08: ffff9d622ed10998 R09: 0000000000000000
[   33.357423] R10: ffffab8f82107d80 R11: 0000000000000360 R12: ffff9d6213c00808
[   33.357425] R13: ffff9d621659a540 R14: ffff9d61fe6dbc08 R15: ffff9d621659a548
[   33.357427] FS:  0000000000000000(0000) GS:ffff9d622ed00000(0000) knlGS:0000000000000000
[   33.357429] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   33.357431] CR2: 000000000169bae0 CR3: 0000000405f2a000 CR4: 00000000000406e0
[   33.357433] Call Trace:
[   33.357443]  nvidia_drm_atomic_helper_commit_tail+0x128/0x190 [nvidia_drm]
[   33.357456]  commit_tail+0x3f/0x70 [drm_kms_helper]
[   33.357469]  commit_work+0x12/0x20 [drm_kms_helper]
[   33.357475]  process_one_work+0x193/0x3c0
[   33.357479]  worker_thread+0x4a/0x3a0
[   33.357483]  kthread+0x125/0x140
[   33.357486]  ? process_one_work+0x3c0/0x3c0
[   33.357489]  ? kthread_park+0x60/0x60
[   33.357491]  ? kthread_park+0x60/0x60
[   33.357496]  ret_from_fork+0x25/0x30
[   33.357498] Code: ec 49 8d 7d 30 e8 3e c2 d7 eb 41 c6 84 24 28 04 00 00 00 49 8b 4e 08 83 c3 01 39 99 40 03 00 00 7f 9d 5b 41 5c 41 5d 41 5e 5d c3 <0f> ff eb c5 f3 c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 
[   33.357544] ---[ end trace 18b729b10c28b76d ]---

Error in ./autogen.sh

Running autogen.sh ends with error on my machine:

./configure: line 18106: syntax error near unexpected token `-fvisibility=hidden,'
./configure: line 18106: `AX_CHECK_COMPILE_FLAG(-fvisibility=hidden,'

Deletion of this command fixes error.
Any ideas of possible cause? Maybe dependency missing/too old compiler?
Running on:
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
I can provide any specifications if needed, but which?

Segmentation fault in libnvidia-egl-wayland.so.1

Steps to reproduce:

  1. Start Alacritty.
  2. Observe segmentation fault.

Here's the stack trace:

#0  0x00007ffff76fed1f in ?? () from /usr/lib/libnvidia-egl-wayland.so.1
No symbol table info available.
#1  0x00007ffff7700c17 in ?? () from /usr/lib/libnvidia-egl-wayland.so.1
No symbol table info available.
#2  0x00007ffff709c552 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#3  0x00007ffff7024ff4 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#4  0x00005555557cebd0 in ?? ()
No symbol table info available.
#5  0x0000555555741a43 in ?? ()
No symbol table info available.
#6  0x00005555555f1150 in ?? ()
No symbol table info available.
#7  0x00005555555f3692 in ?? ()
No symbol table info available.
#8  0x00005555556bbfde in ?? ()
No symbol table info available.
#9  0x0000555555676cb8 in ?? ()
No symbol table info available.
#10 0x00005555558de6e3 in ?? ()
No symbol table info available.
#11 0x00005555556726dd in ?? ()
No symbol table info available.
#12 0x00007ffff7c55152 in __libc_start_main () from /usr/lib/libc.so.6
No symbol table info available.
#13 0x00005555555b80ee in ?? ()
No symbol table info available.

gdb output:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76fed1f in ?? () from /usr/lib/libnvidia-egl-wayland.so.1

GNOME on Wayland.

I will gladly help with any more information if needed.

Incompatibility with rust wayland-client crate

When trying to run wezterm under Wayland, EGL initialization fails with BAD_NATIVE_WINDOW.

Getting this under a debugger, it looks like this runtime check is the critical piece:

#1  wlEglIsWaylandWindowValid (window=window@entry=0x55555a44f740) at ../src/wayland-eglsurface.c:74
74          return WL_CHECK_INTERFACE_TYPE(surface, wl_surface_interface);

Poking around at the surface that was passed in:

>>> p surface
$5 = (struct wl_surface *) 0x555559938800
>>> p *(void**)surface
$8 = (void *) 0x555559904ea8 <wayland_client::protocol::wl_surface::wl_surface_interface>
>>> p *(struct wl_interface*)0x555559904ea8
$12 = {
  name = 0x555558d3994c "wl_surface",
  version = 4,
  method_count = 10,
  methods = 0x555559904d78 <wayland_client::protocol::wl_surface::wl_surface_requests>,
  event_count = 2,
  events = 0x555559904e78 <wayland_client::protocol::wl_surface::wl_surface_events>
}

And comparing with the wl_surface type that is checked against by this part of the macro:

*(void **)(obj) == &ifname)

>>> p &wl_surface_interface
$13 = (const struct wl_interface *) 0x7ffff7d4aa00 <wl_surface_interface>
>>> p wl_surface_interface
$14 = {
  name = 0x7ffff7d46a88 "wl_surface",
  version = 4,
  method_count = 10,
  methods = 0x7ffff7d4a540 <wl_surface_requests>,
  event_count = 2,
  events = 0x7ffff7d4a500 <wl_surface_events>
}

The interface appears to be compatible if the check were to perform a comparison of what's inside the wl_interface, even though the addresses are not identical.

Why aren't the addresses identical?

The rust client implementation employs code generation to produce most of its code; here's an example of the definition of that particular interface:

https://docs.rs/wayland-client/0.28.1/src/wayland_client/opt/rustwide/target/debug/build/wayland-client-fdd09ed62affdce6/out/wayland_api.rs.html#5885-5892

The rust client does, however, call out to the system libraries so that it should be comptible with EGL libraries.
This same code runs fine when run against the nouveau driver.

So! Should NVIDIA/egl-wayland project be performing a deeper wl_interface comparison here to unblock this usage?

egl-wayland 1.1.9 & gbm & xwayland

While things appear to work fine for a KDE plasma session (after having added the qtwayland patch from https://codereview.qt-project.org/c/qt/qtwayland/+/373473) started via sddm the same can't be said about xwayland/opengl.

I tried a few combinations of the json files shipped by nvidia-drivers 495.29.05 (and mesa) and I also included the following xwayland patches, one of them being mentioned in the release notes http://us.download.nvidia.com/XFree86/Linux-x86_64/495.29.05/README/gbm.html.

https://cgit.freedesktop.org/xorg/xserver/commit/hw/xwayland?id=f15729376d7c7ef183bd8f77156c281ff84c2bd9
https://cgit.freedesktop.org/xorg/xserver/commit/hw/xwayland?id=5daf42b48924b1e93d4fe40e600c42ae9835712f

With the combination of

/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json
/usr/share/glvnd/egl_vendor.d/10_nvidia.json
/usr/share/glvnd/egl_vendor.d/50_mesa.json

and/or

/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json
/usr/share/glvnd/egl_vendor.d/10_nvidia.json

I get the following glxinfo output: glxinfo_all_json.txt

and the error message

$ glxinfo
libGL error: MESA-LOADER: failed to open nouveau: /usr/x86_64-pc-linux-gnu/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /usr/x86_64-pc-linux-gnu/lib/dri, suffix _dri)
libGL error: failed to load driver: nouveau

With

/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
/usr/share/glvnd/egl_vendor.d/10_nvidia.json
/usr/share/glvnd/egl_vendor.d/50_mesa.json

I get no error message and the following output: glxinfo_15_nvidia_gbm.json.txt

And with just

/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
/usr/share/glvnd/egl_vendor.d/10_nvidia.json

things appear to work correctly, but I guess not using the gbm path but the old way of just eglstream? glxinfo output: glxinfo_nvidia_json_only.txt

error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]

I can't build egl-wayland-1.1.1 with LLVM/clang-7.0.0

FAILED: src/src@@nvidia-egl-wayland@sha/wayland-eglswap.c.o 
/usr/bin/clang -Isrc/src@@nvidia-egl-wayland@sha -Isrc -I../src -I../include -I../wayland-egl -Iwayland-eglstream -I/usr/include/EGL -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wall -Werror -fvisibility=hidden -Wno-pedantic -Os -gdwarf-4 -Wstrict-aliasing=2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -fPIC -pthread  -MD -MQ 'src/src@@nvidia-egl-wayland@sha/wayland-eglswap.c.o' -MF 'src/src@@nvidia-egl-wayland@sha/wayland-eglswap.c.o.d' -o 'src/src@@nvidia-egl-wayland@sha/wayland-eglswap.c.o' -c ../src/wayland-eglswap.c
In file included from ../src/wayland-eglswap.c:27:
In file included from ../include/wayland-eglsurface.h:31:
../include/wayland-eglutils.h:50:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if HAS_MINCORE
    ^
../include/wayland-eglutils.h:43:23: note: expanded from macro 'HAS_MINCORE'
#define HAS_MINCORE (!defined(__QNX__) && !defined(__INTEGRITY))
                      ^
../include/wayland-eglutils.h:50:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
../include/wayland-eglutils.h:43:44: note: expanded from macro 'HAS_MINCORE'
#define HAS_MINCORE (!defined(__QNX__) && !defined(__INTEGRITY))
                                           ^
2 errors generated.

Here is the full log:
http://file-store.openmandriva.org/api/v1/file_stores/86be9b6cbd6669b23d62066bfedb45f35584627a.log?show=true

Evolution egl-wayland crash

Using GeForce GTX 1070/PCIe/SSE2 on Intel® Core™ i7 CPU X 990 @ 3.47GHz × 12 and Arch Linux operating system. A full system update is performed each day.

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 36 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Model name: Intel(R) Core(TM) i7 CPU X 990 @ 3.47GHz
Stepping: 2
Frequency boost: enabled
CPU MHz: 1599.102
CPU max MHz: 3459.0000
CPU min MHz: 1596.0000
BogoMIPS: 6930.77
Virtualization: VT-x
L1d cache: 192 KiB
L1i cache: 192 KiB
L2 cache: 1.5 MiB
L3 cache: 12 MiB
NUMA node0 CPU(s): 0-11
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cach
e flushes, SMT vulnerable
Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no mic
rocode; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user
pointer sanitization
Vulnerability Spectre v2: Mitigation; Full generic retpoline, STIBP disab
led, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtr
r pge mca cmov pat pse36 clflush dts acpi mmx f
xsr sse sse2 ht tm pbe syscall nx pdpe1gb rdtsc
p lm constant_tsc arch_perfmon pebs bts rep_goo
d nopl xtopology nonstop_tsc cpuid aperfmperf p
ni pclmulqdq dtes64 monitor ds_cpl vmx est tm2
ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt
aes lahf_lm pti tpr_shadow vnmi flexpriority ep
t vpid dtherm ida arat

Process 1670 (evolution) of user 1000 dumped core.

Stack trace of thread 1670:
#0 0x00007fa94c0c5615 raise (libc.so.6 + 0x3d615)
#1 0x00007fa94c0ae862 abort (libc.so.6 + 0x26862)
#2 0x00007fa94c0ae747 __assert_fail_base.cold (libc.so.6 + 0x26747)
#3 0x00007fa94c0bdbf6 __assert_fail (libc.so.6 + 0x35bf6)
#4 0x00007fa93c7b690c n/a (libnvidia-egl-wayland.so.1 + 0x590c)
#5 0x00007fa93c7b89e1 n/a (libnvidia-egl-wayland.so.1 + 0x79e1)
#6 0x00007fa90057e65f n/a (libEGL_nvidia.so.0 + 0xd365f)
#7 0x00007fa9004fd5ab n/a (libEGL_nvidia.so.0 + 0x525ab)
#8 0x00007fa93c7b69dc n/a (libnvidia-egl-wayland.so.1 + 0x59dc)
#9 0x00007fa900577923 n/a (libEGL_nvidia.so.0 + 0xcc923)
#10 0x00007fa9004f9c55 n/a (libEGL_nvidia.so.0 + 0x4ec55)
#11 0x00007fa94a72fceb wpe_fdo_initialize_for_egl_display (libWPEBackend-fdo-1.0.so.1 + 0x9ceb)
#12 0x00007fa94d120059 n/a (libwebkit2gtk-4.0.so.37 + 0xc19059)
#13 0x00007fa94d124cf8 n/a (libwebkit2gtk-4.0.so.37 + 0xc1dcf8)
#14 0x00007fa94cfa836a n/a (libwebkit2gtk-4.0.so.37 + 0xaa136a)
#15 0x00007fa94cfa9221 n/a (libwebkit2gtk-4.0.so.37 + 0xaa2221)
#16 0x00007fa94cfa9dbd n/a (libwebkit2gtk-4.0.so.37 + 0xaa2dbd)
#17 0x00007fa94cfb07c6 n/a (libwebkit2gtk-4.0.so.37 + 0xaa97c6)
#18 0x00007fa94cfb0cbb n/a (libwebkit2gtk-4.0.so.37 + 0xaa9cbb)
#19 0x00007fa94cfb139d n/a (libwebkit2gtk-4.0.so.37 + 0xaaa39d)
#20 0x00007fa94d05b487 webkit_web_view_run_javascript (libwebkit2gtk-4.0.so.37 + 0xb54487)
#21 0x00007fa94c440872 e_web_view_jsc_run_script (libevolution-util.so + 0x1cd872)
#22 0x00007fa94c440e82 e_web_view_jsc_add_rule_into_style_sheet (libevolution-util.so + 0x1cde82)
#23 0x00007fa94c436e4a n/a (libevolution-util.so + 0x1c3e4a)
#24 0x00007fa94c43d18a e_web_view_update_fonts_settings (libevolution-util.so + 0x1ca18a)
#25 0x00007fa94c43d657 n/a (libevolution-util.so + 0x1ca657)
#26 0x00007fa9441208a7 n/a (libevolution-mail.so + 0x6b8a7)
#27 0x00007fa94fe2726f n/a (libgobject-2.0.so.0 + 0x2126f)
#28 0x00007fa94fe288a4 g_object_new_valist (libgobject-2.0.so.0 + 0x228a4)
#29 0x00007fa94fe28c1a g_object_new (libgobject-2.0.so.0 + 0x22c1a)
#30 0x00007fa944134cda n/a (libevolution-mail.so + 0x7fcda)
#31 0x00007fa94fe270e7 n/a (libgobject-2.0.so.0 + 0x210e7)
#32 0x00007fa94fe288a4 g_object_new_valist (libgobject-2.0.so.0 + 0x228a4)
#33 0x00007fa94fe28c1a g_object_new (libgobject-2.0.so.0 + 0x22c1a)
#34 0x00007fa93e6301d0 n/a (module-mail.so + 0x191d0)
#35 0x00007fa94fe270e7 n/a (libgobject-2.0.so.0 + 0x210e7)
#36 0x00007fa94fe288a4 g_object_new_valist (libgobject-2.0.so.0 + 0x228a4)
#37 0x00007fa94fe28c1a g_object_new (libgobject-2.0.so.0 + 0x22c1a)
#38 0x00007fa950bbb9ea n/a (libevolution-shell.so + 0x229ea)
#39 0x00007fa93e6340d9 n/a (module-mail.so + 0x1d0d9)
#40 0x00007fa94fe270e7 n/a (libgobject-2.0.so.0 + 0x210e7)
#41 0x00007fa94fe288a4 g_object_new_valist (libgobject-2.0.so.0 + 0x228a4)
#42 0x00007fa94fe28c1a g_object_new (libgobject-2.0.so.0 + 0x22c1a)
#43 0x00007fa950bbe31f n/a (libevolution-shell.so + 0x2531f)
#44 0x00007fa950bbdc35 e_shell_window_get_shell_view (libevolution-shell.so + 0x24c35)
#45 0x00007fa950bbec57 e_shell_window_set_active_view (libevolution-shell.so + 0x25c57)
#46 0x00007fa94fe216cf n/a (libgobject-2.0.so.0 + 0x1b6cf)
#47 0x00007fa94fe28dac g_object_setv (libgobject-2.0.so.0 + 0x22dac)
#48 0x00007fa94fe28e7c g_object_set_property (libgobject-2.0.so.0 + 0x22e7c)
#49 0x00007fa94ff46f95 n/a (libgio-2.0.so.0 + 0xe8f95)
#50 0x00007fa94ff4776a g_settings_bind_with_mapping (libgio-2.0.so.0 + 0xe976a)
#51 0x00007fa94ff47d8b g_settings_bind (libgio-2.0.so.0 + 0xe9d8b)
#52 0x00007fa950bc1604 e_shell_window_private_constructed (libevolution-shell.so + 0x28604)
#53 0x00007fa950bbd53f n/a (libevolution-shell.so + 0x2453f)
#54 0x00007fa94fe270e7 n/a (libgobject-2.0.so.0 + 0x210e7)
#55 0x00007fa94fe288a4 g_object_new_valist (libgobject-2.0.so.0 + 0x228a4)
#56 0x00007fa94fe28c1a g_object_new (libgobject-2.0.so.0 + 0x22c1a)
#57 0x00007fa950bbd63b e_shell_window_new (libevolution-shell.so + 0x2463b)
#58 0x00007fa950bacaa9 e_shell_create_shell_window (libevolution-shell.so + 0x13aa9)
#59 0x000055ef8518f960 n/a (evolution + 0x4960)
#60 0x00007fa950937924 g_main_context_dispatch (libglib-2.0.so.0 + 0x52924)
#61 0x00007fa95098b621 n/a (libglib-2.0.so.0 + 0xa6621)
#62 0x00007fa950936e73 g_main_loop_run (libglib-2.0.so.0 + 0x51e73)
#63 0x00007fa95031e4ff gtk_main (libgtk-3.so.0 + 0x1e14ff)

Stack trace of thread 1703:
#0 0x00007fa94c260cf8 pthread_cond_clockwait (libpthread.so.0 + 0xfcf8)
#1 0x00007fa94a307a7e _ZN7bmalloc9Scavenger13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18 + 0x1578a7e)
#2 0x00007fa94a307bea ZN7bmalloc9Scavenger16threadEntryPointEPS0 (libjavascriptcoregtk-4.0.so.18 + 0x1578bea)
#3 0x00007fa94a8b2c24 execute_native_thread_routine (libstdc++.so.6 + 0xcfc24)
#4 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#5 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1704:
#0 0x00007fa94c2609c8 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf9c8)
#1 0x00007fa94a2f954d _ZN3WTF15ThreadCondition9timedWaitERNS_5MutexENS_8WallTimeE (libjavascriptcoregtk-4.0.so.18 + 0x156a54d)
#2 0x00007fa94a29070d _ZN3WTF10ParkingLot21parkConditionallyImplEPKvRKNS_12ScopedLambdaIFbvEEERKNS3_IFvvEEERKNS_24TimeWithDynamicClockTypeE (libjavascriptcoregtk-4.0.so.18 + 0x150170d)
#3 0x00007fa94a2941dd _ZN3WTF5sleepENS_7SecondsE (libjavascriptcoregtk-4.0.so.18 + 0x15051dd)
#4 0x00007fa94d132a8b n/a (libwebkit2gtk-4.0.so.37 + 0xc2ba8b)
#5 0x00007fa94d1331e9 n/a (libwebkit2gtk-4.0.so.37 + 0xc2c1e9)
#6 0x00007fa94a2950ae _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18 + 0x15060ae)
#7 0x00007fa94a2f8d1a n/a (libjavascriptcoregtk-4.0.so.18 + 0x1569d1a)
#8 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#9 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1673:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1705:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936e73 g_main_loop_run (libglib-2.0.so.0 + 0x51e73)
#3 0x00007fa94a2f6b72 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18 + 0x1567b72)
#4 0x00007fa94a2950ae _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18 + 0x15060ae)
#5 0x00007fa94a2f8d1a n/a (libjavascriptcoregtk-4.0.so.18 + 0x1569d1a)
#6 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#7 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1672:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936131 g_main_context_iteration (libglib-2.0.so.0 + 0x51131)
#3 0x00007fa950936182 n/a (libglib-2.0.so.0 + 0x51182)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1680:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa94feeedae g_socket_condition_timed_wait (libgio-2.0.so.0 + 0x90dae)
#2 0x00007fa94feef119 n/a (libgio-2.0.so.0 + 0x91119)
#3 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#4 0x00007fa93c88aef5 n/a (libgiognutls.so + 0xdef5)
#5 0x00007fa93c570487 n/a (libgnutls.so.30 + 0x3e487)
#6 0x00007fa93c56659f n/a (libgnutls.so.30 + 0x3459f)
#7 0x00007fa93c568cc4 n/a (libgnutls.so.30 + 0x36cc4)
#8 0x00007fa93c88ba81 n/a (libgiognutls.so + 0xea81)
#9 0x00007fa93c89029e n/a (libgiognutls.so + 0x1329e)
#10 0x00007fa93c890465 n/a (libgiognutls.so + 0x13465)
#11 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#12 0x00007fa950ae1679 n/a (libcamel-1.2.so.62 + 0xc9679)
#13 0x00007fa950ae19ca camel_stream_read (libcamel-1.2.so.62 + 0xc99ca)
#14 0x00007fa93dad6515 n/a (libcamelpop3.so + 0xa515)
#15 0x00007fa93dad6a0a camel_pop3_stream_line (libcamelpop3.so + 0xaa0a)
#16 0x00007fa93dad178a camel_pop3_engine_iterate (libcamelpop3.so + 0x578a)
#17 0x00007fa93dad2857 n/a (libcamelpop3.so + 0x6857)
#18 0x00007fa950a7a23e camel_folder_refresh_info_sync (libcamel-1.2.so.62 + 0x6223e)
#19 0x00007fa93dad43af camel_pop3_folder_new (libcamelpop3.so + 0x83af)
#20 0x00007fa950ad7aa8 n/a (libcamel-1.2.so.62 + 0xbfaa8)
#21 0x00007fa950adbd65 camel_store_get_inbox_folder_sync (libcamel-1.2.so.62 + 0xc3d65)
#22 0x00007fa93e7c5e01 e_mail_session_get_inbox_sync (libemail-engine.so + 0x1be01)
#23 0x00007fa93e7d3879 n/a (libemail-engine.so + 0x29879)
#24 0x00007fa93e7d238d n/a (libemail-engine.so + 0x2838d)
#25 0x00007fa950967bd7 n/a (libglib-2.0.so.0 + 0x82bd7)
#26 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#27 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#28 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1702:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1676:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936e73 g_main_loop_run (libglib-2.0.so.0 + 0x51e73)
#3 0x00007fa95007e793 n/a (libedataserver-1.2.so.25 + 0x62793)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1694:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1681:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1687:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1696:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa9509079a4 g_async_queue_timeout_pop (libglib-2.0.so.0 + 0x229a4)
#4 0x00007fa950967c7a n/a (libglib-2.0.so.0 + 0x82c7a)
#5 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#6 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#7 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1686:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa94feeedae g_socket_condition_timed_wait (libgio-2.0.so.0 + 0x90dae)
#2 0x00007fa94feef119 n/a (libgio-2.0.so.0 + 0x91119)
#3 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#4 0x00007fa93c88aef5 n/a (libgiognutls.so + 0xdef5)
#5 0x00007fa93c570487 n/a (libgnutls.so.30 + 0x3e487)
#6 0x00007fa93c56659f n/a (libgnutls.so.30 + 0x3459f)
#7 0x00007fa93c568cc4 n/a (libgnutls.so.30 + 0x36cc4)
#8 0x00007fa93c88ba81 n/a (libgiognutls.so + 0xea81)
#9 0x00007fa93c89029e n/a (libgiognutls.so + 0x1329e)
#10 0x00007fa93c890465 n/a (libgiognutls.so + 0x13465)
#11 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#12 0x00007fa950ae1679 n/a (libcamel-1.2.so.62 + 0xc9679)
#13 0x00007fa950ae19ca camel_stream_read (libcamel-1.2.so.62 + 0xc99ca)
#14 0x00007fa93dad6515 n/a (libcamelpop3.so + 0xa515)
#15 0x00007fa93dad6a0a camel_pop3_stream_line (libcamelpop3.so + 0xaa0a)
#16 0x00007fa93dad178a camel_pop3_engine_iterate (libcamelpop3.so + 0x578a)
#17 0x00007fa93dad2857 n/a (libcamelpop3.so + 0x6857)
#18 0x00007fa950a7a23e camel_folder_refresh_info_sync (libcamel-1.2.so.62 + 0x6223e)
#19 0x00007fa93dad43af camel_pop3_folder_new (libcamelpop3.so + 0x83af)
#20 0x00007fa950ad7aa8 n/a (libcamel-1.2.so.62 + 0xbfaa8)
#21 0x00007fa950adbd65 camel_store_get_inbox_folder_sync (libcamel-1.2.so.62 + 0xc3d65)
#22 0x00007fa93e7c5e01 e_mail_session_get_inbox_sync (libemail-engine.so + 0x1be01)
#23 0x00007fa93e7d3879 n/a (libemail-engine.so + 0x29879)
#24 0x00007fa93e7d238d n/a (libemail-engine.so + 0x2838d)
#25 0x00007fa950967bd7 n/a (libglib-2.0.so.0 + 0x82bd7)
#26 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#27 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#28 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1677:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1674:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936e73 g_main_loop_run (libglib-2.0.so.0 + 0x51e73)
#3 0x00007fa94ff5ffe8 n/a (libgio-2.0.so.0 + 0x101fe8)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1689:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1691:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1688:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1675:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936131 g_main_context_iteration (libglib-2.0.so.0 + 0x51131)
#3 0x00007fa950b8ec0e n/a (libdconfsettings.so + 0x5c0e)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1706:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa95098b5af n/a (libglib-2.0.so.0 + 0xa65af)
#2 0x00007fa950936e73 g_main_loop_run (libglib-2.0.so.0 + 0x51e73)
#3 0x00007fa94a2f6b72 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18 + 0x1567b72)
#4 0x00007fa94a2950ae _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18 + 0x15060ae)
#5 0x00007fa94a2f8d1a n/a (libjavascriptcoregtk-4.0.so.18 + 0x1569d1a)
#6 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#7 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1693:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1695:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1697:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1692:
#0 0x00007fa94c17d46f __poll (libc.so.6 + 0xf546f)
#1 0x00007fa94feeedae g_socket_condition_timed_wait (libgio-2.0.so.0 + 0x90dae)
#2 0x00007fa94feef119 n/a (libgio-2.0.so.0 + 0x91119)
#3 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#4 0x00007fa93c88aef5 n/a (libgiognutls.so + 0xdef5)
#5 0x00007fa93c570487 n/a (libgnutls.so.30 + 0x3e487)
#6 0x00007fa93c56659f n/a (libgnutls.so.30 + 0x3459f)
#7 0x00007fa93c568cc4 n/a (libgnutls.so.30 + 0x36cc4)
#8 0x00007fa93c88ba81 n/a (libgiognutls.so + 0xea81)
#9 0x00007fa93c89029e n/a (libgiognutls.so + 0x1329e)
#10 0x00007fa93c890465 n/a (libgiognutls.so + 0x13465)
#11 0x00007fa94fecfc81 g_input_stream_read (libgio-2.0.so.0 + 0x71c81)
#12 0x00007fa950ae1679 n/a (libcamel-1.2.so.62 + 0xc9679)
#13 0x00007fa950ae19ca camel_stream_read (libcamel-1.2.so.62 + 0xc99ca)
#14 0x00007fa93dad6515 n/a (libcamelpop3.so + 0xa515)
#15 0x00007fa93dad6a0a camel_pop3_stream_line (libcamelpop3.so + 0xaa0a)
#16 0x00007fa93dad178a camel_pop3_engine_iterate (libcamelpop3.so + 0x578a)
#17 0x00007fa93dad2857 n/a (libcamelpop3.so + 0x6857)
#18 0x00007fa950a7a23e camel_folder_refresh_info_sync (libcamel-1.2.so.62 + 0x6223e)
#19 0x00007fa93dad43af camel_pop3_folder_new (libcamelpop3.so + 0x83af)
#20 0x00007fa950ad7aa8 n/a (libcamel-1.2.so.62 + 0xbfaa8)
#21 0x00007fa950adbd65 camel_store_get_inbox_folder_sync (libcamel-1.2.so.62 + 0xc3d65)
#22 0x00007fa93e7c5e01 e_mail_session_get_inbox_sync (libemail-engine.so + 0x1be01)
#23 0x00007fa93e7d3879 n/a (libemail-engine.so + 0x29879)
#24 0x00007fa93e7d238d n/a (libemail-engine.so + 0x2838d)
#25 0x00007fa950967bd7 n/a (libglib-2.0.so.0 + 0x82bd7)
#26 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#27 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#28 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

Stack trace of thread 1698:
#0 0x00007fa94c182d5d syscall (libc.so.6 + 0xfad5d)
#1 0x00007fa950985b2b g_cond_wait_until (libglib-2.0.so.0 + 0xa0b2b)
#2 0x00007fa950907813 n/a (libglib-2.0.so.0 + 0x22813)
#3 0x00007fa950967d2b n/a (libglib-2.0.so.0 + 0x82d2b)
#4 0x00007fa950964d21 n/a (libglib-2.0.so.0 + 0x7fd21)
#5 0x00007fa94c25a3e9 start_thread (libpthread.so.0 + 0x93e9)
#6 0x00007fa94c188293 __clone (libc.so.6 + 0x100293)

deadlock displaying frames

I have a simple setup that is

1/ Debian 10 (buster)
2/ GStreamer git, built with gst-build (20190910)
3/ libnvidia-egl-wayland1 (built from git, same date)
4/ mutter 3.32.2+git20190711-2 (debian experimental snapshot). Any snapshot after that will do since it tackles the inverted display.
5/ gfx card is p2000/p4000/m4000 (does not really matter)
6/ nvidia drivers are 430.34-1

A simple pipeline is launched:

$ gst-launch-1.0 videotestsrc ! glimagesink &

This results in a single frame being shown.

When that same pipeline is launched again, both videos are shown smoothly.

Plasma wayland - black screen in Ver 1.1.9-1

Plasma shell fails to launch and in the logs below errors are seen
[destroyed object]: error 7: importing the supplied dmabufs failed
The Wayland connection broke. Did the Wayland compositor die?

similar errors are seen even in systemsettings of KDE

but works if launched with
env QT_QPA_PLATFORM=xcb systemsettings

works fine on intel

EGL_NO_SURFACE can corrupt a context in EGL_OPENGL_API mode

I was looking into mpv's failure to render on the egl wayland backend and after some back and forth it appears this is a driver bug. Since this project implements that backend I presume this is the right place to report it, if not feel free to redirect me elsewhere.

On the 495 driver with egl-wayland 1.1.8 and later (including master) the nvidia drivers can enter a state where eglMakeCurrent with EGL_NO_SURFACE can render a context unsuable for wayland windows (they almost always render nothing, 1/100 times they will render unintialized vram, and 1/100 times they will render the surface you made current). The motivating example of this bug is mpv --no-config --opengl-es=no --vo=gpu --gpu-context=wayland big_buck_bunny.mp4 which fails to display on gnome-shell, kwin_wayland, and sway. However switching the rendering api to gles via --opengl-es=yes results in a perfectly displayed window.

However mpv is a large program and also happens to have some other exciting bugs, so we have distilled a minimal example of this error. You can find the source at https://github.com/kkartaltepe/wayland-egl-simple/tree/mpv-example this is a minimal window rendered with with egl which displays the same issues as mpv. The comments in main.c explain how to compile it and you can run it with ./demo to observe the desktop gl issue and ./demo gles to see how changing the bound api results in different behaviour. The bug appear to be triggered by https://github.com/kkartaltepe/wayland-egl-simple/blob/mpv-example/main.c#L229

Personally I have been testing this with nested compositors. From an X11 session you can run gnome (41.1) via gnome-shell --nested --wayland or for kde (5.23.3) kwin_wayland --no-lockscreen. Prior to version 1.1.8 eglCreatePlatformWindowSurface fails for this minimal demo.

[BUG] Ver 1.1.8-1 breaks some GTK3/4 apps (Gnome ToDo, Gnome Maps, Cheese) - On Hybrid Graphics configurations

Expected behavior:

Launching Gnome ToDo, Gnome Maps, or Cheese functions and the app is displayed.

Actual behavior:

The apps are never launched

Debug Logs:

[3430410.735] [email protected]_id(36)
[3430410.749] [email protected]_id(37)
[3430410.753] [email protected](nil, 7, "failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a ")
13:01:41.382673                           Gdk:    DEBUG: [destroyed object]: error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a 

Gdk-Message: 13:01:41.382: Error flushing display: Protocol error

Workaround:

Rolling back to ver 1.1.7-1 resolved the issue entirely.

Zoom crashing on Wayland

Hello,

I am hitting an issue regarding Zoom crashing when running on Wayland (using QT_QPA_PLATFORM=wayland because Xwayland just shows a blank window), it seems the issue is happening when a window is closed as you can see in the video. I had a similar issue with OBS which was fixed by aaf8608

2022-07-29.22-00-39.mp4

I am also attaching the nvidia-bug-report log that was created with egl-wayland built with this aaf8608

nvidia-bug-report.log.gz

My specs:
CPU: Ryzen 5 2600
GPU: 1070Ti with driver version 515.57
OS: Fedora 36

Edit: I have tried running Zoom on my laptop. With running on the iGPU (intel HD 530) the app works fine but when running it on the NV gpu (GTX 960M with the same driver version) the app shows the same behavior like in the video.

Overriding the `egl_externalplatform.d` search paths?

I am examining the NVIDIA driver setup for NixOS. It seems that we might not have EGL setup to work out of the box currently and I'd like to fix that.

We patch our libglvnd to search for drivers in /run/opengl-driver/lib/..., and redirect the egl egl_vendor.d/ and vulkan {icd.d,implicit_layer.d}/ json files to install in /run/opengl-driver/share/{glvnd,vulkan}.

Now I need to get libEGL_nvidia.so to look in /run/opengl-driver/share/egl_externalplatform.d.

To demonstrate:

# this is after I've fixed where `egl_external_platform.d` is placed
❯ tree /run/opengl-driver/share   
/run/opengl-driver/share
├── egl
│   └── egl_external_platform.d
│       └── 10_nvidia_wayland.json
├── glvnd
│   └── egl_vendor.d
│       └── 10_nvidia.json
└── vulkan
    ├── icd.d
    │   └── nvidia_icd.json
    └── implicit_layer.d
        └── nvidia_layers.json

7 directories, 4 files

# just for extra detail as to how Nix tries to handle things:
❯ cat /run/opengl-driver/share/egl/egl_external_platform.d/10_nvidia_wayland.json
{
    "file_format_version" : "1.0.0",
    "ICD" : {
        "library_path" : "/nix/store/q166dlhkm9bdvcwjp2vmlvxwn6gvaawx-nvidia-x11-470.63.01-5.13.16/lib/libnvidia-egl-wayland.so.1"
    }
}

❯ strings $(nix path-info -r /run/current-system | rg libglvnd | rg -v dev | head -1)/lib/libEGL.so | rg "egl_vendor"
/run/opengl-driver/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d
# great!

❯ strings $(nix path-info -r /run/current-system | rg nvidia-x11 | rg -v lib32 | rg -v bin)/lib/libEGL_nvidia.so | rg "egl_extern"
/etc/egl/egl_external_platform.d:/usr/share/egl/egl_external_platform.d
# not so great

Symlinking the json file into the /etc/... search path does seem to get EGL working in Wayland, but that's not really ideal, and we've got to great lengths already to handle things in a Nix-oriented way (in fact, when I squint, this indirection/loader looks somewhat similar in spirit to NixOS's /run/opengl-driver construct).

However, we don't get to build libEGL_nvidia.so, so we can't configure it like we do libglvnd. Are there options for how we can override these search paths at runtime or otherwise?

1.1.8 fails to build

I'm getting the following errors building for Arch Linux (with meson), where 1.1.7 built fine:

FAILED: src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglhandle.c.o 
cc -Isrc/libnvidia-egl-wayland.so.1.1.8.p -Isrc -I../egl-wayland/src -I../egl-wayland/include -I../egl-wayland/wayland-egl -Iwayland-eglstream -I/usr/include/EGL -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -Wall -Werror -fvisibility=hidden -DWL_HIDE_DEPRECATED -Wno-pedantic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglhandle.c.o -MF src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglhandle.c.o.d -o src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglhandle.c.o -c ../egl-wayland/src/wayland-eglhandle.c
In file included from ../egl-wayland/src/wayland-eglhandle.c:23:
../egl-wayland/include/wayland-eglhandle.h:112:9: error: unknown type name ‘PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC’
  112 |         PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC      streamImageConsumerConnect;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:113:9: error: unknown type name ‘PFNEGLSTREAMACQUIREIMAGENVPROC’
  113 |         PFNEGLSTREAMACQUIREIMAGENVPROC              streamAcquireImage;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:114:9: error: unknown type name ‘PFNEGLSTREAMRELEASEIMAGENVPROC’
  114 |         PFNEGLSTREAMRELEASEIMAGENVPROC              streamReleaseImage;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:115:9: error: unknown type name ‘PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC’
  115 |         PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC        queryStreamConsumerEvent;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/src/wayland-eglhandle.c: In function ‘wlEglCreatePlatformData’:
../egl-wayland/src/wayland-eglhandle.c:100:22: error: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Werror=int-conversion]
  100 |     res->egl._FIELD_ = driver->getProcAddress(#_NAME_)
      |                      ^
../egl-wayland/src/wayland-eglhandle.c:116:5: note: in expansion of macro ‘GET_PROC’
  116 |     GET_PROC(streamImageConsumerConnect,  eglStreamImageConsumerConnectNV);
      |     ^~~~~~~~
../egl-wayland/src/wayland-eglhandle.c:100:22: error: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Werror=int-conversion]
  100 |     res->egl._FIELD_ = driver->getProcAddress(#_NAME_)
      |                      ^
../egl-wayland/src/wayland-eglhandle.c:117:5: note: in expansion of macro ‘GET_PROC’
  117 |     GET_PROC(streamAcquireImage,          eglStreamAcquireImageNV);
      |     ^~~~~~~~
../egl-wayland/src/wayland-eglhandle.c:100:22: error: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Werror=int-conversion]
  100 |     res->egl._FIELD_ = driver->getProcAddress(#_NAME_)
      |                      ^
../egl-wayland/src/wayland-eglhandle.c:118:5: note: in expansion of macro ‘GET_PROC’
  118 |     GET_PROC(streamReleaseImage,          eglStreamReleaseImageNV);
      |     ^~~~~~~~
../egl-wayland/src/wayland-eglhandle.c:100:22: error: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Werror=int-conversion]
  100 |     res->egl._FIELD_ = driver->getProcAddress(#_NAME_)
      |                      ^
../egl-wayland/src/wayland-eglhandle.c:119:5: note: in expansion of macro ‘GET_PROC’
  119 |     GET_PROC(queryStreamConsumerEvent,    eglQueryStreamConsumerEventNV);
      |     ^~~~~~~~

(the header errors are repeated for other files)

FAILED: src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglsurface.c.o 
cc -Isrc/libnvidia-egl-wayland.so.1.1.8.p -Isrc -I../egl-wayland/src -I../egl-wayland/include -I../egl-wayland/wayland-egl -Iwayland-eglstream -I/usr/include/EGL -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -Wall -Werror -fvisibility=hidden -DWL_HIDE_DEPRECATED -Wno-pedantic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglsurface.c.o -MF src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglsurface.c.o.d -o src/libnvidia-egl-wayland.so.1.1.8.p/wayland-eglsurface.c.o -c ../egl-wayland/src/wayland-eglsurface.c
In file included from ../egl-wayland/include/wayland-egldisplay.h:31,
                 from ../egl-wayland/include/wayland-eglsurface.h:30,
                 from ../egl-wayland/src/wayland-eglsurface.c:23:
../egl-wayland/include/wayland-eglhandle.h:112:9: error: unknown type name ‘PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC’
  112 |         PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC      streamImageConsumerConnect;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:113:9: error: unknown type name ‘PFNEGLSTREAMACQUIREIMAGENVPROC’
  113 |         PFNEGLSTREAMACQUIREIMAGENVPROC              streamAcquireImage;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:114:9: error: unknown type name ‘PFNEGLSTREAMRELEASEIMAGENVPROC’
  114 |         PFNEGLSTREAMRELEASEIMAGENVPROC              streamReleaseImage;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/include/wayland-eglhandle.h:115:9: error: unknown type name ‘PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC’
  115 |         PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC        queryStreamConsumerEvent;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/src/wayland-eglsurface.c: In function ‘stream_local_buffer_release_callback’:
../egl-wayland/src/wayland-eglsurface.c:937:9: error: called object is not a function or function pointer
  937 |         data->egl.streamReleaseImage(display->devDpy->eglDisplay,
      |         ^~~~
../egl-wayland/src/wayland-eglsurface.c: In function ‘acquire_surface_image’:
../egl-wayland/src/wayland-eglsurface.c:974:10: error: called object is not a function or function pointer
  974 |     if (!data->egl.streamAcquireImage(dpy,
      |          ^~~~
../egl-wayland/src/wayland-eglsurface.c:1057:5: error: called object is not a function or function pointer
 1057 |     data->egl.streamReleaseImage(dpy,
      |     ^~~~
../egl-wayland/src/wayland-eglsurface.c: In function ‘add_surface_image’:
../egl-wayland/src/wayland-eglsurface.c:1123:39: error: ‘EGL_STREAM_CONSUMER_IMAGE_NV’ undeclared (first use in this function); did you mean ‘EGL_STREAM_CONSUMER_NV’?
 1123 |                                       EGL_STREAM_CONSUMER_IMAGE_NV,
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       EGL_STREAM_CONSUMER_NV
../egl-wayland/src/wayland-eglsurface.c:1123:39: note: each undeclared identifier is reported only once for each function it appears in
../egl-wayland/src/wayland-eglsurface.c: In function ‘wlEglHandleImageStreamEvents’:
../egl-wayland/src/wayland-eglsurface.c:1206:15: error: called object is not a function or function pointer
 1206 |         err = data->egl.queryStreamConsumerEvent(dpy,
      |               ^~~~
../egl-wayland/src/wayland-eglsurface.c:1226:14: error: ‘EGL_STREAM_IMAGE_AVAILABLE_NV’ undeclared (first use in this function)
 1226 |         case EGL_STREAM_IMAGE_AVAILABLE_NV:
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../egl-wayland/src/wayland-eglsurface.c:1229:14: error: ‘EGL_STREAM_IMAGE_ADD_NV’ undeclared (first use in this function); did you mean ‘EGL_STREAM_DMA_SERVER_NV’?
 1229 |         case EGL_STREAM_IMAGE_ADD_NV:
      |              ^~~~~~~~~~~~~~~~~~~~~~~
      |              EGL_STREAM_DMA_SERVER_NV
../egl-wayland/src/wayland-eglsurface.c:1233:14: error: ‘EGL_STREAM_IMAGE_REMOVE_NV’ undeclared (first use in this function); did you mean ‘EGL_STREAM_DMA_SERVER_NV’?
 1233 |         case EGL_STREAM_IMAGE_REMOVE_NV:
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |              EGL_STREAM_DMA_SERVER_NV
../egl-wayland/src/wayland-eglsurface.c: In function ‘create_surface_stream_local’:
../egl-wayland/src/wayland-eglsurface.c:1280:10: error: called object is not a function or function pointer
 1280 |     if (!data->egl.streamImageConsumerConnect(dpy,
      |          ^~~~
At top level:
../egl-wayland/src/wayland-eglsurface.c:1245:15: error: ‘create_surface_stream_local’ defined but not used [-Werror=unused-function]
 1245 | static EGLint create_surface_stream_local(WlEglSurface *surface)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~

failed to lock pthread mutex

Hi!

I'm hitting a segfault while trying to open Evolution (Mail client) under wayland. I've reported the segfault on the Fedora bugzilla [1] and since it looks like they can't track it down, we decided to report it here.

Here's the stack trace:

(gdb) bt full
#0  0x00007ffff3a9c625 in raise () at /lib64/libc.so.6
#1  0x00007ffff3a858d9 in abort () at /lib64/libc.so.6
#2  0x00007ffff3a857a9 in _nl_load_domain.cold () at /lib64/libc.so.6
#3  0x00007ffff3a94a66 in annobin_assert.c_end () at /lib64/libc.so.6
#4  0x00007fffe4109b7d in wlExternalApiLock () at ../src/wayland-thread.c:87
        __PRETTY_FUNCTION__ = "wlExternalApiLock"
#5  0x00007fffe410e4ab in wlEglGetInternalHandleExport (dpy=0x5555566dad60, type=13233, handle=0x5555566dad60) at ../src/wayland-eglhandle.c:146
#6  0x00007fffd65574ef in  () at /lib64/libEGL_nvidia.so.0
#7  0x00007fffd64deeeb in  () at /lib64/libEGL_nvidia.so.0
#8  0x00007fffe410b752 in wl_eglstream_display_bind (data=data@entry=0x5555566cc5c0, wlDisplay=wlDisplay@entry=0x55555649b360, eglDisplay=eglDisplay@entry=0x5555566dad60)
    at ../src/wayland-eglstream-server.c:311
        wlStreamDpy = 0x555556b69f90
        exts = 0x0
        env = 0x0
#9  0x00007fffe410a355 in wlEglBindDisplaysHook (data=0x5555566cc5c0, dpy=0x5555566dad60, nativeDpy=0x55555649b360) at ../src/wayland-egldisplay.c:87
        res = 0
#10 0x00007fffd65533f3 in  () at /lib64/libEGL_nvidia.so.0
#11 0x00007fffd64db775 in  () at /lib64/libEGL_nvidia.so.0
#12 0x00007ffff20f5b11 in WS::Instance::initialize(void*) () at /lib64/libWPEBackend-fdo-1.0.so.1
#13 0x00007ffff49c7bf6 in WebKit::WebProcessPool::platformInitializeWebProcess(WebKit::WebProcessProxy const&, WebKit::WebProcessCreationParameters&) (this=this@entry=0x7fffe42ee000, process=
    ..., parameters=...) at ../Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:119
#14 0x00007ffff489adfa in WebKit::WebProcessPool::initializeNewWebProcess(WebKit::WebProcessProxy&, WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed)
    (this=<optimized out>, process=..., websiteDataStore=0x7fffe42e4000, isPrewarmed=WebKit::WebProcessProxy::IsPrewarmed::No) at ../Source/WebKit/UIProcess/WebProcessPool.cpp:1044
        initializationActivity = {m_ref = std::unique_ptr<WebKit::ProcessThrottler::Activity<(WebKit::ProcessThrottler::ActivityType)0>> = {get() = 0x0}}
        parameters = <snip here>

If you need any information, i'll gladly help.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1842473

Hard to reproduce freezes in firefox

I've been facing this issue on wayland (sway) for some time now. It can either be a "permanent" lockup (no amount of resizing or moving windows around helps) or a temporary lockup fixed by either resizing or sending the window to another workspace. The former happens mostly when using an extension like bitwarden, while the latter happens when shifting windows around. Both are super rare though, and I have no idea what exactly triggers them.

I'll try to get sway, firefox and WAYLAND_DEBUG logs but this is all I have for now. The freeze in linked video was produced by trying these steps ~10-15 times:

  1. Have two firefox windows, one with default profile and one with another profile in tabbed layout in sway, in workspace 1
  2. Switch to workspace 2, open foot and send it to workspace 1
  3. foot now is added under the tabbed layout
  4. move foot out of the tabbed layout to a separate window on the right
  5. the rightmost tabbed firefox window freezes until resized

Worth nothing that the permanent lockup mentioned at the beginning of the issue occurred with a simple setup - single firefox window with foot terminal open on the right when I opened bitwarden, so it's not isolated to weird window arrangements like this one. The UI is frozen but input events are still acted upon.

Video: https://0x0.st/o4rm.mp4

recording.mp4
wayland 1.21.0
egl-wayland 1.1.11
libglvnd 1.5.0
mesa 22.2.0
nvidia 515.76

Related firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1752717 (This is confirmed fixed with new egl-wayland, but the issue I describe here is not)

Crashes when windows are resized on HEAD

resizing windows on the latest commit bf86b94 appears to cause many applications to crash. Including obs-studio, firefox, and this trivial wayland example

Release 1.1.10 does not appear to have this regression

-- edit
Testing was done on wlroots/sway (c20468cfa, a55472c6 respectively)

`env->egl_display = eglGetDisplay((EGLNativeDisplayType)wl_display)` return NULL

Hi,

I am having a problem using the EGL implementation, I am running on Ubuntu 16.04 and using nvidia-387 driver. I am having trouble using the EGL wayland platform on my machine.

I installed the library under /usr/local and created /usr/share/egl_external_platform.d/10_nvidia.json. and the EGL library came with the system.

I couldn't get a valid EGLDisplay handle using either eglGetDisplay or eglGetPlatformDisplay. I hope to know if there is anything missing with the system setup to get the program to run? Also the result of eglQueryString(EGL_NO_DISPLAY', EGL_EXTENSIONS) gave me: EGL_EXT_platform_base EGL_EXT_device_base EGL_KHR_debug EGL_EXT_platform_x11 EGL_EXT_platform_device. Is this because of the system driver problem?

Thank you very much.

libnvidia-egl-wayland.so doesn't export wl_eglstream_controller_interface anymore

I might be missing something, but it seems that after 1fdde29, libnvidia-egl-wayland.so isn't exporting the wl_eglstream_controller_interface symbol anymore. mutter looks for this symbol in https://gitlab.gnome.org/GNOME/mutter/blob/master/src/wayland/meta-wayland-egl-stream.c#L91. Using a branch that has all commits up to 1676d1d but excluding the meson fixes (newer commits cherry-picked), things work fine.

This short program may be used for testing (use -ldl):

#include <dlfcn.h>
#include <stdio.h>

void main() {
    void *lib = dlopen("libnvidia-egl-wayland.so.1", RTLD_NOW);
    if(lib == NULL) {
        printf("lib not found\n");
        return;
    }

    void *if_ptr = dlsym(lib, "wl_eglstream_controller_interface");
    if(if_ptr == NULL) {
        printf("wl_eglstream_controller_interface not found\n");
        return;
    }

    printf("ok\n");
}

/src/wayland-eglsurface.c:1521:10: error: use of undeclared identifier 'EGL_WAYLAND_Y_INVERTED_WL'

I'm compiling egl-wayland-1.14 with LLVM/clang and latest wayland-1.18.0

All the details can be found here: https://abf.openmandriva.org/build_lists/713883

FAILED: src/25a6634@@nvidia-egl-wayland@sha/wayland-eglsurface.c.o 
/usr/bin/clang -Isrc/25a6634@@nvidia-egl-wayland@sha -Isrc -I../src -I../include -I../wayland-egl -Iwayland-eglstream -I/usr/include/EGL -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wall -fvisibility=hidden -DWL_HIDE_DEPRECATED -Wno-pedantic -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -fPIC -pthread -MD -MQ 'src/25a6634@@nvidia-egl-wayland@sha/wayland-eglsurface.c.o' -MF 'src/25a6634@@nvidia-egl-wayland@sha/wayland-eglsurface.c.o.d' -o 'src/25a6634@@nvidia-egl-wayland@sha/wayland-eglsurface.c.o' -c ../src/wayland-eglsurface.c
../src/wayland-eglsurface.c:1521:10: error: use of undeclared identifier 'EGL_WAYLAND_Y_INVERTED_WL'
    case EGL_WAYLAND_Y_INVERTED_WL:
         ^
1 error generated.

meson can't find dlsym

if trying to build via meson, it complains that there's no dlsym function. But the compile operation is missing the -ldl flag.

Using configure/make works fine and adds the parameters correctly.

Surface creation deadlocks with in-process Wayland client

Hi there! In the Mir compositor library we use some in-process Wayland clients for various tasks. Unfortunately, that now deadlocks, as 92f5fe5 removed the “unlock the ExternalAPI mutex while calling into Wayland” logic.

Specifically, calling eglCreatePlatformWindow takes the ExternalAPI mutex and performs a roundtrip; on the other end of that (in the same process, so sharing the same ExternalAPI mutex) the server eventloop calls the attach_egl_consumer handler, which calls eglCreateStreamAttribNV(), which calls into wlEglCreateStreamAttribHook, which calls wlExternalApiLock()

Compile error export-buf.c:152:81: error: ‘EGL_DRM_RENDER_NODE_FILE_EXT’ undeclared

besitzer@MSI:~/nvidia-vaapi-driver$ sudo meson install -C build
ninja: Entering directory `/home/besitzer/nvidia-vaapi-driver/build'
[4/12] Compiling C object nvidia_drv_video.so.p/src_export-buf.c.o
FAILED: nvidia_drv_video.so.p/src_export-buf.c.o 
cc -Invidia_drv_video.so.p -I. -I.. -I/usr/local/include -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -std=c11 -g -fPIC -pthread -MD -MQ nvidia_drv_video.so.p/src_export-buf.c.o -MF nvidia_drv_video.so.p/src_export-buf.c.o.d -o nvidia_drv_video.so.p/src_export-buf.c.o -c ../src/export-buf.c
../src/export-buf.c: In function ‘findCudaDisplay’:
../src/export-buf.c:152:81: error: ‘EGL_DRM_RENDER_NODE_FILE_EXT’ undeclared (first use in this function); did you mean ‘EGL_DRM_DEVICE_FILE_EXT’?
  152 |                 const char* drmDeviceFile = eglQueryDeviceStringEXT(devices[i], EGL_DRM_RENDER_NODE_FILE_EXT);
      |                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                 EGL_DRM_DEVICE_FILE_EXT
../src/export-buf.c:152:81: note: each undeclared identifier is reported only once for each function it appears in
[6/12] Compiling C object nvidia_drv_video.so.p/src_h264.c.o
../src/h264.c: In function ‘computeH264CudaCodec’:
../src/h264.c:115:5: warning: ‘VAProfileH264Baseline’ is deprecated [-Wdeprecated-declarations]
  115 |     if (profile == VAProfileH264Baseline || profile == VAProfileH264ConstrainedBaseline || profile == VAProfileH264Main || profile == VAProfileH264High) {
      |     ^~
In file included from /usr/include/va/va_backend.h:32,
                 from ../src/vabackend.h:5,
                 from ../src/h264.c:1:
/usr/include/va/va.h:503:5: note: declared here
  503 |     VAProfileH264Baseline va_deprecated_enum = 5,
      |     ^~~~~~~~~~~~~~~~~~~~~
../src/h264.c: At top level:
../src/h264.c:127:5: warning: ‘VAProfileH264Baseline’ is deprecated [-Wdeprecated-declarations]
  127 |     VAProfileH264Baseline,
      |     ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/va/va_backend.h:32,
                 from ../src/vabackend.h:5,
                 from ../src/h264.c:1:
/usr/include/va/va.h:503:5: note: declared here
  503 |     VAProfileH264Baseline va_deprecated_enum = 5,
      |     ^~~~~~~~~~~~~~~~~~~~~
[11/12] Compiling C object nvidia_drv_video.so.p/src_vabackend.c.o
../src/vabackend.c: In function ‘nvQueryConfigProfiles’:
../src/vabackend.c:303:9: warning: ‘VAProfileH264Baseline’ is deprecated [-Wdeprecated-declarations]
  303 |         profile_list[profiles++] = VAProfileH264Baseline;
      |         ^~~~~~~~~~~~
In file included from /usr/include/va/va_backend.h:32,
                 from ../src/vabackend.h:5,
                 from ../src/vabackend.c:3:
/usr/include/va/va.h:503:5: note: declared here
  503 |     VAProfileH264Baseline va_deprecated_enum = 5,
      |     ^~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Could not rebuild /home/besitzer/nvidia-vaapi-driver/build

Calling wl_egl_window_resize from different thread broken

If wl_egl_window_resize() is called from a thread other than the one the window's EGLSurface is Current on, the state of which surface is current on which thread can get messed up.

See:
libsdl-org/SDL#4821 (comment)

Deferring the resize until eglSwapBuffers does appear to work as a workaround for this.

This breaks a number of games when run under Wayland, particularly:

Both of which will hang on startup.

With SDL using wayland by default now, this will start to affect any of these games which update to the latest SDL version.

Chromium failing with: Drm prime capability is not supported

I'm attempting to get my VA-API implementation working within Chromium, but I'm having a slight issue. When started under GNOME 42 with the --use-gl=egl parameter, Chromium prints the following error:

Drm prime capability is not supported

From what I can determine that error is because the capabilities field in the wl_drm extension is 0, and this is the library that's setting that value (I can't find anything in mutter related to it). Firstly, is this correct?

It seems Chromium with the EGL backend is relying on wl_drm to allocate buffers directly and pass them into VA-API. This is similar to Chromium on X11 with EGL which attempts to use DRI3 open to get the DRM device. Chromium's implementation is here.

My second question is: Can this be made to work? I'm not sure I fully understand why the wl_drm extension is implemented in EGL, but shouldn't it be possible to implement all of the wl_drm interface now that you have a GBM implementation?

Newer versions cause GTK4 applications to stop updating their UI

I initially thought this was a Mutter issue until they suggested downgrading egl-wayland to 1.1.7 and that fixed it.

https://gitlab.gnome.org/GNOME/mutter/-/issues/2241#note_1458542

The issue is that Gnome Software and Celluloid, both GTK4 applications, will stop updating their UI. The applications will appear to freeze but it's just because the visuals stopped updating. All the buttons, scrolling, etc, all work fine behind that.

With Gnome Software it will happen when downloading updates. It will freeze but I can still click the list of updates and get a pop-ups for the changes to each application. Scrolling a down long list will show no visual representation of scrolling but click on items in the list will show you changes for applications higher up on the list. Closing the application by clicking the X in the top right corner also works.

Celluloid crashes just by jumping the play head around a file. It will happen after a few tries. After that, you can still jump around, play other files, etc. but there will be no visual change.

I'm on Fedora 36 and experienced the issue with egl-wayland-1.1.9-4 on my GTX 1070.

Segfault when resizing kitty windows

After the update egl-wayland-2:1.1.10-1 -> egl-wayland-2:1.1.11-1 on Arch Linux kitty results in a segfault when trying to resize a window:
kovidgoyal/kitty#5480

Stack Trace
[🡕] Process 3527 (kitty) of user 1000 dumped core.
                                                    
Module linux-vdso.so.1 with build-id 94e80f320f814d6d828c4119a150654d1dc7ec83
Module _posixsubprocess.cpython-310-x86_64-linux-gnu.so with build-id 6a4d1002c0f1ad3b3d1a778455ffceccd96c0a7d
Module libXdmcp.so.6 with build-id d864159ab0008415667db8d5f251696d75c90df2
Module libXau.so.6 with build-id d9d5e8277140f1a86d3a07d9b52b1703c0a2f9a8
Module libxshmfence.so.1 with build-id d9b3ce4edb0b6a0818bcc57dda020d2da5e3c895
Module libxcb-sync.so.1 with build-id 13025f6de23a271636ad321c77eda98801e62e8e
Module libxcb-present.so.0 with build-id 8ed389d9cd6ad7110fbb00c93b32e0efaa71a6b1
Module libxcb-dri3.so.0 with build-id 088c750254cc139e7d62b8a3fc7795a138447ccf
Module libxcb-xfixes.so.0 with build-id e231a68d00ee4cfa12a2c31e755a9e2c1e7be450
Module libxcb-dri2.so.0 with build-id 7bde0abc84135ae6258a8d1d130864071c2cc327
Module libxcb.so.1 with build-id 13d677412a71468381b11092915d231f664d18d3
Module libX11-xcb.so.1 with build-id f92352eae0a30aea89d11beb22367fa985288925
Module libglapi.so.0 with build-id 9b42618e3cc263ace53cf4feb85b20a25741fcdc
Module libEGL_mesa.so.0 with build-id 1a92abfd7532c2dc76f48230ffb5221ac1a8617e
Module libgbm.so.1 with build-id 44e2bb9854e465dac48209b87e86bf0499c41be7
Module libdrm.so.2 with build-id 356062bd182635dcd90b1bcc5c260c08d00c034f
Module libnvidia-egl-gbm.so.1 with build-id 6ca12a03323ba36ee09427dab2cd23c88830fcfd
Module libnvidia-eglcore.so.515.65.01 with build-id 8315e599002af415b67eddf92ecbfb24af41775f
Module libwayland-server.so.0 with build-id 4c54fc8a7c0d4eb8adf2a69e44ebf12d16969c74
Module libnvidia-egl-wayland.so.1 with build-id 822c63deb25f1ee8b02c55226e2242e2ee28f414
Module libnvidia-glsi.so.515.65.01 with build-id 5c864cf78fead62c3b603506941dbcdae609fab8
Module libdl.so.2 with build-id 3b5b9c7c3efd20001319657d1972e90e853984e2
Module librt.so.1 with build-id d5760a2d214d5bd2703337bdc13d500144f29b52
Module libEGL_nvidia.so.0 with build-id b03a0c97af182db8c3e7f74f2519807dcd4577f5
Module libGLdispatch.so.0 with build-id 9901dca23d6ccd49929b5f44c81cd671f1ec6757
Module libEGL.so.1 with build-id d4e8037e21617b4005fd99bf9464b3d3f4c3dd35
Module libexpat.so.1 with build-id 113bb5a3e9ad856801bfcfc029102c9bdc13d67e
Module libfontconfig.so with build-id 36be6951b8c1e42a7dd05684a37400fc8ef9147c
Module libwayland-egl.so.1 with build-id dd02a2af320297e68308cc698f75828529271a57
Module libwayland-cursor.so.0 with build-id 46a637dbcbb02d6712a201f177377b66598b9121
Module libgpg-error.so.0 with build-id 4738b8a9478177c202cccd64e0eb65d3dea2bfae
Module liblz4.so.1 with build-id 84ea95d811dad359e94e100ebe6a746294ffe8a7
Module libzstd.so.1 with build-id ab54c2881f53ab314e134f3e08c76d504376dd5d
Module libgcrypt.so.20 with build-id 8bf3cb884124273640de797a3e77d86c98434ea4
Module libcap.so.2 with build-id 1f87347b85b55db2f75a2ecea5cb45d846dc7093
Module libsystemd.so.0 with build-id a664cbc6b724392704b96360284c40664d8d4c99
Module libdbus-1.so.3 with build-id 7f4b16b4b407cbae2d7118d6f99610e29a18a56a
Module libxkbcommon.so.0 with build-id 6cf66eead3fcc20fe5df10162bfbcdcdc8b2a183
Module libwayland-client.so.0 with build-id 515c72111400d7bdbfbdfcec78d597e4986a5943
Module glfw-wayland.so with build-id f91a932749d45723a2aee0a89fb5eb9a158f1c56
Module _socket.cpython-310-x86_64-linux-gnu.so with build-id 634ff1b6ade33f72b188084953f562d3134cfd64
Module libssl.so.1.1 with build-id e6b1f97a5b60b4248c49dfc5b11f53f281b507d0
Module _ssl.cpython-310-x86_64-linux-gnu.so with build-id 8da313c3d5a96bf16f6ecab4c55518157491f0c5
Module libffi.so.8 with build-id f0a9586cf0f42d2b9971bd1065ca3a6b19f4a2c2
Module _ctypes.cpython-310-x86_64-linux-gnu.so with build-id 217817e56e6beca84ecf00f3f8070af1d8c9bfb0
Module _sha512.cpython-310-x86_64-linux-gnu.so with build-id 0b9c51463b81eb72af8d1b36bd8822490155e8cb
Module _random.cpython-310-x86_64-linux-gnu.so with build-id 8cc4f9833f0727aedc0ab0f12499ba05d71eb790
Module _bisect.cpython-310-x86_64-linux-gnu.so with build-id 35b582c11cf1d75153f685941e2f19e6b772fe5c
Module _blake2.cpython-310-x86_64-linux-gnu.so with build-id b78c627822d6727906324aadb274f371771ca2bd
Module _hashlib.cpython-310-x86_64-linux-gnu.so with build-id 58fbe0b0412336a3fe674abb233c6e1e6a2d6bc9
Module mmap.cpython-310-x86_64-linux-gnu.so with build-id f4b79dc433c2310a778cd545f7e30215696be1a8
Module _opcode.cpython-310-x86_64-linux-gnu.so with build-id 16c688e161dc7186c615fe078ced2ba5c639c355
Module termios.cpython-310-x86_64-linux-gnu.so with build-id d18880872276b66fda04cacfdacdf5b01b9e29b8
Module select.cpython-310-x86_64-linux-gnu.so with build-id 3268a89a6f99e97ecaffea90a520d122bd08f839
Module array.cpython-310-x86_64-linux-gnu.so with build-id 3d9362fd41af470b1d406ce6df817be35472c5f9
Module _json.cpython-310-x86_64-linux-gnu.so with build-id af64ea16f6d76f2681b7c140865cc747436f94ce
Module binascii.cpython-310-x86_64-linux-gnu.so with build-id 184aa8e19a9507a8dfd2480e804e0e5f75188f56
Module _struct.cpython-310-x86_64-linux-gnu.so with build-id ca8a852b5db81a217f6ad6e71f5f053a15c03253
Module math.cpython-310-x86_64-linux-gnu.so with build-id e37c9d6446b7395aadd15b5af9aabb1dcedf636e
Module fcntl.cpython-310-x86_64-linux-gnu.so with build-id 9f3f2985472aed1b8ddaf269360985c37195a9bc
Module libbrotlicommon.so.1 with build-id acfd597a977c8087bb6184383daae2e828a9ce42
Module libpcre.so.1 with build-id 10d377210d07112c78388fd15b6c25f2bf4110c4
Module libbrotlidec.so.1 with build-id 66c54e9301f7e102ecc1d88547e5f0e8a056fe22
Module libpthread.so.0 with build-id 135923f9a38592e2e90692c8191278a166f86569
Module libglib-2.0.so.0 with build-id 898773b9f59cbaa435131f67db1ce0537d75647a
Module libgraphite2.so.3 with build-id ce58945ebb55b86d3a4e717b6eae29efc4720d8e
Module libfreetype.so.6 with build-id f89dd5502e75aca28fb5c3ccd0dbd26fe822bfef
Module libgcc_s.so.1 with build-id 85db482c4585a328d95ec41124337a967bb24d8f
Module libcrypto.so.1.1 with build-id 7981ea3d69f3c28e46ee312a815af96eab93775c
Module liblcms2.so.2 with build-id c01e5649a38dbf37768d02dc751b52de0dcbd141
Module libpng16.so.16 with build-id 2dc0bce07f199bf983c07a05fb95a6f4af83a9b3
Module libharfbuzz.so.0 with build-id 236ab65053439e673a39fcb7aadedb28b17a338a
Module fast_data_types.so with build-id 1fdaab4d55c48e851c0980d535ecdd976698fca7
Module liblzma.so.5 with build-id d08f5868cd5adcc6b7c53bf1725aac65bd4539cd
Module _lzma.cpython-310-x86_64-linux-gnu.so with build-id 34ff24d3e03342cbd504433a196247171ce1ade1
Module libbz2.so.1.0 with build-id 919597c477c9b2cb9cdbb7745ed6494ac0e6da60
Module _bz2.cpython-310-x86_64-linux-gnu.so with build-id a7798d8aae45ab117bfc9b71d4d99300fae10dba
Module libz.so.1 with build-id fefe3219a96d682ec98fcfb78866b8594298b5a2
Module zlib.cpython-310-x86_64-linux-gnu.so with build-id 39314d7667d26b5aed42cc540deab6c0116eb64b
Module ld-linux-x86-64.so.2 with build-id da64753d57bf3801827448f53d911b041568e727
Module libm.so.6 with build-id 0b8d43ea2dae21a1c5e44c3f0a9dc2fb292d27c0
Module libc.so.6 with build-id 9c28cfc869012ebbd43cdb0f1eebcd14e1b8bdd8
Module libpython3.10.so.1.0 with build-id 9299e39e864db6becea79ec4bac9efbc75bcf756
Module kitty with build-id 63e8c2668716f686f41c276d3d9cae4f38ce60ad
Stack trace of thread 3527:
#0  0x00007fb1764384dc n/a (libc.so.6 + 0x884dc)
#1  0x00007fb1763e8998 raise (libc.so.6 + 0x38998)
#2  0x00007fb1763d253d abort (libc.so.6 + 0x2253d)
#3  0x00007fb17642c67e n/a (libc.so.6 + 0x7c67e)
#4  0x00007fb17644226c n/a (libc.so.6 + 0x9226c)
#5  0x00007fb176446f24 realloc (libc.so.6 + 0x96f24)
#6  0x00007fb17699242e n/a (ld-linux-x86-64.so.2 + 0x1142e)
#7  0x00007fb176992b3c _dl_allocate_tls_init (ld-linux-x86-64.so.2 + 0x11b3c)
#8  0x00007fb176436c90 pthread_create (libc.so.6 + 0x86c90)
#9  0x00007fb173dba3a9 n/a (libnvidia-egl-wayland.so.1 + 0x73a9)
#10 0x00007fb173dbc995 n/a (libnvidia-egl-wayland.so.1 + 0x9995)
#11 0x00007fb173aa865e n/a (libEGL_nvidia.so.0 + 0xa865e)
#12 0x00007fb173a47b80 n/a (libEGL_nvidia.so.0 + 0x47b80)
#13 0x00007fb1755efce1 n/a (fast_data_types.so + 0x17ce1)
#14 0x00007fb17473ef7b glfwRunMainLoop (glfw-wayland.so + 0x10f7b)
#15 0x00007fb1755e8a3c n/a (fast_data_types.so + 0x10a3c)
#16 0x00007fb1766efbc4 n/a (libpython3.10.so.1.0 + 0x158bc4)
#17 0x00007fb1766dca2a _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x145a2a)
#18 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#19 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#20 0x00007fb1766e59ab _PyObject_FastCallDictTstate (libpython3.10.so.1.0 + 0x14e9ab)
#21 0x00007fb1766f603d _PyObject_Call_Prepend (libpython3.10.so.1.0 + 0x15f03d)
#22 0x00007fb1767c2b52 n/a (libpython3.10.so.1.0 + 0x22bb52)
#23 0x00007fb1766e66cb _PyObject_MakeTpCall (libpython3.10.so.1.0 + 0x14f6cb)
#24 0x00007fb1766e1414 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x14a414)
#25 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#26 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#27 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#28 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#29 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#30 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#31 0x00007fb1766db240 n/a (libpython3.10.so.1.0 + 0x144240)
#32 0x00007fb17678ab74 PyEval_EvalCode (libpython3.10.so.1.0 + 0x1f3b74)
#33 0x00007fb176790edb n/a (libpython3.10.so.1.0 + 0x1f9edb)
#34 0x00007fb1766ed50f n/a (libpython3.10.so.1.0 + 0x15650f)
#35 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#36 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#37 0x00007fb1766dc5f6 _PyEval_EvalFrameDefault (libpython3.10.so.1.0 + 0x1455f6)
#38 0x00007fb1766ed319 _PyFunction_Vectorcall (libpython3.10.so.1.0 + 0x156319)
#39 0x00007fb1767ae9d7 n/a (libpython3.10.so.1.0 + 0x2179d7)
#40 0x00007fb17662cf85 n/a (libpython3.10.so.1.0 + 0x95f85)
#41 0x00005646e3acf567 main (kitty + 0x2567)
#42 0x00007fb1763d32d0 n/a (libc.so.6 + 0x232d0)
#43 0x00007fb1763d338a __libc_start_main (libc.so.6 + 0x2338a)
#44 0x00005646e3acf605 _start (kitty + 0x2605)

Stack trace of thread 3617:
#0  0x00007fb176433346 n/a (libc.so.6 + 0x83346)
#1  0x00007fb176435b60 pthread_cond_wait (libc.so.6 + 0x85b60)
#2  0x00007fb173ab8da8 n/a (libEGL_nvidia.so.0 + 0xb8da8)
#3  0x00007fb173a89e91 n/a (libEGL_nvidia.so.0 + 0x89e91)
#4  0x00007fb173abeade n/a (libEGL_nvidia.so.0 + 0xbeade)
#5  0x00007fb17643678d n/a (libc.so.6 + 0x8678d)
#6  0x00007fb1764b78e4 __clone (libc.so.6 + 0x1078e4)

Stack trace of thread 3618:
#0  0x00007fb1764aae9f __poll (libc.so.6 + 0xfae9f)
#1  0x00007fb173db8336 n/a (libnvidia-egl-wayland.so.1 + 0x5336)
#2  0x00007fb17643678d n/a (libc.so.6 + 0x8678d)
#3  0x00007fb1764b78e4 __clone (libc.so.6 + 0x1078e4)

Stack trace of thread 3533:
#0  0x00007fb1764aae9f __poll (libc.so.6 + 0xfae9f)
#1  0x00007fb171ff13c7 n/a (libnvidia-eglcore.so.515.65.01 + 0xdf13c7)
#2  0x00007fb171fefd2a n/a (libnvidia-eglcore.so.515.65.01 + 0xdefd2a)
#3  0x00007fb17643678d n/a (libc.so.6 + 0x8678d)
#4  0x00007fb1764b78e4 __clone (libc.so.6 + 0x1078e4)

Stack trace of thread 3604:
#0  0x00007fb176433346 n/a (libc.so.6 + 0x83346)
#1  0x00007fb176435b60 pthread_cond_wait (libc.so.6 + 0x85b60)
#2  0x00007fb173ab8da8 n/a (libEGL_nvidia.so.0 + 0xb8da8)
#3  0x00007fb173a89e91 n/a (libEGL_nvidia.so.0 + 0x89e91)
#4  0x00007fb173abeade n/a (libEGL_nvidia.so.0 + 0xbeade)
#5  0x00007fb17643678d n/a (libc.so.6 + 0x8678d)
#6  0x00007fb1764b78e4 __clone (libc.so.6 + 0x1078e4)

Stack trace of thread 3537:
#0  0x00007fb1764aae9f __poll (libc.so.6 + 0xfae9f)
#1  0x00007fb1755e9a65 n/a (fast_data_types.so + 0x11a65)
#2  0x00007fb17643678d n/a (libc.so.6 + 0x8678d)
#3  0x00007fb1764b78e4 __clone (libc.so.6 + 0x1078e4)
ELF object binary architecture: AMD x86-64

Reverting to egl-wayland-2:1.1.10-1 fixes this issue.

Nvidia driver 515.65.01-12 and kernel `5.19.7-arch1-1

[BUG] Ver 1.1.8-1 breaks plasma wayland

The bug

After upgrading from 1.1.7-1 logging in through sddm with plasma Wayland session selected, the desktop is fully missing. The cursor is visible and can be moved, and moving it to the top-left corner displays the blue desktop switching indicator, but no other visual elements are present and no applications can be started.

Reproducing the bug

OS - Archlinux

Install SDDM, plasma-desktop and nvidia-dkms. Downgrade egl-wayland to ver1.1.7-1 and reboot. This time the desktop works. Upgrade egl-wayland to ver1.1.8-1, reboot and this time the above described will happen.

Haven't checked how to debug this yet, any help would be appreciated!

1.1.8 causes massive slowdown in opening new Alacritty windows

The egl-wayland upgrade from 1.1.7 to 1.1.8 was identified to be the cause of the massive slowdown in opening new Alacritty windows here:

alacritty/alacritty#5608

The verbose logs are provided in that bug report.

The relevant line is:

[2021-11-14 12:51:44.031082609] [INFO ] [alacritty] Device pixel ratio: 1

Everything appears to freeze for 3-5 seconds right before this line.

I'm not sure how I can gather more information for troubleshooting, so please advise.

plasma wayland broken on nvidia-drivers 470

Hi There ! :)

I'm Using a Few Instances of Gentoo Linux OS - All On This Desktop PC:

System:
  Kernel: 5.17.0-gentoo x86_64 bits: 64
    Desktop: KDE Plasma 5.24.3 Distro: Gentoo Base System release 2.8
Machine:
  Type: Desktop Mobo: HUANANZHI model: X99-F8 GAMING v: V2.0
    UEFI: American Megatrends v: 5.11 date: 12/13/2021
CPU:
  Info: 12-core model: Intel Xeon E5-2673 v3 bits: 64 type: MT MCP cache: L2: 3 MiB
Graphics:
  Device-1: NVIDIA GK107GL [Quadro K600] driver: nvidia v: 470.103.01
  Firmware: 80.07.c5.00.0c
  Display: wayland server: X.Org 1.22.1 driver: loaded: nvidia
    resolution: 1920x1080~60Hz
  OpenGL: renderer: Quadro K600/PCIe/SSE2 v: 4.6.0 NVIDIA 470.103.01

a Few Weeks Ago, Just After SW Upgrading an Instance, I've Found That The 'KDE-Plasma on Wayland' System Turned To SW Rendering (via Mesa/LLVMpipe), Even Though Driver-Level HW Acceleration Was Enabled & Functional - Just As It Was Before, As Also Evident By a Fully Functional HW Accelerated 'KDE-Plasma on X11' System (That's Co-Installed).

a Bit of Probing & Poking Later, I've Discovered That The Most Likely Culprit Is Somewhere In Between NVIDIA's driver & egl-wayland libs. ...

Some Good Advice Would Be Highly Appreciated ! :)

Some SW Vers. :

KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

Env. Vars. (Relevant) :

EGL_PLATFORM=wayland
GDK_BACKEND=wayland
KWIN_COMPOSE=O
KWIN_DRM_USE_EGL_STREAMS=1
KWIN_OPENGL_INTERFACE=egl
QT_QPA_PLATFORM=wayland-egl
SDL_VIDEODRIVER=wayland
WAYLAND_DISPLAY=wayland-0
XDG_SESSION_TYPE=wayland
__GLX_VENDOR_LIBRARY_NAME=nvidia

'KDE-Plasma on Wayland' System - Launch Command:

dbus-launch --exit-with-session startplasma-wayland --drm --xwayland > ./startplasma-wayland.log 2>&1

startplasma-wayland.log (Relevant) :

OpenGL vendor string:                   Mesa/X.org
OpenGL renderer string:                 llvmpipe (LLVM 13.0.1, 256 bits)
OpenGL version string:                  4.5 (Core Profile) Mesa 21.3.7
OpenGL shading language version string: 4.50
Driver:                                 LLVMpipe
GPU class:                              Unknown
OpenGL version:                         4.5
GLSL version:                           4.50
Mesa version:                           21.3.7
Linux kernel version:                   5.17
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_wayland_drm: Failed to create gamma blob! Invalid argument
Failed to initialize glamor, falling back to sw
kdeinit5: opened connection to :0

'eglinfo' Output - On Wayland (Relevant) :

Wayland platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
--

X11 platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
--

Device platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL

'eglinfo' Output - On X11 (Relevant) :

X11 platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
--

Device platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL

'glxinfo' Output - On Wayland (Relevant) :

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
--
    GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
    GLX_SGI_make_current_read
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
--
    Dedicated video memory: 1024 MB
    Total available memory: 1024 MB
    Currently available dedicated video memory: 957 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro K600/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.103.01

'glxinfo' Output - On X11 (Relevant) :

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
--
    GLX_NV_robustness_video_memory_purge, GLX_NV_swap_group, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control, 
    GLX_SGI_video_sync
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
--
    Dedicated video memory: 1024 MB
    Total available memory: 1024 MB
    Currently available dedicated video memory: 622 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro K600/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.103.01

Help with compositor and server

Hi,

I've written a wayland server and compositor, I'd like to add EGLStreams support, I'm unsure how to do this using egl-wayland. How does it hook into the wayland server code?

Some guidance would be appreciated.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.