Bug 73076 - Corruption in weston using drm or wayland backends
Summary: Corruption in weston using drm or wayland backends
Status: RESOLVED NOTOURBUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-27 16:51 UTC by scimmia22
Modified: 2018-06-04 08:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot of Weston with Wayland backend (185.98 KB, image/png)
2013-12-27 16:51 UTC, scimmia22
Details

Description scimmia22 2013-12-27 16:51:19 UTC
Created attachment 91230 [details]
Screenshot of Weston with Wayland backend

Running weston-launch from a terminal results in a corrupt display. I'm running Enlightenment, which includes a wayland compositor as part of the X compositor, so I did more testing inside that. Running weston with the x11 backend is fine, but running it with the wayland backend displays the same corruption as the drm backend; log below of running it both ways, see attachment for a screenshot of the corruption. Running weston-simple-shm is fine, but weston-simple-egl shows the same corruption.

wayland and weston are both freshly built from git master, has happened consistently since I've been trying, prior to v1.2. Only thing in weston.ini is the xwayland module. Running an up to date Arch Linux system, and have found one other Arch user with the same issue, running the same video hardware. All other info should be in the log.



dnewgard@Scimmia ~/.config % weston --socket=wayland-1 --backend=x11-backend.so
Date: 2013-12-27 CST
[10:24:55.662] weston 1.3.91
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.91
               Build: 1.3.91-6-g24dff2b-dirty compositor: Clean up view output move and destroy listeners (2013-12-19 21:52:09 -0800)
[10:24:55.662] OS: Linux, 3.12.6-1-ck, #1 SMP PREEMPT Fri Dec 20 14:01:51 EST 2013, x86_64
[10:24:55.662] Using config file '/home/dnewgard/.config/weston.ini'
[10:24:55.662] Loading module '/usr/lib/weston/x11-backend.so'
[10:24:55.671] initializing x11 backend
[10:24:55.672] Loading module '/usr/lib/weston/gl-renderer.so'
[10:24:55.690] Using gl renderer
[10:24:55.690] launching '/usr/lib/weston/weston-keyboard'
[10:24:55.705] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 0
[10:24:55.715] EGL version: 1.4 (Gallium)
[10:24:55.718] EGL vendor: Mesa Project
[10:24:55.718] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2
[10:24:55.718] EGL extensions: EGL_WL_bind_wayland_display EGL_KHR_image_base
               EGL_KHR_image_pixmap EGL_KHR_image EGL_KHR_reusable_sync
               EGL_KHR_fence_sync EGL_KHR_surfaceless_context
               EGL_NOK_swap_region EGL_NV_post_sub_buffer
[10:24:55.718] GL version: OpenGL ES 2.0 Mesa 10.0.1
[10:24:55.718] GLSL version: OpenGL ES GLSL ES 1.0.16
[10:24:55.718] GL vendor: X.Org R300 Project
[10:24:55.719] GL renderer: Gallium 0.4 on ATI RV515
[10:24:55.719] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_OES_depth24 GL_OES_element_index_uint
               GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8
               GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D
               GL_OES_texture_npot GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg
               GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer
               GL_EXT_map_buffer_range GL_OES_surfaceless_context
[10:24:55.719] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[10:24:55.719] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[10:24:55.719] x11 output 1024x640, window id 14680069
[10:24:55.719] Loading module '/usr/lib/weston/desktop-shell.so'
[10:24:55.720] Loading module '/usr/lib/weston/xwayland.so'[10:24:55.721] xserver listening on display :1
[10:24:55.721] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[10:24:55.721] libwayland: using socket /tmp/XDG_RUNTIME_1000/wayland-1
[10:24:55.743] launching '/usr/lib/weston/weston-desktop-shell'
[10:26:48.758] libwayland: disconnect from client 0x1853ce0[10:26:48.758] libwayland: disconnect from client 0x2421380
dnewgard@Scimmia ~/.config % weston --socket=wayland-1 --backend=wayland-backend.so
Date: 2013-12-27 CST
[10:27:21.173] weston 1.3.91
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.91
               Build: 1.3.91-6-g24dff2b-dirty compositor: Clean up view output move and destroy listeners (2013-12-19 21:52:09 -0800)
[10:27:21.173] OS: Linux, 3.12.6-1-ck, #1 SMP PREEMPT Fri Dec 20 14:01:51 EST 2013, x86_64
[10:27:21.173] Using config file '/home/dnewgard/.config/weston.ini'
[10:27:21.173] Loading module '/usr/lib/weston/wayland-backend.so'
[10:27:21.179] launching '/usr/lib/weston/weston-keyboard'
[10:27:21.180] Loading module '/usr/lib/weston/gl-renderer.so'
[10:27:21.204] Creating 1024x640 wayland output at (0, 0)
[10:27:21.210] Chosen EGL config details:
               RGBA bits: 8 8 8 8
               swap interval range: 0 - 0
[10:27:21.220] EGL version: 1.4 (Gallium)
[10:27:21.220] EGL vendor: Mesa Project
[10:27:21.221] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2
[10:27:21.221] EGL extensions: EGL_KHR_image_base EGL_KHR_reusable_sync
               EGL_KHR_fence_sync EGL_KHR_surfaceless_context
[10:27:21.221] GL version: OpenGL ES 3.0 Mesa 10.0.1
[10:27:21.221] GLSL version: OpenGL ES GLSL ES 3.0
[10:27:21.221] GL vendor: VMware, Inc.
[10:27:21.221] GL renderer: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits)
[10:27:21.221] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
               GL_OES_element_index_uint GL_OES_fbo_render_mipmap
               GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
               GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot
               GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg
               GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer
               GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map
               GL_OES_surfaceless_context GL_EXT_color_buffer_float
[10:27:21.223] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[10:27:21.223] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: no
[10:27:21.240] Loading module '/usr/lib/weston/desktop-shell.so'
[10:27:21.241] Loading module '/usr/lib/weston/xwayland.so'
[10:27:21.242] xserver listening on display :1
[10:27:21.242] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[10:27:21.242] libwayland: using socket /tmp/XDG_RUNTIME_1000/wayland-1
[10:27:21.245] launching '/usr/lib/weston/weston-desktop-shell'
[10:28:05.648] caught signal 2
[10:28:05.648] libwayland: disconnect from client 0xa83720
[10:28:05.648] libwayland: disconnect from client 0xb421c0
Comment 1 scimmia22 2013-12-27 17:16:14 UTC
Log using drm backend:

Date: 2013-12-27 CST
[11:12:43.529] weston 1.3.91
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.91
               Build: 1.3.91-6-g24dff2b-dirty compositor: Clean up view output move and destroy listeners (2013-12-19 21:52:09 -0800)
[11:12:43.529] OS: Linux, 3.12.6-1-ck, #1 SMP PREEMPT Fri Dec 20 14:01:51 EST 2013, x86_64
[11:12:43.529] Using config file '/home/dnewgard/.config/weston.ini'
[11:12:43.529] Loading module '/usr/lib/weston/drm-backend.so'
[11:12:43.531] initializing drm backend
[11:12:43.531] using /dev/dri/card0
[11:12:43.531] Loading module '/usr/lib/weston/gl-renderer.so'
[11:12:43.630] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 0
[11:12:43.642] EGL version: 1.4 (DRI2)
[11:12:43.642] EGL vendor: Mesa Project
[11:12:43.642] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3
[11:12:43.642] EGL extensions: EGL_MESA_drm_image EGL_WL_bind_wayland_display
               EGL_KHR_image_base EGL_KHR_gl_renderbuffer_image
               EGL_KHR_surfaceless_context EGL_KHR_create_context
               EGL_EXT_buffer_age
[11:12:43.642] GL version: OpenGL ES 2.0 Mesa 10.0.1
[11:12:43.642] GLSL version: OpenGL ES GLSL ES 1.0.16
[11:12:43.642] GL vendor: X.Org R300 Project
[11:12:43.642] GL renderer: Gallium 0.4 on ATI RV515
[11:12:43.642] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_OES_depth24 GL_OES_element_index_uint
               GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8
               GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D
               GL_OES_texture_npot GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg
               GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer
               GL_EXT_map_buffer_range GL_OES_surfaceless_context
[11:12:43.643] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[11:12:43.644] Initialized backlight, device /sys/class/backlight/acpi_video0
[11:12:43.644] EDID data 'SEC', '', ''
[11:12:43.644] Output LVDS1, (connector 17, crtc 11)
  mode 1680x1050@60.0, preferred, current
  mode 1400x1050@60.0
  mode 1280x1024@59.9
  mode 1440x900@59.9
  mode 1280x960@59.9
  mode 1280x854@59.9
  mode 1280x800@59.8
  mode 1280x720@59.9
  mode 1152x768@59.8
  mode 1024x768@59.9
  mode 800x600@59.9
  mode 848x480@59.7
  mode 720x480@59.7
  mode 640x480@59.4
[11:12:43.717] launching '/usr/lib/weston/weston-keyboard'
[11:12:43.730] input device Video Bus, /dev/input/event6 is a keyboard
[11:12:43.730] input device Power Button, /dev/input/event4 is a keyboard
[11:12:43.730] not using input device '/dev/input/event3'.
[11:12:43.730] input device Sleep Button, /dev/input/event5 is a keyboard
[11:12:43.730] not using input device '/dev/input/event8'.
[11:12:43.731] not using input device '/dev/input/event7'.
[11:12:43.731] input device Broadcom Corp, /dev/input/event1 is a keyboard
[11:12:43.731] input device Broadcom Corp, /dev/input/event2 is a pointer caps = relative-motion button
[11:12:43.731] input device AT Translated Set 2 keyboard, /dev/input/event0 is a keyboard
[11:12:43.731] input device SynPS/2 Synaptics TouchPad, /dev/input/event11 is a touchpad
[11:12:43.731] input device SynPS/2 Synaptics TouchPad, /dev/input/event11 is a pointer caps = absolute-motion button
[11:12:43.732] not using input device '/dev/input/event9'.
[11:12:43.732] input device Dell WMI hotkeys, /dev/input/event10 is a keyboard
[11:12:43.732] Loading module '/usr/lib/weston/desktop-shell.so'
[11:12:43.732] Loading module '/usr/lib/weston/xwayland.so'
[11:12:43.736] xserver listening on display :1
[11:12:43.736] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[11:12:43.736] libwayland: using socket /tmp/XDG_RUNTIME_1000/wayland-0
[11:12:43.746] launching '/usr/lib/weston/weston-desktop-shell'
[11:12:45.691] device /dev/input/event6 died
[11:12:45.691] device /dev/input/event4 died
[11:12:45.691] deactivating session
[11:12:47.257] caught signal 15
[11:12:47.257] libwayland: disconnect from client 0x1ba1650
[11:12:47.257] libwayland: disconnect from client 0x1e8d000
Comment 2 scimmia22 2014-01-03 07:28:23 UTC
Could have something to do with resolution. I just loaded up weston-terminal and it looked the same, but as I resized it, the angle of the vertical lines changed and if I got it just right, it looked fine. Starting weston with the wayland backend, the log reports "Creating 1024x640 wayland output at (0, 0)", but Enlightenment reports the resolution as 1100x737. Resizing that window doesn't help, though. Neither does resizing weston-simple-egl.

I would blame Enlightenment if it wasn't that the drm backend looks exactly the same.
Comment 3 Pekka Paalanen 2014-01-03 20:46:40 UTC
(In reply to comment #2)
> Could have something to do with resolution. I just loaded up weston-terminal
> and it looked the same, but as I resized it, the angle of the vertical lines
> changed and if I got it just right, it looked fine. Starting weston with the
> wayland backend, the log reports "Creating 1024x640 wayland output at (0,
> 0)", but Enlightenment reports the resolution as 1100x737. Resizing that
> window doesn't help, though. Neither does resizing weston-simple-egl.

weston-simple-egl is not resizable, and I think the Wayland backend is neither. You'd have to set the size in advance.

What you describe does sound and look like "bad pitch", which would likely be a 3D driver issue.

Btw. did you notice, that some of your runs use the ATI RV515 renderer while the other one uses llvmpipe (software) renderer for OpenGL? That might actually help to narrow down the bug, if you do that intentionally, and do not accidentally e.g. mix different Mesa versions, for instance what Weston uses vs. your hosting X server.
Comment 4 Pekka Paalanen 2014-01-03 20:50:10 UTC
(In reply to comment #3)
> weston-simple-egl is not resizable, and I think the Wayland backend is
> neither. You'd have to set the size in advance.

Oops, sorry, looks like they nowadays do have resizing support.
Comment 5 scimmia22 2014-01-03 21:02:43 UTC
Actually I hadn't noticed that, interesting. What's more, the wayland backend is running llvm pipe while the drm backend is running RV515, both of which have the problem which makes me think it's not specific to the renderer. The x11 backend that works is also running RV515. All of the logs were run within an hour of each other with no changes on the system in between.

As for resizing, I just tried it again, when resizing weston-terminal, it's actually the terminal itself being resized where the others I was resizing with the WM's decorations. In the latter case, it was just stretching things.
Comment 6 Daniel Stone 2018-06-04 08:15:07 UTC
I believe this would be an error in the GBM implementation, but either way this should be fixed now since others have managed to run it fine on similar hardware.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.