RV530 renders improperly at non 4:3 resolutions.
Not sure if this is the correct place to be posting this bug. I'm not 100% sure where the bug exists, I hope that someone can provide guidance as to where to post this if this is not the correct spot.
I have an 2005 iMac (G5 Intel Processor) with a Radeon RV530, it's running Debian buster. The native resolution of the screen is 1680x1050.
When starting gdm in X11 (i.e. WaylandEnable=false), everything works fine.
When starting gdm in a Wayland session (i.e. NOT WaylandEnable=false), the screen renders "diagonally", as if there is an incorrect number of column pixels being displayed for the screen. Described by others as tearing or 'corrupt'. The mouse is still clearly visible and moves correctly. Moving the mouse and interacting with the screen appears to work, as the screen responds to various clicks (e.g. moving the lock screen down), but it's still illegible.
When starting Weston, the screen exhibits the same behaviour as gdm/Wayland.
However, when starting Weston and specifying a mode=1280x1024 (or any other lower 4:3 resolution). The screen renders properly.
I've seen this behaviour reported on other forums, but the solution that is reccomended in all the posts is generally to just run X11. I would think that's there's something in a wayland/DRM/DRI/radeon driver that needs to be corrected to fix this issue.
Redhat bug 1214419
Arch topic 240863
Redhat bug 1227272
Ubuntu topic 2390536
Here is the relevant excerpt from the journalctl log
Apr 11 16:27:10 oldmac kernel: [drm] radeon kernel modesetting enabled.
Apr 11 16:27:10 oldmac kernel: [drm] initializing kernel modesetting (RV530 0x1002:0x71C5 0x106B:0x0080 0x00).
Apr 11 16:27:10 oldmac kernel: ATOM BIOS: M56P
Apr 11 16:27:10 oldmac kernel: [drm] Generation 2 PCI interface, using max accessible memory
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: VRAM: 128M 0x0000000000000000 - 0x0000000007FFFFFF (128M used)
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: GTT: 512M 0x0000000008000000 - 0x0000000027FFFFFF
Apr 11 16:27:10 oldmac kernel: [drm] Detected VRAM RAM=128M, BAR=128M
Apr 11 16:27:10 oldmac kernel: [drm] RAM width 128bits DDR
Apr 11 16:27:10 oldmac kernel: [TTM] Zone kernel: Available graphics memory: 1529896 kiB
Apr 11 16:27:10 oldmac kernel: [TTM] Initializing pool allocator
Apr 11 16:27:10 oldmac kernel: [TTM] Initializing DMA pool allocator
Apr 11 16:27:10 oldmac kernel: [drm] radeon: 128M of VRAM memory ready
Apr 11 16:27:10 oldmac kernel: [drm] radeon: 512M of GTT memory ready.
Apr 11 16:27:10 oldmac kernel: [drm] GART: num cpu pages 131072, num gpu pages 131072
Apr 11 16:27:10 oldmac kernel: [drm] radeon: 1 quad pipes, 2 z pipes initialized.
Apr 11 16:27:10 oldmac kernel: [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: WB enabled
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000008000000 and cpu addr 0x(____ptrval____)
Apr 11 16:27:10 oldmac kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Apr 11 16:27:10 oldmac kernel: [drm] Driver supports precise vblank timestamp query.
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: radeon: MSI limited to 32-bit
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: radeon: using MSI.
Apr 11 16:27:10 oldmac kernel: [drm] radeon: irq initialized.
Apr 11 16:27:10 oldmac kernel: [drm] Loading R500 Microcode
Apr 11 16:27:10 oldmac kernel: radeon 0000:01:00.0: firmware: direct-loading firmware radeon/R520_cp.bin
Apr 11 16:27:10 oldmac kernel: [drm] radeon: ring at 0x0000000008001000
Apr 11 16:27:10 oldmac kernel: [drm] ring test succeeded in 9 usecs
Apr 11 16:27:10 oldmac kernel: [drm] ib test succeeded in 0 usecs
Apr 11 16:27:10 oldmac kernel: [drm] Radeon Display Connectors
Apr 11 16:27:10 oldmac kernel: [drm] Connector 0:
Apr 11 16:27:10 oldmac kernel: [drm] LVDS-1
Apr 11 16:27:10 oldmac kernel: [drm] DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
Apr 11 16:27:10 oldmac kernel: [drm] Encoders:
Apr 11 16:27:10 oldmac kernel: [drm] LCD1: INTERNAL_LVTM1
Apr 11 16:27:10 oldmac kernel: [drm] Connector 1:
Apr 11 16:27:10 oldmac kernel: [drm] SVIDEO-1
Apr 11 16:27:10 oldmac kernel: [drm] Encoders:
Apr 11 16:27:10 oldmac kernel: [drm] TV1: INTERNAL_KLDSCP_DAC2
Apr 11 16:27:10 oldmac kernel: [drm] Connector 2:
Apr 11 16:27:10 oldmac kernel: [drm] DVI-I-1
Apr 11 16:27:10 oldmac kernel: [drm] HPD1
Apr 11 16:27:10 oldmac kernel: [drm] DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
Apr 11 16:27:10 oldmac kernel: [drm] Encoders:
Apr 11 16:27:10 oldmac kernel: [drm] CRT2: INTERNAL_KLDSCP_DAC2
Apr 11 16:27:10 oldmac kernel: [drm] DFP1: INTERNAL_KLDSCP_TMDS1
here is the modes output from the card.
watchtv@oldmac:~$ cat /sys/class/drm/card0-LVDS-1/modes
1680x1050
1400x1050
1280x1024
1440x900
1280x960
1280x854
1280x800
1280x720
1152x768
1024x768
800x600
848x480
720x480
640x480
Here's the weston output.
Date: 2020-04-11 CDT
[16:12:24.205] weston 5.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: unknown (not built from git or tarball)
[16:12:24.206] Command line: weston
[16:12:24.206] OS: Linux, 4.19.0-8-amd64, #1 SMP Debian 4.19.98-1 (2020-01-26), x86_64
[16:12:24.206] Using config file '/home/watchtv/.config/weston.ini'
[16:12:24.206] Output repaint window is 7 ms maximum.
[16:12:24.206] Loading module '/usr/lib/x86_64-linux-gnu/libweston-5/drm-backend.so'
[16:12:24.209] initializing drm backend
[16:12:24.213] logind: session control granted
[16:12:24.219] using /dev/dri/card0
[16:12:24.219] DRM: supports universal planes
[16:12:24.219] DRM: does not support atomic modesetting
[16:12:24.219] DRM: supports picture aspect ratio
[16:12:24.219] Loading module '/usr/lib/x86_64-linux-gnu/libweston-5/gl-renderer.so'
[16:12:24.319] EGL client extensions: EGL_EXT_device_base
EGL_EXT_device_enumeration EGL_EXT_device_query
EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
EGL_EXT_client_extensions EGL_KHR_debug
EGL_EXT_platform_wayland EGL_EXT_platform_x11
EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
[16:12:24.321] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected.
[16:12:24.321] warning: Disabling render GPU timeline due to missing EGL_ANDROID_native_fence_sync extension
[16:12:24.321] EGL_KHR_surfaceless_context available
[16:12:24.330] EGL version: 1.4
[16:12:24.330] EGL vendor: Mesa Project
[16:12:24.330] EGL client APIs: OpenGL OpenGL_ES
[16:12:24.330] EGL extensions: EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import
EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context
EGL_KHR_create_context_no_error EGL_KHR_fence_sync
EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image
EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_image
EGL_KHR_image_base EGL_KHR_image_pixmap
EGL_KHR_no_config_context EGL_KHR_reusable_sync
EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
EGL_KHR_wait_sync EGL_MESA_configless_context
EGL_MESA_drm_image EGL_MESA_image_dma_buf_export
EGL_WL_bind_wayland_display
[16:12:24.330] GL version: OpenGL ES 2.0 Mesa 18.3.6
[16:12:24.330] GLSL version: OpenGL ES GLSL ES 1.0.16
[16:12:24.331] GL vendor: X.Org R300 Project
[16:12:24.331] GL renderer: ATI RV530
[16:12:24.331] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_compression_s3tc GL_EXT_occlusion_query_boolean
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_float
GL_OES_texture_half_float GL_OES_texture_npot
GL_OES_vertex_half_float 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_EXT_frag_depth GL_NV_fbo_color_attachments
GL_OES_EGL_image_external GL_OES_EGL_sync
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_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil
GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug
GL_KHR_texture_compression_astc_ldr
GL_OES_required_internalformat GL_OES_surfaceless_context
GL_EXT_separate_shader_objects
GL_EXT_compressed_ETC1_RGB8_sub_texture
GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp
GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex
GL_OES_texture_border_clamp GL_KHR_no_error
GL_KHR_texture_compression_astc_sliced_3d
[16:12:24.331] GL ES 2 renderer features:
read-back format: BGRA
wl_shm sub-image to texture: yes
EGL Wayland extension: yes
[16:12:24.342] event1 - Power Button: is tagged by udev as: Keyboard
[16:12:24.342] event1 - Power Button: device is a keyboard
[16:12:24.346] event0 - Power Button: is tagged by udev as: Keyboard
[16:12:24.347] event0 - Power Button: device is a keyboard
[16:12:24.350] event8 - HDA Intel Line: is tagged by udev as: Switch
[16:12:24.353] event9 - HDA Intel Headphone: is tagged by udev as: Switch
[16:12:24.358] event10 - HDA Intel SPDIF In: is tagged by udev as: Switch
[16:12:24.365] event2 - USB AUDIO : is tagged by udev as: Keyboard
[16:12:24.365] event2 - USB AUDIO : device is a keyboard
[16:12:24.371] event3 - Logitech K400 Plus: is tagged by udev as: Keyboard Mouse
[16:12:24.371] event3 - Logitech K400 Plus: device is a pointer
[16:12:24.371] event3 - Logitech K400 Plus: device is a keyboard
[16:12:24.377] event4 - Apple Computer, Inc. IR Receiver: is tagged by udev as: Keyboard
[16:12:24.377] event4 - Apple Computer, Inc. IR Receiver: device is a keyboard
[16:12:24.381] event7 - PC Speaker: not tagged as supported input device
[16:12:24.381] event7 - not using input device '/dev/input/event7'
[16:12:24.390] DRM: head 'LVDS-1' found, connector 45 is connected, EDID make 'APP', model 'Color LCD', serial '16843009'
[16:12:24.425] DRM: head 'SVIDEO-1' found, connector 46 is disconnected.
[16:12:24.460] DRM: head 'DVI-I-1' found, connector 47 is disconnected.
[16:12:24.461] Registered plugin API 'weston_drm_output_api_v1' of size 24
[16:12:24.461] Chosen EGL config details:
RGBA bits: 8 8 8 0
swap interval range: 1 - 1
[16:12:24.461] No backlight control for output 'LVDS-1'
[16:12:24.461] Output LVDS-1 (crtc 39) video modes:
1680x1050@59.9, preferred, 119.0 MHz
1400x1050@60.0, 121.8 MHz
1280x1024@60.0, current, 109.1 MHz
1440x900@60.0, 106.7 MHz
1280x960@60.0, 101.3 MHz
1280x854@60.0, 89.3 MHz
1280x800@60.0, 83.7 MHz
1280x720@60.0, 74.6 MHz
1152x768@60.0, 72.0 MHz
1024x768@59.9, 63.5 MHz
800x600@60.0, 38.3 MHz
848x480@59.9, 31.6 MHz
720x480@59.9, 26.9 MHz
640x480@59.9, 24.0 MHz
[16:12:24.461] associating input device event1 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event0 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event8 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event9 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event10 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event2 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event3 with output LVDS-1 (none by udev)
[16:12:24.461] associating input device event4 with output LVDS-1 (none by udev)
[16:12:24.461] Output 'LVDS-1' enabled with head(s) LVDS-1
[16:12:24.461] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[16:12:24.462] Loading module '/usr/lib/x86_64-linux-gnu/weston/desktop-shell.so'
[16:12:24.462] launching '/usr/lib/weston/weston-keyboard'
[16:12:24.464] launching '/usr/lib/weston/weston-desktop-shell'
[16:19:53.164] lock surface gone
[16:25:08.590] lock surface gone
child 2336 exited
[16:25:31.291] output for input device event1 removed
[16:25:31.291] output for input device event0 removed
[16:25:31.291] output for input device event8 removed
[16:25:31.291] output for input device event9 removed
[16:25:31.291] output for input device event10 removed
[16:25:31.291] output for input device event2 removed
[16:25:31.292] output for input device event3 removed
[16:25:31.292] output for input device event4 removed
[16:25:31.293] event1 - Power Button: device removed
[16:25:31.293] event0 - Power Button: device removed
[16:25:31.293] event8 - HDA Intel Line: device removed
[16:25:31.293] event9 - HDA Intel Headphone: device removed
[16:25:31.293] event10 - HDA Intel SPDIF In: device removed
[16:25:31.293] event2 - USB AUDIO : device removed
[16:25:31.293] event3 - Logitech K400 Plus: device removed
[16:25:31.294] event4 - Apple Computer, Inc. IR Receiver: device removed