~emersion/grim#49: 
Transparent screenshots for one output

My left output refuses to get screenshotted by grim: 20200901_10h15m36s_grim As you can see the right output works fine :)

stderr of grim with `WAYLAND_DEBUG=client`
[531637.416]  -> wl_display@1.get_registry(new id wl_registry@2)
[531637.831] wl_registry@2.global(1, "wl_shm", 1)
[531637.890]  -> wl_registry@2.bind(1, "wl_shm", 1, new id [unknown]@3)
[531637.937] wl_registry@2.global(2, "wl_drm", 2)
[531637.965] wl_registry@2.global(3, "zwp_linux_dmabuf_v1", 3)
[531637.993] wl_registry@2.global(4, "wl_compositor", 4)
[531638.020] wl_registry@2.global(5, "wl_subcompositor", 1)
[531638.046] wl_registry@2.global(6, "wl_data_device_manager", 3)
[531638.073] wl_registry@2.global(7, "zwlr_gamma_control_manager_v1", 1)
[531638.100] wl_registry@2.global(8, "gtk_primary_selection_device_manager", 1)
[531638.127] wl_registry@2.global(9, "zxdg_output_manager_v1", 3)
[531638.156]  -> wl_registry@2.bind(9, "zxdg_output_manager_v1", 2, new id [unknown]@4)
[531638.198] wl_registry@2.global(10, "org_kde_kwin_idle", 1)
[531638.226] wl_registry@2.global(11, "zwp_idle_inhibit_manager_v1", 1)
[531638.253] wl_registry@2.global(12, "zwlr_layer_shell_v1", 2)
[531638.279] wl_registry@2.global(13, "xdg_wm_base", 2)
[531638.307] wl_registry@2.global(14, "zwp_tablet_manager_v2", 1)
[531638.334] wl_registry@2.global(15, "org_kde_kwin_server_decoration_manager", 1)
[531638.361] wl_registry@2.global(16, "zxdg_decoration_manager_v1", 1)
[531638.388] wl_registry@2.global(17, "zwp_relative_pointer_manager_v1", 1)
[531638.414] wl_registry@2.global(18, "zwp_pointer_constraints_v1", 1)
[531638.441] wl_registry@2.global(19, "wp_presentation", 1)
[531638.468] wl_registry@2.global(20, "zwlr_output_manager_v1", 1)
[531638.495] wl_registry@2.global(21, "zwlr_output_power_manager_v1", 1)
[531638.522] wl_registry@2.global(22, "zwp_input_method_manager_v2", 1)
[531638.549] wl_registry@2.global(23, "zwp_text_input_manager_v3", 1)
[531638.576] wl_registry@2.global(24, "zwlr_foreign_toplevel_manager_v1", 2)
[531638.603] wl_registry@2.global(25, "zwlr_export_dmabuf_manager_v1", 1)
[531638.630] wl_registry@2.global(26, "zwlr_screencopy_manager_v1", 3)
[531638.657]  -> wl_registry@2.bind(26, "zwlr_screencopy_manager_v1", 1, new id [unknown]@5)
[531638.705] wl_registry@2.global(27, "zwlr_data_control_manager_v1", 2)
[531638.725] wl_registry@2.global(28, "zwp_primary_selection_device_manager_v1", 1)
[531638.746] wl_registry@2.global(29, "wp_viewporter", 1)
[531638.766] wl_registry@2.global(30, "zwp_virtual_keyboard_manager_v1", 1)
[531638.786] wl_registry@2.global(31, "zwlr_virtual_pointer_manager_v1", 2)
[531638.806] wl_registry@2.global(32, "zwlr_input_inhibit_manager_v1", 1)
[531638.826] wl_registry@2.global(33, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[531638.846] wl_registry@2.global(34, "wl_seat", 7)
[531638.867] wl_registry@2.global(35, "zwp_pointer_gestures_v1", 1)
[531638.887] wl_registry@2.global(36, "wl_output", 3)
[531638.908]  -> wl_registry@2.bind(36, "wl_output", 3, new id [unknown]@6)
[531638.936] wl_registry@2.global(37, "wl_output", 3)
[531638.956]  -> wl_registry@2.bind(37, "wl_output", 3, new id [unknown]@7)
[531638.986]  -> wl_display@1.sync(new id wl_callback@8)
[531639.149] wl_display@1.delete_id(8)
[531639.174] wl_output@6.geometry(0, 0, 480, 270, 0, "Samsung Electric Company", "S22B300", 0)
[531639.222] wl_output@6.mode(1, 1920, 1080, 60000)
[531639.249] wl_output@6.scale(1)
[531639.259] wl_output@6.done()
[531639.267] wl_output@7.geometry(0, 0, 520, 300, 0, "Unknown", "Q24", 0)
[531639.313] wl_output@7.mode(1, 1600, 1200, 60000)
[531639.339] wl_output@7.scale(1)
[531639.349] wl_output@7.done()
[531639.356] wl_callback@8.done(10760)
[531639.368]  -> zxdg_output_manager_v1@4.get_xdg_output(new id zxdg_output_v1@8, wl_output@7)
[531639.388]  -> zxdg_output_manager_v1@4.get_xdg_output(new id zxdg_output_v1@9, wl_output@6)
[531639.524] zxdg_output_v1@8.name("VGA-1")
[531639.547] zxdg_output_v1@8.description("Unknown Q24 709050660001 (VGA-1)")
[531639.559] zxdg_output_v1@8.logical_position(0, 0)
[531639.575] zxdg_output_v1@8.logical_size(1600, 1200)
[531639.590] zxdg_output_v1@8.done()
[531639.598] wl_output@7.done()
[531639.605] zxdg_output_v1@9.name("DVI-I-1")
[531639.615] zxdg_output_v1@9.description("Samsung Electric Company S22B300 H4XC602789 (DVI-I-1)")
[531639.633] zxdg_output_v1@9.logical_position(1600, 50)
[531639.649] zxdg_output_v1@9.logical_size(1920, 1080)
[531639.664] zxdg_output_v1@9.done()
[531639.671] wl_output@6.done()
[531639.680]  -> wl_display@1.sync(new id wl_callback@10)
[531639.798] wl_display@1.delete_id(10)
[531639.821] wl_callback@10.done(10760)
[531639.835]  -> zwlr_screencopy_manager_v1@5.capture_output(new id zwlr_screencopy_frame_v1@10, 0, wl_output@7)
[531639.861]  -> zwlr_screencopy_manager_v1@5.capture_output(new id zwlr_screencopy_frame_v1@11, 0, wl_output@6)
[531640.066] zwlr_screencopy_frame_v1@10.buffer(0, 1600, 1200, 6400)
[531640.158]  -> wl_shm@3.create_pool(new id wl_shm_pool@12, fd 5, 7680000)
[531640.185]  -> wl_shm_pool@12.create_buffer(new id wl_buffer@13, 0, 1600, 1200, 6400, 0)
[531640.223]  -> wl_shm_pool@12.destroy()
[531640.232]  -> zwlr_screencopy_frame_v1@10.copy(wl_buffer@13)
[531640.243] zwlr_screencopy_frame_v1@11.buffer(0, 1920, 1080, 7680)
[531640.283]  -> wl_shm@3.create_pool(new id wl_shm_pool@14, fd 6, 8294400)
[531640.307]  -> wl_shm_pool@14.create_buffer(new id wl_buffer@15, 0, 1920, 1080, 7680, 0)
[531640.344]  -> wl_shm_pool@14.destroy()
[531640.352]  -> zwlr_screencopy_frame_v1@11.copy(wl_buffer@15)
[531661.715] wl_display@1.delete_id(12)
[531661.739] wl_display@1.delete_id(14)
[531661.754] zwlr_screencopy_frame_v1@11.flags(1)
[531661.759] zwlr_screencopy_frame_v1@11.ready(0, 5547, 292587586)
[531674.420] zwlr_screencopy_frame_v1@10.flags(1)
[531674.443] zwlr_screencopy_frame_v1@10.ready(0, 5547, 311122860)
[531892.771]  -> zwlr_screencopy_frame_v1@10.destroy()
[531892.945]  -> wl_buffer@13.destroy()
[531892.951]  -> zxdg_output_v1@8.destroy()
[531892.955]  -> wl_output@7.release()
[531892.958]  -> zwlr_screencopy_frame_v1@11.destroy()
[531893.151]  -> wl_buffer@15.destroy()
[531893.155]  -> zxdg_output_v1@9.destroy()
[531893.158]  -> wl_output@6.release()
[531893.162]  -> zwlr_screencopy_manager_v1@5.destroy()
[531893.165]  -> zxdg_output_manager_v1@4.destroy()

output of `swaymsg -pt get_outputs`
Output DVI-I-1 'Samsung Electric Company S22B300 H4XC602789' (focused)
  Current mode: 1920x1080 @ 60.000000 Hz
  Position: 1600,50
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    720x400 @ 70.082001 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 66.667000 Hz
    640x480 @ 72.808998 Hz
    640x480 @ 75.000000 Hz
    800x600 @ 56.250000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 72.188004 Hz
    800x600 @ 75.000000 Hz
    832x624 @ 74.551003 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 70.069000 Hz
    1024x768 @ 75.028999 Hz
    1280x720 @ 60.000000 Hz
    1152x864 @ 75.000000 Hz
    1280x800 @ 59.810001 Hz
    1440x900 @ 59.887001 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1600x900 @ 60.000000 Hz
    1680x1050 @ 59.953999 Hz
    1920x1080 @ 60.000000 Hz

Output VGA-1 'Unknown Q24 709050660001'
  Current mode: 1600x1200 @ 60.000000 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:
    720x400 @ 70.082001 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 66.667000 Hz
    640x480 @ 72.808998 Hz
    640x480 @ 75.000000 Hz
    800x600 @ 56.250000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 72.188004 Hz
    800x600 @ 75.000000 Hz
    832x624 @ 74.551003 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 70.069000 Hz
    1024x768 @ 75.028999 Hz
    1152x864 @ 75.000000 Hz
    1280x960 @ 60.000000 Hz
    1440x900 @ 59.887001 Hz
    1440x900 @ 74.984001 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1400x1050 @ 59.978001 Hz
    1680x1050 @ 59.953999 Hz
    1600x1200 @ 60.000000 Hz

Version 1.3.1-1 on manjaro.

Status
REPORTED
Submitter
github.com:haansn08 (unverified)
Assigned to
No-one
Submitted
4 years ago
Updated
4 years ago
Labels
bug

github.com:emersion (unverified) 4 years ago · edit

Hmm, weird. Does it work fine to capture only VGA-1?

github.com:haansn08 (unverified) 4 years ago · edit

Running grim -o "VGA-1" gives a completely transparent png image. I just noticed everything works fine when setting the output format to jpeg or ppm.

github.com:emersion (unverified) 4 years ago · edit

Ah, these don't support alpha. Maybe we're incorrectly setting the alpha channel or something?

github.com:emersion (unverified) 4 years ago · edit