Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 940765

Summary: www-client/firefox-131.0: [26684] Wayland Proxy [0x7f17367979b0] Error: WaylandProxy::SetupWaylandDisplays(), Missing Wayland display, WAYLAND_DISPLAY is empty
Product: Gentoo Linux Reporter: Michael Mair-Keimberger (mm1ke) <mmk>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED INVALID    
Severity: normal CC: mmk
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Michael Mair-Keimberger (mm1ke) 2024-10-04 19:43:27 UTC
Created attachment 904912 [details]
build.log

Hi,

Afaics, the relevant error is:
[26684] Wayland Proxy [0x7f17367979b0] Error: WaylandProxy::SetupWaylandDisplays(), Missing Wayland display, WAYLAND_DISPLAY is empty.
Error: we don't have any display, WAYLAND_DISPLAY='' DISPLAY='(null)'
Firefox exited with code 1 during profile initialization
Error running mach:

    mach build --verbose

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file build`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/var/tmp/portage/www-client/firefox-131.0/work/firefox_build/srcdirs/firefox-131.0-0088071879a6/_virtualenvs/build/bin/python', '/var/tmp/portage/www-client/firefox-131.0/work/firefox-131.0/build/pgo/profileserver.py']' returned non-zero exit status 1.

  File "/var/tmp/portage/www-client/firefox-131.0/work/firefox-131.0/python/mozbuild/mozbuild/build_commands.py", line 215, in build
    subprocess.check_call(pgo_cmd, cwd=instr.topobjdir, env=pgo_env)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)



I've checked my enviroment, but WAYLAND_DISPLAY is set on my system:
...
WAYLAND_DISPLAY=wayland-1
...



emerge --info firefox
Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0, gcc-14, glibc-2.40-r4, 6.11.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.11.0-gentoo-x86_64-AMD_Ryzen_9_7950X3D_16-Core_Processor-with-glibc2.40
KiB Mem:    64957632 total,  17370676 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Fri, 04 Oct 2024 17:48:40 +0000
Head commit of repository gentoo: 3da1dae0dbbc0e8824dd2dc4c0caef9ce2e41b30

Timestamp of repository guru: Fri, 04 Oct 2024 10:33:25 +0000
Head commit of repository guru: 7dc7e51ed084621d9b0378d75adf0724a4677826

Head commit of repository local: 4db0df99cca013df6a0536cab96a9a3885425392

Timestamp of repository steam-overlay: Tue, 01 Oct 2024 20:48:55 +0000
Head commit of repository steam-overlay: b299cf5b58600d0c055253a5e590189aa414c3a0

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.4::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.7_p1::gentoo, 3.13.0_rc3::gentoo
dev-lang/rust:             1.81.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo, 19.1.1::gentoo
sys-kernel/linux-headers:  6.10::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r4::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: true

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

local
    location: /var/db/repos/local
    sync-type: git
    sync-uri: git://s2/local.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: 10
    volatile: False

Installed sets: @g_base, @g_base_l9, @g_base_openrc, @g_base_tools, @g_dev_tools, @x2
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
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"
CXXFLAGS="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--oneshot --jobs=4 --with-bdeps=y --keep-going"
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="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
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 parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -fuse-ld=mold"
LEX="flex"
MAKEOPTS="-j32"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--info=progress2,name0,del0"
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="acl alsa amd64 bzip2 cet crypt dbus elogind flac gdbm iconv ipv6 jpeg libtirpc lto mp3 multilib ncurses nls openmp pam pcre pgo pipewire png readline seccomp ssl svg test-rust threads tiff udev unicode vim-syntax vulkan wayland webp xattr xml zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" AMDGPU_TARGETS="gfx1100" 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="mmx mmxext sse sse2 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" 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" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="riscv64 x86_64" QEMU_USER_TARGETS="riscv64" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="radeon amdgpu radeonsi" 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, 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, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

www-client/firefox-130.0.1::gentoo was built with the following:
USE="clang dbus gmp-autoupdate jumbo-build lto pgo system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp telemetry wayland -X -debug -eme-free -gnome-shell -hardened -hwaccel -jack -libproxy -openh264 -pulseaudio (-selinux) -sndio -system-png (-valgrind) -wifi" ABI_X86="(64)" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fur -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sc -sco -si -sk -skr -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW" LLVM_SLOT="18 -17"
CFLAGS="-pipe -march=znver4 -mshstk -Werror=odr -Werror=strict-aliasing"
CXXFLAGS="-pipe -march=znver4 -mshstk -Werror=odr -Werror=strict-aliasing"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -fuse-ld=mold -flto=thin -Wl,--undefined-version -Wl,--compress-debug-sections=zlib -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
Comment 1 Joonas Niilola gentoo-dev 2024-10-09 13:34:48 UTC
What DE/WM are you using? IIRC there's been trouble detecting wayland when in sway, but something like KDE Plasma works.

Also in general, firefox+mold doesn't seem to be pair greatly recently. Not saying it's causing this, but not fully counting it out either.
Comment 2 Michael Mair-Keimberger (mm1ke) 2024-10-09 19:34:24 UTC
Oh, I see. Yes I'm running sway on my computer :/ 
Anything i can try here? Disabling mold didn't help unfortunately.
Comment 3 Joonas Niilola gentoo-dev 2024-10-21 16:07:33 UTC
Nope, even in the earlier bug (which you reported I believe) you said it just suddenly started working. I don't use wayland and have no idea how it works, but only sway seems to be the problematic WM when it comes to compiling firefox with pgo. There's probably something that needs to be written in the virtwl() function regarding sway - like sway could replace tinywl, but I can't test it so someone needs to provide a working patch.
Comment 4 Joonas Niilola gentoo-dev 2024-10-21 16:20:13 UTC
This could be relevant:
00:00:00.000 [1;34m[backend/backend.c:350] Loading user-specified backends due to WLR_BACKENDS: headless[0m
00:00:00.000 [1;34m[backend/headless/backend.c:67] Creating headless backend[0m
00:00:00.000 [1;34m[util/env.c:25] Loading WLR_RENDERER option: vulkan[0m
00:00:00.000 [1;90m[render/wlr_renderer.c:118] Opening DRM render node '/dev/dri/renderD128'[0m
00:00:00.000 [1;31m[render/wlr_renderer.c:121] Failed to open '/dev/dri/renderD128': Permission denied[0m
00:00:00.000 [1;31m[render/wlr_renderer.c:192] Cannot create Vulkan renderer: no DRM FD available[0m
00:00:00.000 [1;31m[render/wlr_renderer.c:272] Could not initialize renderer[0m
00:00:00.000 [1;31m[tinywl.c:921] failed to create wlr_renderer[0m

although with +pgo you should have addpredict /dev so it shouldn't be about permissions. I wonder what "no DRM FD available" means. Do you have everything compiled with +dri enabled globally to throw a guess?
Comment 5 Michael Mair-Keimberger (mm1ke) 2024-10-21 16:37:11 UTC
(In reply to Joonas Niilola from comment #4)
> This could be relevant:
> 00:00:00.000 [1;34m[backend/backend.c:350] Loading user-specified backends
> due to WLR_BACKENDS: headless[0m
> 00:00:00.000 [1;34m[backend/headless/backend.c:67] Creating headless
> backend[0m
> 00:00:00.000 [1;34m[util/env.c:25] Loading WLR_RENDERER option: vulkan[0m
> 00:00:00.000 [1;90m[render/wlr_renderer.c:118] Opening DRM render node
> '/dev/dri/renderD128'[0m
> 00:00:00.000 [1;31m[render/wlr_renderer.c:121] Failed to open
> '/dev/dri/renderD128': Permission denied[0m
> 00:00:00.000 [1;31m[render/wlr_renderer.c:192] Cannot create Vulkan
> renderer: no DRM FD available[0m
> 00:00:00.000 [1;31m[render/wlr_renderer.c:272] Could not initialize
> renderer[0m
> 00:00:00.000 [1;31m[tinywl.c:921] failed to create wlr_renderer[0m
> 
> although with +pgo you should have addpredict /dev so it shouldn't be about
> permissions. I wonder what "no DRM FD available" means. Do you have
> everything compiled with +dri enabled globally to throw a guess?

Actually, i think i know why it might not work anymore :)
WLR_RENDERER option: vulkan -> this is something i've changed recently by setting 'export WLR_RENDERER=vulkan' (to try out the vulkan renderer). 
I'm going to test this. (by removing this export) Thank you for pointing out.

Regarding dri. It's not globally enabled per default, but only x11-libs/libvdpau would be rebuild with dri. If the WLR_RENDERER thing wouldn't help, i'll test this.

Besides that, would it help to open an issue upstream? Soon sway 1.10 should be released anyway - maybe this improves here too.
Comment 6 Michael Mair-Keimberger (mm1ke) 2024-10-21 17:10:43 UTC
just successfully emerged firefox -> 'export WLR_RENDERER=vulkan' was the culprit.
Sorry for the noise - should have noticed this myself.
Comment 7 Joonas Niilola gentoo-dev 2024-10-21 17:38:16 UTC
Glad you figured it out, maybe the ebuild should unset WLR_RENDERER although I'm not sure whether it'd work or not.