Direct scanout failing with Xwayland 23.0.99.902 under Mutter 44 (bisected)
Since 8e7a131e, direct scanout fails to trigger for some applications running via Xwayland under Mutter 44. This includes certain games (specifically an older version of Minecraft), as well as some Electron-based applications (Discord, Element, 1Password). Reverting the aforementioned commit seems to permit these applications to trigger direct scanout. It should be noted that all the applications I notice this issue with seem to use server-side decorations, while some others (such as all GTK 4 applications I tested with the X11 backend) that implement client-side decorations do not exhibit the same issue.
Maybe also interesting/relevant: Due to the until-recent lack of linux_dmabuf v4 support in Xwayland, Mutter does not send modifiers to clients on amdgpu. This can be forced with MUTTER_DEBUG_SEND_KMS_MODIFIERS=1
as an environment variable. In my testing, I find that forcing this seems to cause the same described issue (with 8e7a131e reverted).
Relevant to this is some system info below:
System:
Host: mako Kernel: 6.2.7-300.fc38.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 2.39-9.fc38 Desktop: GNOME v: 44.0 tk: GTK v: 3.24.37 wm: gnome-shell
dm: GDM Distro: Fedora release 38 (Thirty Eight)
CPU:
Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
Speed (MHz): avg: 1608 high: 3137 min/max: 1200/4462 boost: enabled cores:
1: 2616 2: 1374 3: 1200 4: 1916 5: 1882 6: 1193 7: 1200 8: 1200 9: 1709
10: 1596 11: 1200 12: 1200 13: 1200 14: 1200 15: 1916 16: 3137
bogomips: 102211
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 pcie: speed: 8 GT/s
lanes: 16 ports: active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 05:00.0
chip-ID: 1002:1638 temp: 49.0 C
Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
bus-ID: 2-4:3 chip-ID: 13d3:56fb
Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.0.99
compositor: gnome-shell driver: N/A display-ID: 0
Monitor-1: eDP-1 res: 2560x1600 size: N/A
API: OpenGL v: 4.6 Mesa 23.0.0 renderer: AMD Radeon Graphics (renoir LLVM
15.0.7 DRM 3.49 6.2.7-300.fc38.x86_64) direct-render: Yes
Maybe also helpful, output of wayland-info
:
interface: 'wl_compositor', version: 5, name: 1
interface: 'wl_drm', version: 2, name: 2
interface: 'wl_shm', version: 1, name: 3
formats (fourcc):
0x48344258 = 'XB4H'
0x48344241 = 'AB4H'
0x48345258 = 'XR4H'
0x48345241 = 'AR4H'
0x30334258 = 'XB30'
0x30334241 = 'AB30'
0x30335258 = 'XR30'
0x30335241 = 'AR30'
0x36314752 = 'RG16'
0x34324258 = 'XB24'
0x34324241 = 'AB24'
1 = 'XR24'
0 = 'AR24'
interface: 'wl_output', version: 4, name: 4
name: eDP-1
description: Built-in display
x: 0, y: 0, scale: 1,
physical_width: 340 mm, physical_height: 220 mm,
make: 'CSO', model: '0x1602',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 2560 px, height: 1600 px, refresh: 60.000 Hz,
flags: current preferred
interface: 'zxdg_output_manager_v1', version: 3, name: 5
xdg_output_v1
output: 4
name: 'eDP-1'
description: 'Built-in display'
logical_x: 0, logical_y: 0
logical_width: 2560, logical_height: 1600
interface: 'wl_data_device_manager', version: 3, name: 6
interface: 'zwp_primary_selection_device_manager_v1', version: 1, name: 7
interface: 'wl_subcompositor', version: 1, name: 8
interface: 'xdg_wm_base', version: 4, name: 9
interface: 'gtk_shell1', version: 5, name: 10
interface: 'wp_viewporter', version: 1, name: 11
interface: 'wp_fractional_scale_manager_v1', version: 1, name: 12
interface: 'zwp_pointer_gestures_v1', version: 3, name: 13
interface: 'zwp_tablet_manager_v2', version: 1, name: 14
interface: 'wl_seat', version: 8, name: 15
name: seat0
capabilities: pointer keyboard
keyboard repeat rate: 33
keyboard repeat delay: 500
interface: 'zwp_relative_pointer_manager_v1', version: 1, name: 16
interface: 'zwp_pointer_constraints_v1', version: 1, name: 17
interface: 'zxdg_exporter_v2', version: 1, name: 18
interface: 'zxdg_importer_v2', version: 1, name: 19
interface: 'zxdg_exporter_v1', version: 1, name: 20
interface: 'zxdg_importer_v1', version: 1, name: 21
interface: 'zwp_linux_dmabuf_v1', version: 4, name: 22
main device: 0xE280
tranche
target device: 0xE280
flags: none
formats (fourcc) and modifiers (names):
0x34325241 = 'AR24'; 0x00ffffffffffffff = INVALID
0x34324241 = 'AB24'; 0x00ffffffffffffff = INVALID
0x34325258 = 'XR24'; 0x00ffffffffffffff = INVALID
0x34324258 = 'XB24'; 0x00ffffffffffffff = INVALID
0x30335241 = 'AR30'; 0x00ffffffffffffff = INVALID
0x30334241 = 'AB30'; 0x00ffffffffffffff = INVALID
0x30335258 = 'XR30'; 0x00ffffffffffffff = INVALID
0x30334258 = 'XB30'; 0x00ffffffffffffff = INVALID
0x36314752 = 'RG16'; 0x00ffffffffffffff = INVALID
0x48344241 = 'AB4H'; 0x00ffffffffffffff = INVALID
0x48344258 = 'XB4H'; 0x00ffffffffffffff = INVALID
interface: 'wp_single_pixel_buffer_manager_v1', version: 1, name: 23
interface: 'zwp_keyboard_shortcuts_inhibit_manager_v1', version: 1, name: 24
interface: 'zwp_text_input_manager_v3', version: 1, name: 25
interface: 'wp_presentation', version: 1, name: 26
presentation clock id: 1 (CLOCK_MONOTONIC)
interface: 'xdg_activation_v1', version: 1, name: 27