Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#70488 - [libglvnd] sway 1.6 fails to start

Attached to Project: Arch Linux
Opened by Antonio Corbi bellot (acorbi) - Saturday, 17 April 2021, 15:47 GMT
Last edited by David Runge (dvzrv) - Sunday, 18 April 2021, 19:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Laurent Carlier (lordheavy)
Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 5
Private No

Details

Description: sway 1.6 fails to start with error.

Up to sway 1.5.1 (included) I had a working sway+wlroots working wayland compositor.
After upgrading to sway-1:1.6-1 + wlroots-0.13.0-1, sway fails to start with this error output:

--------------------------8><----------------------------------------------------------------
00:00:00.105 [wlr] [EGL] command: eglGetPlatformDisplay, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available
"
00:00:00.112 [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list.
"
00:00:00.112 [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_DISPLAY (0x3008), message: "(null)"
00:00:00.112 [wlr] [render/egl.c:280] eglQueryDeviceStringEXT(EGL_EXTENSIONS) failed
00:00:00.112 [wlr] [EGL] command: eglMakeCurrent, error: EGL_BAD_DISPLAY (0x3008), message: "Invalid display (nil)"
00:00:00.112 [wlr] [render/wlr_renderer.c:263] Could not initialize EGL
00:00:00.113 [wlr] [backend/drm/renderer.c:34] Failed to create EGL/WLR renderer
00:00:00.115 [wlr] [backend/drm/backend.c:201] Failed to initialize renderer
00:00:00.116 [wlr] [backend/backend.c:174] Failed to create DRM backend
00:00:00.116 [wlr] [backend/backend.c:312] Failed to open any DRM device
00:00:00.182 [sway/server.c:55] Unable to create backend
--------------------------8><----------------------------------------------------------------

This PC has only one video card:

lspci | grep -i vga

02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev ef)

I start sway from the tty but I've also tried starting gdm and from there select a sway-session without luck.
If i select i.e. the wayland gnome session, it works ok.

To complete this information, I own a very old laptop (core 2 duo) with only a intel video card and sway 1.6 works there as expected.

Any help is welcome as I use sway as my main desktop environment.

Additional info:

* package version(s)
sway-1:1.6-1 + wlroots-0.13.0-1
kernel: 5.11.15-zen1-2-zen

Steps to reproduce:

Simply upgrade from sway 1.5.1 to the new 1.6 and try to start it.
This task depends upon

Comment by Max (aragon123) - Sunday, 18 April 2021, 16:34 GMT
Apparently this is a bug in libglvnd, see this upstream issue:
https://github.com/swaywm/wlroots/issues/2869#issuecomment-821972323

I have downgraded sway+wlroots, since I have no time fiddling around with the issues in libglvnd-git.
Comment by Antonio Corbi bellot (acorbi) - Sunday, 18 April 2021, 19:15 GMT
Thx Max!

Installing libglvnd-git seems to do the trick for me and sway-1.6 works in my machine.
Hope this helps to others.

Antonio.
Comment by David Runge (dvzrv) - Sunday, 18 April 2021, 19:44 GMT
@lordheavy, @felixonmars: Can we apply a fix for libglvnd [1] as discussed in  FS#70490  as it seems all AMD users are affected AFAIKT?

[1] https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/a527411da713b2068974c46d7129326520dc5923
Comment by Hexhu (hexhu) - Sunday, 18 April 2021, 21:22 GMT
Can confirm that installing `libglvnd-git` fixes this issue on my laptop with Intel HD 630.

```
00:00:00.073 [ERROR] [wlr] [EGL] command: eglGetPlatformDisplay, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available
"
00:00:00.078 [ERROR] [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list.
"
00:00:00.078 [ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_DISPLAY (0x3008), message: "(null)"
00:00:00.078 [ERROR] [wlr] [render/egl.c:272] eglQueryDeviceStringEXT(EGL_EXTENSIONS) failed
00:00:00.078 [ERROR] [wlr] [EGL] command: eglMakeCurrent, error: EGL_BAD_DISPLAY (0x3008), message: "Invalid display (nil)"
00:00:00.078 [ERROR] [wlr] [render/wlr_renderer.c:240] Could not initialize EGL
00:00:00.079 [ERROR] [wlr] [backend/drm/renderer.c:34] Failed to create EGL/WLR renderer
00:00:00.080 [ERROR] [wlr] [backend/drm/backend.c:201] Failed to initialize renderer
00:00:00.081 [ERROR] [wlr] [backend/backend.c:173] Failed to create DRM backend
00:00:00.081 [ERROR] [wlr] [backend/backend.c:311] Failed to open any DRM device
00:00:00.149 [ERROR] [sway/server.c:53] Unable to create backend
```
Comment by Felix Yan (felixonmars) - Sunday, 18 April 2021, 21:31 GMT
Patch applied in libglvnd 1.3.2-2. Please try the new package.
Comment by Max (aragon123) - Sunday, 18 April 2021, 21:43 GMT
Thanks I will try the fix tomorrow, it should fix the problem.

The commit which fixes the issue, seems to fit my experience with the bug, i.e. two machines with one internal and external GPU (both Nvidia... :-( ) seem to be affected, while the one with only an internal GPU works.
Comment by Max (aragon123) - Monday, 19 April 2021, 07:48 GMT
So I updated all packages on all machines, the notebook where I have an internal Intel GPU with an additional Nvidia GPU seems to be fixed.

Unfortunately the other tower PC does not seem to work, I still get the following messages, and a black screen:
```
00:00:00.620 [ERROR] [wlr] [EGL] command: eglGetPlatformDisplay, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available
00:00:01.425 [ERROR] [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list.
2021-04-19 09:38:38 - [swaybg-1.0/main.c:299] Found config * for output DP-2 (Samsung Electric Company LU28R55 HNMN800233)
2021-04-19 09:38:38 - [swaybg-1.0/main.c:299] Found config * for output DP-1 (Samsung Electric Company LU28R55 HNMN800238)
Got sleep lock: 11
00:00:02.287 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy

** (waybar:641): WARNING **: 09:38:39.396: gtk-layer-shell v0.6.0 may not work on GTK v3.24.28. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
(waybar:641): GLib-GObject-WARNING **: 09:38:39.397: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '73'
(waybar:641): GLib-GObject-WARNING **: 09:38:39.397: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '72'0:00:02.754 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy
00:00:02.798 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy
00:00:02.805 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy
00:00:02.805 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy
00:00:02.827 [ERROR] [wlr] [backend/drm/legacy.c:108] connector DP-1: drmModePageFlip failed: Device or resource busy
...
```

And the error messages continue (also for DP-2). Another thing is that on the machine where it does not work, I initially have loaded the Nvidia driver, and unload this and load nouveau to start sway.

Loading...