Bug#1003091: xwayland: Xwayland uses glamor and shows black screens

2024-03-24 Thread Gert van de Kraats

I think this issued can be closed.

In fact it is a really sad story.
Problems occurred at i915 classic. Xwayland upstream didnot want to
remove the activation of ES 2.0, which totally was not working.
But they also did not want to approve merge-requests,
which solve the problems.
Then Debian was delivered without the i915 driver, because upstream
decided to stop support for it @#$.  Also gnome-shell was not working,
without an i915-driver (solved).
Finally Debian was delivered with the gallium-i915-driver. But this
driver surprisingly supports GL 2.1. And Xwayland disables glamor
at GL 2.1, because the graphics-performance is to poor.

So currently Xwayland uses the llvmpipe software driver again at
trixie (testing) and I think also at bookworm.

At the moment I use 
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1171 at

Xwayland, which also still is not approved. This patch activates glamor
for GL 2.1, and also uses some (fast) fallbacks.
This also needs Mesa MR
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25533 for i915 
gallium, which


gives errorcodes if shader is failing, instead of using a standard 
simple shader,


which  mangles the screen.



Bug#1003091: xwayland: Xwayland uses glamor and shows black screens

2024-03-23 Thread Diederik de Haas
Hi,

On 21 Jan 2022 19:49:55 +0100 Gert van de Kraats  wrote:
> I reported the bug upstream for Xwayland:
> 
> https://gitlab.freedesktop.org/xorg/xserver/-/issues/1288
> 
> It will be fixed.

Could you update this bug with its status?
I got the impression that it is fixed upstream, but IIUC the commit that fixed 
it is as of yet only in the 'master' branch and (thus) not part of an upstream 
released version. But it also seems that this issue resulted in fixes in 
several projects? It appears that you were on top of (all the) things, so I 
figured it's better to ask you then trying to figure it out myself.

Cheers,
  Diederik

signature.asc
Description: This is a digitally signed message part.


Bug#1003091: xwayland: Xwayland uses glamor and shows black screens

2022-01-03 Thread Gert van de Kraats

Package: xwayland
Version: 2:21.1.4-1
Severity: important
Tags: upstream

Dear Maintainer,

I am using graphics:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and
945GT Express Memory Controller Hub (rev 03)
Subsystem: Dell Mobile 945GM/PM/GMS, 943/940GML and 945GT Express
Memory Controller Hub
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS,
943/940GML Express Integrated Graphics Controller (rev 03)
Subsystem: Dell Mobile 945GM/GMS, 943/940GML Express Integrated
Graphics Controller
Kernel driver in use: i915
Kernel modules: i915
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 
943/940GML

Express Integrated Graphics Controller (rev 03)
Subsystem: Dell Mobile 945GM/GMS/GME, 943/940GML Express Integrated
Graphics Controller

It is intel gen 3 and supports GL1.4 and ES2.0.

At Debian (testing) Bookworm this recently was working without problem,
using ES2.0 hardware driver at Wayland and automatically
galamor was disabled and the llvmpipe software driver at Xwayland
wa selected, because version GL1.4 is too low.
The latest Xwayland package now tries to use ES2.0 with glamor at
Xwayland. This causes blackscreen (Java8, Chromium), xeyes and not working
es2_info end glxinfo.
Errors at startup of user session at syslog:
Jan 2 01:27:47 debian org.gnome.Shell.desktop[9925]: Supported GL version is
not sufficient (required 21, found 14)
Jan 2 01:27:47 debian org.gnome.Shell.desktop[9925]: (EE) glamor0: GL error:
GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_R8)
Jan 2 01:27:47 debian org.gnome.Shell.desktop[9925]: (EE)
Jan 2 01:27:47 debian org.gnome.Shell.desktop[9925]: (EE) Backtrace:
Jan 2 01:27:47 debian dbus-daemon[528]: [system] Activating via systemd:
service name='org.freedesktop.realmd' unit='realmd.service' requested by
':1.492' (uid=117 pid=9895 comm="/usr/bin/gnome-shell ")
Jan 2 01:27:47 debian systemd[1]: Starting Realm and Domain Configuration...
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 0: 
/usr/bin/Xwayland

(0x4b9000+0x161813) [0x61a813]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 1: 
/usr/bin/Xwayland

(0x4b9000+0x31596) [0x4ea596]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 2:
/usr/lib/i386-linux-gnu/dri/i915_dri.so (0xb61c4000+0x1f6175) [0xb63ba175]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 3:
/usr/lib/i386-linux-gnu/dri/i915_dri.so (0xb61c4000+0x25d5f1) [0xb64215f1]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 4:
/usr/lib/i386-linux-gnu/dri/i915_dri.so (0xb61c4000+0x31f955) [0xb64e3955]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 5:
/usr/lib/i386-linux-gnu/dri/i915_dri.so (0xb61c4000+0x320076) [0xb64e4076]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 6:
/usr/lib/i386-linux-gnu/dri/i915_dri.so (0xb61c4000+0x3225fa) [0xb64e65fa]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 7: 
/usr/bin/Xwayland

(0x4b9000+0x31758) [0x4ea758]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 8: 
/usr/bin/Xwayland

(0x4b9000+0x32d27) [0x4ebd27]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 9: 
/usr/bin/Xwayland

(0x4b9000+0x2b3cc) [0x4e43cc]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 10:
/usr/bin/Xwayland (0x4b9000+0x25eac) [0x4deeac]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 11:
/usr/bin/Xwayland (0x4b9000+0x8f759) [0x548759]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 12:
/usr/bin/Xwayland (0x4b9000+0x1f584) [0x4d8584]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 13:
/usr/bin/Xwayland (0x4b9000+0x93715) [0x54c715]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 14:
/usr/bin/Xwayland (0x4b9000+0x1ed3b) [0x4d7d3b]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 15: 
/lib/i386-linux-

gnu/libc.so.6 (__libc_start_main+0xe5) [0xb7942905]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) 16:
/usr/bin/Xwayland (0x4b9000+0x1ed81) [0x4d7d81]
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE)
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: glamor: Test fbo for
depth 8 incomplete. Falling back to software.
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: glamor: Implementation
returned 0x1908/0x8366 read format/type for depth 15, expected 
0x1908/0x8034.

Falling back to software.
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: glamor: Implementation
returned 0x80e1/0x1401 read format/type for depth 24, expected 
0x1908/0x1401.

Falling back to software.
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: glamor: Implementation
returned 0x80e1/0x1401 read format/type for depth 32, expected 
0x1908/0x1401.

Falling back to software.
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE) glamor0: GL error:
GL_INVALID_OPERATION in glTexImage2D(format = GL_RGBA, type =
GL_UNSIGNED_INT_2_10_10_10_REV, internalformat = GL_RGB10_A2)
Jan 2 01:27:48 debian org.gnome.Shell.desktop[9925]: (EE)
Jan 2 01:27:48 debian