swaywm / wlroots

A modular Wayland compositor library
https://gitlab.freedesktop.org/wlroots/wlroots/
MIT License
2.15k stars 343 forks source link

backend/x11: X11 does not support required DRI3 version #2586

Closed CaptainBloodz closed 3 years ago

CaptainBloodz commented 3 years ago
sway -d
00:00:00.000 [sway/main.c:346] Sway version 1.5-53f5197c (Dec 31 2020, branch 'HEAD')
00:00:00.021 [sway/main.c:154] Linux amd64 5.10.4-gentoo-classic #2 SMP Thu Dec 31 13:26:15 EAT 2020 x86_64 Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz GenuineIntel GNU/Linux
00:00:00.021 [sway/main.c:170] Contents of /etc/lsb-release:
00:00:00.021 [sway/main.c:154] DISTRIB_ID="Gentoo"
00:00:00.021 [sway/main.c:170] Contents of /etc/os-release:
00:00:00.021 [sway/main.c:154] NAME=Gentoo
00:00:00.021 [sway/main.c:154] ID=gentoo
00:00:00.021 [sway/main.c:154] PRETTY_NAME="Gentoo/Linux"
00:00:00.021 [sway/main.c:154] ANSI_COLOR="1;32"
00:00:00.021 [sway/main.c:154] HOME_URL="https://www.gentoo.org/"
00:00:00.021 [sway/main.c:154] SUPPORT_URL="https://www.gentoo.org/support/"
00:00:00.021 [sway/main.c:154] BUG_REPORT_URL="https://bugs.gentoo.org/"
00:00:00.021 [sway/main.c:170] Contents of /etc/gentoo-release:
00:00:00.021 [sway/main.c:154] Gentoo Base System release 2.7
00:00:00.022 [sway/main.c:142] LD_LIBRARY_PATH=
00:00:00.022 [sway/main.c:142] LD_PRELOAD=
00:00:00.022 [sway/main.c:142] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/opencascade-7.3.0/ros/bin:/usr/lib/llvm/11/bin:/usr/lib/llvm/10/bin
00:00:00.022 [sway/main.c:142] SWAYSOCK=
00:00:00.022 [sway/server.c:43] Preparing Wayland server initialization
00:00:00.022 [wlr] [backend/x11/backend.c:412] X11 does not support required DRI3 version
00:00:00.022 [sway/server.c:49] Unable to create backend

Used to work a couple of weeks ago.

No problem from console with concurrent Xorg session running, though:

sway-console-dbg.out.zip

emersion commented 3 years ago

What is the version of xorg-xserver you're using? What xf86 driver?

emersion commented 3 years ago

DRI3 1.2 adds GetSupportedModifiers, PixmapFromBuffers, and BuffersFromPixmap. We'd need to add fallbacks for these if we want to support 1.0.

CaptainBloodz commented 3 years ago

What is the version of xorg-xserver you're using? What xf86 driver?

x11-base/xorg-server-1.20.10:0/1.20.10::gentoo USE="-debug -dmx -doc elogind -ipv6 -kdrive -libressl -minimal (-selinux) -static-libs -suid -systemd udev -unwind wayland -xcsecurity -xephyr -xnest xorg xvfb"

What xf86 driver?

x11-drivers/xf86-video-intel-2.99.917_p20200515::gentoo USE="-debug dri sna -tools udev -uxa xvmc"

CaptainBloodz commented 3 years ago
glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.2.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
emersion commented 3 years ago

I used xf86-video-modesetting in my testing. Maybe xf86-video-intel doesn't support DRI3 1.2.

CaptainBloodz commented 3 years ago

xf86-video-intel removed, xorg-drivers rebuild, xorg-server rebuild, xorg-server restart.

wayfire now displays fine from terminal.

wlroots-X11-1 main window forever remains grey, i.e. without any display:

https://github.com/swaywm/sway/issues/5928

emersion commented 3 years ago

Re-opening because this is still an issue with the xf86-video-intel driver.

jbeich commented 3 years ago

Bisected to d79a00bf0208. xf86-video-intel defaults to DRI3 disabled but when enabled the error appends (has 1.0, want 1.2).

emersion commented 3 years ago

xf86-video-intel defaults to DRI3 disabled

It sounds like this bug report is due to a downstream distribution not enabling DRI3?

when enabled the error appends (has 1.0, want 1.2)

Right. See https://github.com/swaywm/wlroots/issues/2586#issuecomment-753031332 for the action needed to fix this.

emersion commented 3 years ago

Can you try https://github.com/swaywm/wlroots/pull/2655?

jbeich commented 3 years ago

0.12.0-254-gb0b9638e showed transparent/black screen but 0.12.0-256-g77e7c0c0 works fine if DRI3 is enabled.

emersion commented 3 years ago

Thanks for testing. What are these hashes? They don't look like wlroots commits.

jbeich commented 3 years ago

What are these hashes? They don't look like wlroots commits.

git describe origin/pull/2655/head output. With only hash: b0b9638e and 77e7c0c0.

emersion commented 3 years ago

Oh, I see