Hello,
I'm using grim latest commit (7dbb0f39) and have this issue on several RPI boards.
$ WAYLAND_DEBUG=client grim /tmp/test.png
[1793513.816] -> wl_display@1.get_registry(new id wl_registry@2)
[1793513.910] -> wl_display@1.sync(new id wl_callback@3)
[1793726.665] wl_display@1.delete_id(3)
[1793726.724] wl_registry@2.global(1, "wl_shm", 1)
[1793726.740] -> wl_registry@2.bind(1, "wl_shm", 1, new id [unknown]@4)
[1793726.758] wl_registry@2.global(2, "wl_drm", 2)
[1793726.768] wl_registry@2.global(3, "zwp_linux_dmabuf_v1", 4)
[1793726.776] wl_registry@2.global(4, "wl_compositor", 5)
[1793726.784] wl_registry@2.global(5, "wl_subcompositor", 1)
[1793726.793] wl_registry@2.global(6, "wl_data_device_manager", 3)
[1793726.802] wl_registry@2.global(7, "zwlr_gamma_control_manager_v1", 1)
[1793726.810] wl_registry@2.global(8, "zxdg_output_manager_v1", 3)
[1793726.828] -> wl_registry@2.bind(8, "zxdg_output_manager_v1", 2, new id [unknown]@5)
[1793726.838] wl_registry@2.global(9, "org_kde_kwin_idle", 1)
[1793726.848] wl_registry@2.global(10, "ext_idle_notifier_v1", 1)
[1793726.856] wl_registry@2.global(11, "zwp_idle_inhibit_manager_v1", 1)
[1793726.864] wl_registry@2.global(12, "zwlr_layer_shell_v1", 4)
[1793726.872] wl_registry@2.global(13, "xdg_wm_base", 2)
[1793726.881] wl_registry@2.global(14, "zwp_tablet_manager_v2", 1)
[1793726.891] wl_registry@2.global(15, "org_kde_kwin_server_decoration_manager", 1)
[1793726.899] wl_registry@2.global(16, "zxdg_decoration_manager_v1", 1)
[1793726.907] wl_registry@2.global(17, "zwp_relative_pointer_manager_v1", 1)
[1793726.915] wl_registry@2.global(18, "zwp_pointer_constraints_v1", 1)
[1793726.923] wl_registry@2.global(19, "wp_presentation", 1)
[1793726.935] wl_registry@2.global(20, "zwlr_output_manager_v1", 4)
[1793727.028] wl_registry@2.global(21, "zwlr_output_power_manager_v1", 1)
[1793727.040] wl_registry@2.global(22, "zwp_input_method_manager_v2", 1)
[1793727.048] wl_registry@2.global(23, "zwp_text_input_manager_v3", 1)
[1793727.059] wl_registry@2.global(24, "zwlr_foreign_toplevel_manager_v1", 3)
[1793727.069] wl_registry@2.global(25, "ext_session_lock_manager_v1", 1)
[1793727.077] wl_registry@2.global(26, "wp_drm_lease_device_v1", 1)
[1793727.086] wl_registry@2.global(27, "zwlr_export_dmabuf_manager_v1", 1)
[1793727.094] wl_registry@2.global(28, "zwlr_screencopy_manager_v1", 3)
[1793727.105] -> wl_registry@2.bind(28, "zwlr_screencopy_manager_v1", 1, new id [unknown]@6)
[1793727.114] wl_registry@2.global(29, "zwlr_data_control_manager_v1", 2)
[1793727.122] wl_registry@2.global(30, "zwp_primary_selection_device_manager_v1", 1)
[1793727.131] wl_registry@2.global(31, "wp_viewporter", 1)
[1793727.142] wl_registry@2.global(32, "wp_single_pixel_buffer_manager_v1", 1)
[1793727.151] wl_registry@2.global(33, "zxdg_exporter_v1", 1)
[1793727.159] wl_registry@2.global(34, "zxdg_importer_v1", 1)
[1793727.167] wl_registry@2.global(35, "zxdg_exporter_v2", 1)
[1793727.175] wl_registry@2.global(36, "zxdg_importer_v2", 1)
[1793727.182] wl_registry@2.global(37, "xdg_activation_v1", 1)
[1793727.190] wl_registry@2.global(38, "zwp_virtual_keyboard_manager_v1", 1)
[1793727.198] wl_registry@2.global(39, "zwlr_virtual_pointer_manager_v1", 2)
[1793727.206] wl_registry@2.global(40, "zwlr_input_inhibit_manager_v1", 1)
[1793727.216] wl_registry@2.global(41, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1793727.224] wl_registry@2.global(42, "wl_seat", 8)
[1793727.232] wl_registry@2.global(43, "zwp_pointer_gestures_v1", 3)
[1793727.241] wl_registry@2.global(44, "wl_output", 4)
[1793727.249] -> wl_registry@2.bind(44, "wl_output", 3, new id [unknown]@7)
[1793727.261] wl_callback@3.done(1828)
[1793727.272] -> zxdg_output_manager_v1@5.get_xdg_output(new id zxdg_output_v1@3, wl_output@7)
[1793727.285] -> wl_display@1.sync(new id wl_callback@8)
[1793728.546] wl_display@1.delete_id(8)
[1793728.686] wl_output@7.geometry(0, 0, 1220, 690, 0, "LG Electronics", "LG SIGNAGE", 0)
[1793728.727] wl_output@7.mode(1, 3840, 2160, 30000)
[1793728.746] wl_output@7.scale(1)
[1793728.767] wl_output@7.done()
[1793728.795] zxdg_output_v1@3.name("HDMI-A-1")
[1793728.818] zxdg_output_v1@3.description("LG Electronics LG SIGNAGE 0x00000101 (HDMI-A-1)")
[1793728.936] zxdg_output_v1@3.logical_position(0, 0)
[1793729.002] zxdg_output_v1@3.logical_size(3840, 2160)
[1793729.031] zxdg_output_v1@3.done()
[1793729.047] wl_callback@8.done(1828)
[1793729.080] -> zwlr_screencopy_manager_v1@6.capture_output(new id zwlr_screencopy_frame_v1@8, 0, wl_output@7)
[1793729.264] zwlr_screencopy_frame_v1@8.buffer(875709016, 3840, 2160, 15360)
[1793729.469] -> wl_shm@4.create_pool(new id wl_shm_pool@9, fd 5, 33177600)
[1793729.499] -> wl_shm_pool@9.create_buffer(new id wl_buffer@10, 0, 3840, 2160, 15360, 875709016)
[1793729.519] -> wl_shm_pool@9.destroy()
[1793729.540] -> zwlr_screencopy_frame_v1@8.copy(wl_buffer@10)
[1793911.829] wl_display@1.delete_id(9)
[1793911.891] wl_display@1.error(wl_buffer@10, 2, "error accessing SHM buffer")
wl_buffer@10: error 2: error accessing SHM buffer
failed to screenshoot all outputs
$ swaymsg -t get_outputs
Output HDMI-A-1 'LG Electronics LG SIGNAGE 0x00000101' (focused)
Current mode: 3840x2160 @ 30.000 Hz
Position: 0,0
Scale factor: 1.000000
Scale filter: nearest
Subpixel hinting: unknown
Transform: normal
Workspace: 1
Max render time: off
Adaptive sync: disabled
Available modes:
3840x2160 @ 30.000 Hz
3840x2160 @ 30.000 Hz (16:9)
3840x2160 @ 29.970 Hz (16:9)
3840x2160 @ 25.000 Hz (16:9)
3840x2160 @ 24.000 Hz (16:9)
3840x2160 @ 23.976 Hz (16:9)
1920x1080 @ 60.000 Hz
1920x1080 @ 60.000 Hz (16:9)
1920x1080 @ 59.940 Hz (16:9)
1920x1080 @ 50.000 Hz (16:9)
1920x1080 @ 30.000 Hz (16:9)
1920x1080 @ 29.970 Hz (16:9)
1920x1080 @ 25.000 Hz (16:9)
1920x1080 @ 24.000 Hz (16:9)
1920x1080 @ 23.976 Hz (16:9)
1680x1050 @ 59.883 Hz
1280x1024 @ 60.020 Hz
1152x864 @ 59.967 Hz
1280x720 @ 60.000 Hz (16:9)
1280x720 @ 59.940 Hz (16:9)
1280x720 @ 50.000 Hz (16:9)
1024x768 @ 60.004 Hz
800x600 @ 60.317 Hz
720x576 @ 50.000 Hz (4:3)
720x576 @ 50.000 Hz (16:9)
720x480 @ 60.000 Hz (4:3)
720x480 @ 60.000 Hz (16:9)
720x480 @ 59.940 Hz (4:3)
720x480 @ 59.940 Hz (16:9)
640x480 @ 60.000 Hz (4:3)
640x480 @ 59.940 Hz
640x480 @ 59.940 Hz (4:3)
Any idea what the problem could be ?
Can you post compositor debug logs as well?
It seems my problem is most probably related to sway compositor
00:01:34.290 [DEBUG] [wlr] [types/output/render.c:282] Disabling direct scan-out on output 'HDMI-A-2' (locks: 1) 00:01:34.290 [DEBUG] [wlr] [types/output/output.c:590] Direct scan-out disabled by lock 00:01:34.456 [DEBUG] [wlr] [types/output/render.c:282] Enabling direct scan-out on output 'HDMI-A-2' (locks: 0) 00:01:34.456 [DEBUG] [wlr] [backend/drm/renderer.c:340] Buffer format 0x34325241 with modifier 0x700000000000006 cannot be scanned out 00:01:34.456 [DEBUG] [wlr] [backend/drm/drm.c:423] connector HDMI-A-2: Failed to import buffer for scan-out
These log lines are not errors and are expected. Can you link the full debug log?