Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Transparent screenshots for one output #76

Open
haansn08 opened this issue Sep 1, 2020 · 4 comments
Open

Transparent screenshots for one output #76

haansn08 opened this issue Sep 1, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@haansn08
Copy link

haansn08 commented Sep 1, 2020

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

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.

@emersion
Copy link
Owner

emersion commented Sep 1, 2020

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

@emersion emersion added the bug Something isn't working label Sep 1, 2020
@haansn08
Copy link
Author

haansn08 commented Sep 1, 2020

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.

@emersion
Copy link
Owner

emersion commented Sep 1, 2020

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

@emersion
Copy link
Owner

emersion commented Sep 1, 2020

Ref #17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants