Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941094 - virt-manager virgl does not work with nvidia drivers
Summary: virt-manager virgl does not work with nvidia drivers
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-07 01:57 UTC by Kenny Bentley
Modified: 2024-10-10 22:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New lddtree result and attempt ti rebuild GTK with -wayland USE flag (lddtree-rebuild-gtk,36.32 KB, text/plain)
2024-10-07 07:38 UTC, Kenny Bentley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Bentley 2024-10-07 01:57:47 UTC
I was trying to set up VirtIO and VirGL in virt-manager and kept getting errors about not being able to initialize EGL. Microsoft Copilot of all things suggested running "ldd /usr/bin/qemu-system-x86_64 | grep -i egl", and it showed:
libwayland-egl.so.1 => /usr/lib64/libwayland-egl.so.1 (0x00007fd5debf0000)

There is no wayland USE flag or dependency on Wayland at all, so why is it pulling from Wayland instead of X? I should also add I'm using X and not Wayland.

Reproducible: Always

Steps to Reproduce:
Step 1:
Install and set up virt-manager, which should also install QEMU and libvirtd
---
Step 2:
In Virtual Machine Manager (virt-manager), set up a Windows virtual machine (or any virtual machine will probably okay). Under Display in the VM settings, set these values:

Type: Spice server
Listen type: None
OpenGL: checked
Set the drop-down to Auto or to your video card (in my case an NVIDIA GeForce graphics card)

And under Video, Mode should be virtio and 3D Acceleration should be checked.
---
Step 3:
Start the VM, and a dialog box pops up showing an EGL error.

Error starting domain: internal error: process exited while connecting to monitor: 2024-10-07T00:25:31.641138Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2024-10-07T00:25:31.641199Z qemu-system-x86_64: egl: render node init failed

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3.12/site-packages/libvirt.py", line 1379, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2024-10-07T00:25:31.641138Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2024-10-07T00:25:31.641199Z qemu-system-x86_64: egl: render node init failed
---
Step 4:
These commands show that QEMU is using Wayland's EGL libraries, yet there is no dependency on Wayland. You may also want to remove overlays just to make sure, as qemu is in the guru overlay too.

kenny-linux /etc/portage # ldd /usr/bin/qemu-system-x86_64 | grep -i egl
        libwayland-egl.so.1 => /usr/lib64/libwayland-egl.so.1 (0x00007fb3414f6000)
kenny-linux /etc/portage # equery belongs /usr/lib64/libwayland-egl.so.1
 * Searching for /usr/lib64/libwayland-egl.so.1 ... 
dev-libs/wayland-1.23.0-r1 (/usr/lib64/libwayland-egl.so.1 -> libwayland-egl.so.1.23.0)
dev-libs/wayland-1.23.0-r1 (/usr/lib64/libwayland-egl.so.1.23.0)
kenny-linux /etc/portage # equery depends dev-libs/wayland|grep -i qemu
kenny-linux /etc/portage # equery depends dev-libs/wayland|grep -i emulation
app-emulation/looking-glass-7b_rc1
app-emulation/wine-vanilla-9.0
games-emulation/melonds-0.9.5_p20240815
games-emulation/pcsx2-2.0.2
games-emulation/snes9x-1.62.3
kenny-linux /etc/portage # emerge -vp qemu

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.46 s (backtrack: 0/20).

[ebuild   R    ] app-emulation/qemu-8.2.3::gentoo  USE="accessibility aio alsa bzip2 curl fdt filecaps gnutls gtk jpeg lzo ncurses nls opengl oss pam pin-upstream-blobs pipewire png pulseaudio sdl seccomp slirp spice udev usb usbredir vhost-net virgl virtfs vnc xattr xen -bpf -capstone -debug -doc -fuse -glusterfs -infiniband -io-uring -iscsi -jack -jemalloc -keyutils -multipath -nfs -numa -plugins -python -rbd -sasl -sdl-image (-selinux) -smartcard -snappy -ssh -static-user -systemtap -test -vde -vte -zstd" PYTHON_TARGETS="python3_12 -python3_10 -python3_11" QEMU_SOFTMMU_TARGETS="i386 x86_64 -aarch64 -alpha -arm -avr -cris -hppa -loongarch64 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -xtensa -xtensaeb" QEMU_USER_TARGETS="i386 x86_64 -aarch64 -aarch64_be -alpha -arm -armeb -cris -hexagon -hppa -loongarch64 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64le -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -xtensa -xtensaeb" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

kenny-linux /etc/portage # 
kenny-linux /etc/portage # equery depgraph app-emulation/qemu|grep -i wayland
kenny-linux /etc/portage # 
---
Step 5:
Delete Wayland (emerge -Cv wayland) and try to build QEMU (emerge -1v qemu) again. The output is too long, so I'll just post the error and the leadup to it.

../meson.build:1542:8: ERROR: Dependency lookup for gtk+-3.0 with method 'pkgconfig' failed: Could not generate cflags for gtk+-3.0:
Package wayland-client was not found in the pkg-config search path.
Perhaps you should add the directory containing `wayland-client.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wayland-client', required by 'gdk-3.0', not found
Package 'wayland-cursor', required by 'gdk-3.0', not found
Package 'wayland-egl', required by 'gdk-3.0', not found


A full log can be found at /var/tmp/portage/app-emulation/qemu-8.2.3/work/qemu-8.2.3/softmmu-build/meson-logs/meson-log.txt

ERROR: meson setup failed

 * ERROR: app-emulation/qemu-8.2.3::gentoo failed (configure phase):
 *   configure failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 3526:  Called qemu_src_configure 'softmmu'
 *   environment, line 3385:  Called die
 * The specific snippet of code:
 *       ../configure "${conf_opts[@]}" || die "configure failed"
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-8.2.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-8.2.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qemu-8.2.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-8.2.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-8.2.3/work/qemu-8.2.3/softmmu-build'
 * S: '/var/tmp/portage/app-emulation/qemu-8.2.3/work/qemu-8.2.3'

>>> Failed to emerge app-emulation/qemu-8.2.3, Log file:

>>>  '/var/tmp/portage/app-emulation/qemu-8.2.3/temp/build.log'

 * Messages for package app-emulation/qemu-8.2.3:

 * ERROR: app-emulation/qemu-8.2.3::gentoo failed (configure phase):
 *   configure failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 3526:  Called qemu_src_configure 'softmmu'
 *   environment, line 3385:  Called die
 * The specific snippet of code:
 *       ../configure "${conf_opts[@]}" || die "configure failed"
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-8.2.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-8.2.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qemu-8.2.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-8.2.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-8.2.3/work/qemu-8.2.3/softmmu-build'
 * S: '/var/tmp/portage/app-emulation/qemu-8.2.3/work/qemu-8.2.3'
---
Step 6:
"emerge -1v wayland" or "emerge -NuUDv @world" to put Wayland back in. At this point you can try building qemu again (emerge -1v qemu) and it should work.
Actual Results:  
virt-manager/qemu gives an EGL error when I try to run a Windows VM with 3D accelleration. QEMU is using Wayland EGL libraries with no dependency on Wayland or USE flag "wayland".

Expected Results:  
QEMU should use X's EGL libraries instead of Wayland unless the user explicitly wishes to use those of Wayland (i.e. via wayland USE flag), in which case the ebuild for QEMU should have Wayland as a dependency.

kenny-linux /etc/portage # emerge --info
!!! Missing sync-uri setting for binrepo gentoobinhost
Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/split-usr/desktop/plasma, gcc-13, glibc-2.39-r6, 6.6.52-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.6.52-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-14500-with-glibc2.39
KiB Mem:    32641480 total,   3801748 free
KiB Swap:  204799996 total, 203457276 free
Timestamp of repository gentoo: Sun, 06 Oct 2024 23:00:00 +0000
Head commit of repository gentoo: ffb5c11acc092e91beff5a3ee93d91509b1a9ca6
sh bash 5.2_p37
ld GNU ld (Gentoo 2.42 p6) 2.42.0
ccache version 4.10.1 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.6_p4::gentoo
dev-lang/rust:             1.80.1::gentoo
dev-util/ccache:           4.10.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             15.0.7::gentoo, 18.1.8::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: [[URL removed because I'm new]]
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=alderlake -mtune=alderlake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-march=alderlake -mtune=alderlake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=alderlake -mtune=alderlake -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=alderlake -mtune=alderlake -O2 -pipe"
GENTOO_MIRRORS={{URLs removed because I'm new and can't post them]]
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j19"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac accessibility acl acpi activities alsa amd64 appindicator avif bluetooth branding bzip2 cairo cdda cdr cet cjk crypt cups curl dbus declarative dist-kernel dri dts dvb dvd dvdr elogind encode exif ffmpeg flac gdbm gif gpm graphviz gtk gui heif iconv icu introspection ipv6 java jpeg jpegxl kde kf6compat kwallet lame lcms libnotify libtirpc lm-sensors lzma lzo mad mng modules-sign mp3 mp4 mpeg multilib ncurses networkmanager nls nvenc ogg openexr opengl openmp opus pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound speex spell split-usr ssl startup-notification svg syslog test-rust tiff truetype udev udisks uefi unicode upower usb v4l vaapi vala vdpau vorbis vulkan wavpack wayland widgets wifi wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64 efi-32 qemu" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput evdev joystick vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads quadmath" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia intel i915 radeon radeonsi amdgpu virgl vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Ionen Wolkens gentoo-dev 2024-10-07 02:02:40 UTC
Look again with lddtree rather than ldd, haven't checked but pretty sure you'll see that it's gtk that's linked with wayland and not qemu.

And deleting wayland is causing gtk's check to fail because it was built with wayland (essentially you broke gtk).
Comment 2 Kenny Bentley 2024-10-07 03:33:28 UTC
(In reply to Ionen Wolkens from comment #1)
> Look again with lddtree rather than ldd, haven't checked but pretty sure
> you'll see that it's gtk that's linked with wayland and not qemu.
> 
> And deleting wayland is causing gtk's check to fail because it was built
> with wayland (essentially you broke gtk).

Actually, according to lddtree, it looks like it's actually libSDL2 and not GTK that broke without Wayland. I'll try rebuilding libsdl2 with USE="-wayland" and rebuild QEMU if need be and see if that fixes it.

kenny-linux /etc/portage # lddtree /usr/bin/qemu-system-x86_64
qemu-system-x86_64 => /usr/bin/qemu-system-x86_64 (interpreter => /lib64/ld-linux-x86-64.so.2)
    libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libepoxy.so.0 => /usr/lib64/libepoxy.so.0
    libxenctrl.so.4.17 => /usr/lib64/libxenctrl.so.4.17
        libxentoollog.so.1 => /usr/lib64/libxentoollog.so.1
        libxencall.so.1 => /usr/lib64/libxencall.so.1
    libxenstore.so.4 => /usr/lib64/libxenstore.so.4
    libxenforeignmemory.so.1 => /usr/lib64/libxenforeignmemory.so.1
    libxengnttab.so.1 => /usr/lib64/libxengnttab.so.1
    libxenevtchn.so.1 => /usr/lib64/libxenevtchn.so.1
    libxendevicemodel.so.1 => /usr/lib64/libxendevicemodel.so.1
    libxentoolcore.so.1 => /usr/lib64/libxentoolcore.so.1
    libspice-server.so.1 => /usr/lib64/libspice-server.so.1
        libssl.so.3 => /usr/lib64/libssl.so.3
        libcrypto.so.3 => /usr/lib64/libcrypto.so.3
        libopus.so.0 => /usr/lib64/libopus.so.0
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6
            libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1
    libdw.so.1 => /usr/lib64/libdw.so.1
        libelf.so.1 => /usr/lib64/libelf.so.1
        liblzma.so.5 => /usr/lib64/liblzma.so.5
    libgnutls.so.30 => /usr/lib64/libgnutls.so.30
        libp11-kit.so.0 => /usr/lib64/libp11-kit.so.0
            libffi.so.8 => /usr/lib64/libffi.so.8
        libidn2.so.0 => /usr/lib64/libidn2.so.0
        libunistring.so.5 => /usr/lib64/libunistring.so.5
        libtasn1.so.6 => /usr/lib64/libtasn1.so.6
    libpng16.so.16 => /usr/lib64/libpng16.so.16
    libz.so.1 => /usr/lib64/libz.so.1
    libjpeg.so.62 => /usr/lib64/libjpeg.so.62
    libfdt.so.1 => /usr/lib64/libfdt.so.1
    libudev.so.1 => /usr/lib64/libudev.so.1
        libcap.so.2 => /usr/lib64/libcap.so.2
    libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0
    liblzo2.so.2 => /lib64/liblzo2.so.2
    libSDL2-2.0.so.0 => /usr/lib64/libSDL2-2.0.so.0
        libXext.so.6 => /usr/lib64/libXext.so.6
        libXcursor.so.1 => /usr/lib64/libXcursor.so.1
            libXrender.so.1 => /usr/lib64/libXrender.so.1
        libXi.so.6 => /usr/lib64/libXi.so.6
        libXfixes.so.3 => /usr/lib64/libXfixes.so.3
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2
        libwayland-egl.so.1 => /usr/lib64/libwayland-egl.so.1
        libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0
        libwayland-cursor.so.0 => /usr/lib64/libwayland-cursor.so.0
        libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0
        libdecor-0.so.0 => /usr/lib64/libdecor-0.so.0
    libseccomp.so.2 => /usr/lib64/libseccomp.so.2
    libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0
        libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0
        libmount.so.1 => /usr/lib64/libmount.so.1
            libblkid.so.1 => /usr/lib64/libblkid.so.1
    libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0
    libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
        libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0
    libslirp.so.0 => /usr/lib64/libslirp.so.0
    libncursesw.so.6 => /lib64/libncursesw.so.6
    libtinfow.so.6 => /lib64/libtinfow.so.6
    libgbm.so.1 => /usr/lib64/libgbm.so.1
        libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0
        libdrm.so.2 => /usr/lib64/libdrm.so.2
        libexpat.so.1 => /usr/lib64/libexpat.so.1
        libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0
            libxcb.so.1 => /usr/lib64/libxcb.so.1
                libXau.so.6 => /usr/lib64/libXau.so.6
                libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6
    libgtk-3.so.0 => /usr/lib64/libgtk-3.so.0
        libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0
        libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0
        libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0
            libfreetype.so.6 => /usr/lib64/libfreetype.so.6
            libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3
        libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1
        libfribidi.so.0 => /usr/lib64/libfribidi.so.0
        libcairo-gobject.so.2 => /usr/lib64/libcairo-gobject.so.2
        libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0
        libatk-bridge-2.0.so.0 => /usr/lib64/libatk-bridge-2.0.so.0
            libatspi.so.0 => /usr/lib64/libatspi.so.0
            libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3
    libgdk-3.so.0 => /usr/lib64/libgdk-3.so.0
        libXdamage.so.1 => /usr/lib64/libXdamage.so.1
        libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1
    libcairo.so.2 => /usr/lib64/libcairo.so.2
        libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0
        libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0
    libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0
    libX11.so.6 => /usr/lib64/libX11.so.6
    libvirglrenderer.so.1 => /usr/lib64/libvirglrenderer.so.1
    libusbredirparser.so.1 => /usr/lib64/libusbredirparser.so.1
    libasound.so.2 => /usr/lib64/libasound.so.2
    libpulse.so.0 => /usr/lib64/libpulse.so.0
        libpulsecommon-17.0.so => /usr/lib64/pulseaudio/libpulsecommon-17.0.so
            libsndfile.so.1 => /usr/lib64/libsndfile.so.1
                libFLAC.so.12 => /usr/lib64/libFLAC.so.12
                libvorbis.so.0 => /usr/lib64/libvorbis.so.0
                libvorbisenc.so.2 => /usr/lib64/libvorbisenc.so.2
                libogg.so.0 => /usr/lib64/libogg.so.0
                libmpg123.so.0 => /usr/lib64/libmpg123.so.0
                libmp3lame.so.0 => /usr/lib64/libmp3lame.so.0
            libasyncns.so.0 => /usr/lib64/libasyncns.so.0
    libpipewire-0.3.so.0 => /usr/lib64/libpipewire-0.3.so.0
    libbrlapi.so.0.8 => /usr/lib64/libbrlapi.so.0.8
    libm.so.6 => /lib64/libm.so.6
    libnettle.so.8 => /usr/lib64/libnettle.so.8
    libgmp.so.10 => /usr/lib64/libgmp.so.10
    libhogweed.so.6 => /usr/lib64/libhogweed.so.6
    libpam.so.0 => /usr/lib64/libpam.so.0
    libaio.so.1 => /usr/lib64/libaio.so.1
    libcurl.so.4 => /usr/lib64/libcurl.so.4
        libcares.so.2 => /usr/lib64/libcares.so.2
        libnghttp3.so.9 => /usr/lib64/libnghttp3.so.9
        libnghttp2.so.14 => /usr/lib64/libnghttp2.so.14
        libpsl.so.5 => /usr/lib64/libpsl.so.5
    libbz2.so.1 => /usr/lib64/libbz2.so.1
    libc.so.6 => /lib64/libc.so.6
Comment 3 Andreas Sturmlechner gentoo-dev 2024-10-07 05:16:33 UTC
This is certainly not major.
Comment 4 Kenny Bentley 2024-10-07 07:33:31 UTC
Actually you're right, ionen, it is GTK. After rebuilding libsdl2 with -wayland USE flag,lddtree showed libwayland-egl.so.1 connected to libgdk-3.so.0, which belongs to GTK. But it won't let me rebuild GTK with the -wayland USE flag, and I've included the results of my attempt below. Maybe that needs a new bug report, but if I'm using X and not Wayland, shouldn't it turn to X's EGL library or one connected to X?

I forgot to mention that I also set the variable "EGL_PLATFORM=x11" and put it in my enf.d, but that didn't appear to help. Maybe I'll try rebuilding GTK without changing USE flags and see if it links to a different EGL library with that variable, since I have rebooted/shut down since setting it.

I was going to include the new lddtree results and my attempt to rebuild GTK with -wayland USE flag, but it was too long, so I will add an attachment with that info.
Comment 5 Andreas Sturmlechner gentoo-dev 2024-10-07 07:36:21 UTC
It is perfectly fine for whatever applications or toolkits to link with wayland libraries even if you are using X. It does not affect your X session in any way.
Comment 6 Kenny Bentley 2024-10-07 07:38:09 UTC
Created attachment 905033 [details]
New lddtree result and attempt ti rebuild GTK with -wayland USE flag

This shows the new lddtree after recompiling libsdl2 with -wayland USE flag, and then the error when I tried to rebuild gtk+ with -wayland USE.
Comment 7 Kenny Bentley 2024-10-07 09:30:18 UTC
(In reply to Andreas Sturmlechner from comment #5)
> It is perfectly fine for whatever applications or toolkits to link with
> wayland libraries even if you are using X. It does not affect your X session
> in any way.

So even if I'm using X, and a program or library links to Wayland's EGL library, EGL should still work okay then? I wonder why Virtual Machine Manager gave me that EGL initialization error then. I thought it was because I was using X and it was trying to pull from Wayland.
Comment 8 Kenny Bentley 2024-10-08 00:57:36 UTC
I tried it in Wayland today and same result, so the issue is not that it's pulling from Wayland when I'm using X, it's something else. The issue may be related to NVIDIA cards from what I've read, but I'm not sure. I wonder if this is something Gentoo can fix with patches that are out there, but it could just be a virt-manager/qemu problem.

It looks like Hurricane Milton is coming our way, so apologies if I'm unresponsive for a while after tomorrow.
Comment 9 Ionen Wolkens gentoo-dev 2024-10-08 01:02:37 UTC
(In reply to Kenny Bentley from comment #8)
> NVIDIA cards
virgl only works with mesa, so it's not expected to work with nvidia that does not use mesa (may work with nouveau, never tried).

There's really nothing Gentoo can do about that.

Personally I just use GPU passthrough with qemu when I need acceleration, albeit that's more complicated.
Comment 10 Ionen Wolkens gentoo-dev 2024-10-08 01:04:04 UTC
(sorry, hadn't noticed that you mentioned NVIDIA in the bug report and got distracted by the wayland library checks)
Comment 11 Mike Gilbert gentoo-dev 2024-10-10 22:52:13 UTC
Closing per comment 9.