~emersion/kanshi#97: 
output mirroring support

I'm using wayfire, kanshi 1.4.0 on arch. The options available don't allow me to configure an output to be a mirror of another one.

Status
REPORTED
Submitter
~je-vv
Assigned to
No-one
Submitted
6 months ago
Updated
6 months ago
Labels
No labels applied.

~emersion 6 months ago

Mirroring an output with the same mode should be possible already by setting the same position. For different sizes, kanshi would need https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/merge_requests/116.

~je-vv 6 months ago

I do have same resolution and frequency screens, I mean same modes. If I do what you say, to use the same position, the mirroring screen shares/mirrors the wallpaper, and I can see the mouse movements on the mirroring screen, but that's all, the applications, waybar and the rest don't show up. But they do have different sizes.

On wayfire after this commit: https://github.com/WayfireWM/wayfire/commit/17da01e6f694bf62f31aae9a800e4fec137d031e

Mirroring is supported. The weird thing is that the wlsunset screen changes don't get reflected on the mirroring screen. But it does work. Bad thing is that I wan to use kanshi profiles instead.

Could this be some sort of bug somewhere?

~je-vv 6 months ago

Here it goes the output from WAYLAND_DEBUG=1 kanshi:

[ 794483.564]  -> wl_display@1.get_registry(new id wl_registry@2)
[ 794483.587]  -> wl_display@1.sync(new id wl_callback@3)
[ 794483.825] wl_display@1.delete_id(3)
[ 794483.854] wl_registry@2.global(1, "wl_shm", 1)
[ 794483.864] wl_registry@2.global(2, "wl_drm", 2)
[ 794483.869] wl_registry@2.global(3, "zwp_linux_dmabuf_v1", 4)
[ 794483.875] wl_registry@2.global(4, "wl_compositor", 5)
[ 794483.880] wl_registry@2.global(5, "wl_subcompositor", 1)
[ 794483.886] wl_registry@2.global(6, "wl_data_device_manager", 3)
[ 794483.892] wl_registry@2.global(7, "zwp_primary_selection_device_manager_v1", 1)
[ 794483.898] wl_registry@2.global(8, "zwlr_data_control_manager_v1", 2)
[ 794483.903] wl_registry@2.global(9, "zwlr_output_manager_v1", 4)
[ 794483.911]  -> wl_registry@2.bind(9, "zwlr_output_manager_v1", 4, new id [unknown]@4)
[ 794483.919] wl_registry@2.global(10, "zwlr_output_power_manager_v1", 1)
[ 794483.925] wl_registry@2.global(11, "xdg_wm_base", 2)
[ 794483.933] wl_registry@2.global(12, "zwlr_layer_shell_v1", 4)
[ 794483.939] wl_registry@2.global(13, "zwp_tablet_manager_v2", 1)
[ 794483.945] wl_registry@2.global(14, "wl_seat", 8)
[ 794483.955] wl_registry@2.global(15, "zwlr_screencopy_manager_v1", 3)
[ 794483.968] wl_registry@2.global(16, "zwlr_gamma_control_manager_v1", 1)
[ 794483.973] wl_registry@2.global(17, "zwlr_export_dmabuf_manager_v1", 1)
[ 794483.979] wl_registry@2.global(18, "zxdg_output_manager_v1", 3)
[ 794483.985] wl_registry@2.global(19, "zwlr_input_inhibit_manager_v1", 1)
[ 794483.991] wl_registry@2.global(20, "org_kde_kwin_server_decoration_manager", 1)
[ 794483.997] wl_registry@2.global(21, "zxdg_decoration_manager_v1", 1)
[ 794484.003] wl_registry@2.global(22, "zwp_virtual_keyboard_manager_v1", 1)
[ 794484.009] wl_registry@2.global(23, "zwlr_virtual_pointer_manager_v1", 2)
[ 794484.015] wl_registry@2.global(24, "zwp_idle_inhibit_manager_v1", 1)
[ 794484.021] wl_registry@2.global(25, "org_kde_kwin_idle", 1)
[ 794484.027] wl_registry@2.global(26, "zwp_pointer_gestures_v1", 3)
[ 794484.034] wl_registry@2.global(27, "zwp_relative_pointer_manager_v1", 1)
[ 794484.039] wl_registry@2.global(28, "zwp_pointer_constraints_v1", 1)
[ 794484.045] wl_registry@2.global(29, "zwp_input_method_manager_v2", 1)
[ 794484.052] wl_registry@2.global(30, "zwp_text_input_manager_v3", 1)
[ 794484.058] wl_registry@2.global(31, "wp_presentation", 1)
[ 794484.064] wl_registry@2.global(32, "wp_viewporter", 1)
[ 794484.070] wl_registry@2.global(33, "zxdg_exporter_v1", 1)
[ 794484.076] wl_registry@2.global(34, "zxdg_importer_v1", 1)
[ 794484.081] wl_registry@2.global(35, "zxdg_exporter_v2", 1)
[ 794484.089] wl_registry@2.global(36, "zxdg_importer_v2", 1)
[ 794484.094] wl_registry@2.global(37, "wl_output", 4)
[ 794484.100] wl_registry@2.global(38, "zwlr_foreign_toplevel_manager_v1", 3)
[ 794484.106] wl_registry@2.global(39, "gtk_shell1", 3)
[ 794484.111] wl_registry@2.global(40, "wl_output", 4)
[ 794484.118] wl_callback@3.done(582)
[ 794484.568] zwlr_output_manager_v1@4.head(new id zwlr_output_head_v1@4278190080)
[ 794484.593] zwlr_output_head_v1@4278190080.name("HDMI-A-4")
[ 794484.602] zwlr_output_head_v1@4278190080.description("HP Inc. HP V24i 1CR20308TZ (HDMI-A-4)")
[ 794484.607] zwlr_output_head_v1@4278190080.physical_size(530, 300)
[ 794484.614] zwlr_output_head_v1@4278190080.make("HP Inc.")
[ 794484.620] zwlr_output_head_v1@4278190080.model("HP V24i")
[ 794484.624] zwlr_output_head_v1@4278190080.serial_number("1CR20308TZ")
[ 794484.630] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190081)
[ 794484.635] zwlr_output_mode_v1@4278190081.size(1920, 1080)
[ 794484.635] zwlr_output_mode_v1@4278190081.size(1920, 1080)
[ 794484.641] zwlr_output_mode_v1@4278190081.refresh(60000)
[ 794484.647] zwlr_output_mode_v1@4278190081.preferred()
[ 794484.652] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190082)
[ 794484.657] zwlr_output_mode_v1@4278190082.size(1920, 1080)
[ 794484.662] zwlr_output_mode_v1@4278190082.refresh(59940)
[ 794484.666] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190083)
[ 794484.672] zwlr_output_mode_v1@4278190083.size(1920, 1080)
[ 794484.677] zwlr_output_mode_v1@4278190083.refresh(50000)
[ 794484.681] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190084)
[ 794484.689] zwlr_output_mode_v1@4278190084.size(1680, 1050)
[ 794484.694] zwlr_output_mode_v1@4278190084.refresh(59883)
[ 794484.698] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190085)
[ 794484.703] zwlr_output_mode_v1@4278190085.size(1600, 900)
[ 794484.709] zwlr_output_mode_v1@4278190085.refresh(60000)
[ 794484.713] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190086)
[ 794484.718] zwlr_output_mode_v1@4278190086.size(1280, 1024)
[ 794484.723] zwlr_output_mode_v1@4278190086.refresh(60020)
[ 794484.728] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190087)
[ 794484.734] zwlr_output_mode_v1@4278190087.size(1440, 900)
[ 794484.739] zwlr_output_mode_v1@4278190087.refresh(59901)
[ 794484.744] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190088)
[ 794484.749] zwlr_output_mode_v1@4278190088.size(1280, 800)
[ 794484.754] zwlr_output_mode_v1@4278190088.refresh(59910)
[ 794484.758] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190089)
[ 794484.763] zwlr_output_mode_v1@4278190089.size(1280, 720)
[ 794484.769] zwlr_output_mode_v1@4278190089.refresh(60000)
[ 794484.773] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190090)
[ 794484.778] zwlr_output_mode_v1@4278190090.size(1280, 720)
[ 794484.785] zwlr_output_mode_v1@4278190090.refresh(59940)
[ 794484.789] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190091)
[ 794484.796] zwlr_output_mode_v1@4278190091.size(1280, 720)
[ 794484.801] zwlr_output_mode_v1@4278190091.refresh(50000)
[ 794484.806] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190092)
[ 794484.813] zwlr_output_mode_v1@4278190092.size(1024, 768)
[ 794484.818] zwlr_output_mode_v1@4278190092.refresh(60004)
[ 794484.822] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190093)
[ 794484.828] zwlr_output_mode_v1@4278190093.size(800, 600)
[ 794484.833] zwlr_output_mode_v1@4278190093.refresh(60317)
[ 794484.837] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190094)
[ 794484.844] zwlr_output_mode_v1@4278190094.size(720, 576)
[ 794484.852] zwlr_output_mode_v1@4278190094.refresh(50000)
[ 794484.859] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190095)
[ 794484.868] zwlr_output_mode_v1@4278190095.size(720, 480)
[ 794484.876] zwlr_output_mode_v1@4278190095.refresh(60000)
[ 794484.880] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190096)
[ 794484.886] zwlr_output_mode_v1@4278190096.size(720, 480)
[ 794484.891] zwlr_output_mode_v1@4278190096.refresh(59940)
[ 794484.895] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190097)
[ 794484.900] zwlr_output_mode_v1@4278190097.size(640, 480)
[ 794484.906] zwlr_output_mode_v1@4278190097.refresh(60000)
[ 794484.910] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190098)
[ 794484.915] zwlr_output_mode_v1@4278190098.size(640, 480)
[ 794484.921] zwlr_output_mode_v1@4278190098.refresh(59940)
[ 794484.925] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190099)
[ 794484.930] zwlr_output_mode_v1@4278190099.size(720, 400)
[ 794484.936] zwlr_output_mode_v1@4278190099.refresh(70082)
[ 794484.940] zwlr_output_head_v1@4278190080.enabled(1)
[ 794484.945] zwlr_output_head_v1@4278190080.current_mode(zwlr_output_mode_v1@4278190081)
[ 794484.951] zwlr_output_head_v1@4278190080.position(0, 0)
[ 794484.957] zwlr_output_head_v1@4278190080.transform(0)
[ 794484.962] zwlr_output_head_v1@4278190080.scale(1.00000000)
[ 794484.968] zwlr_output_head_v1@4278190080.adaptive_sync(0)
[ 794484.973] zwlr_output_manager_v1@4.head(new id zwlr_output_head_v1@4278190100)
[ 794484.981] zwlr_output_head_v1@4278190100.name("eDP-1")
[ 794484.986] zwlr_output_head_v1@4278190100.description("Chimei Innolux Corporation 0x1515 (eDP-1)")
[ 794484.992] zwlr_output_head_v1@4278190100.physical_size(340, 190)
[ 794484.997] zwlr_output_head_v1@4278190100.make("Chimei Innolux Corporation")
[ 794485.002] zwlr_output_head_v1@4278190100.model("0x1515")
[ 794485.008] zwlr_output_head_v1@4278190100.mode(new id zwlr_output_mode_v1@4278190101)
[ 794485.013] zwlr_output_mode_v1@4278190101.size(1920, 1080)
[ 794485.019] zwlr_output_mode_v1@4278190101.refresh(60008)
[ 794485.023] zwlr_output_mode_v1@4278190101.preferred()
[ 794485.028] zwlr_output_head_v1@4278190100.mode(new id zwlr_output_mode_v1@4278190102)
[ 794485.033] zwlr_output_mode_v1@4278190102.size(1920, 1080)
[ 794485.040] zwlr_output_mode_v1@4278190102.refresh(40004)
[ 794485.049] zwlr_output_head_v1@4278190100.enabled(1)
[ 794485.056] zwlr_output_head_v1@4278190100.current_mode(zwlr_output_mode_v1@4278190101)
[ 794485.065] zwlr_output_head_v1@4278190100.position(0, 0)
[ 794485.074] zwlr_output_head_v1@4278190100.transform(0)
[ 794485.084] zwlr_output_head_v1@4278190100.scale(1.00000000)
[ 794485.092] zwlr_output_head_v1@4278190100.adaptive_sync(0)
[ 794485.101] zwlr_output_manager_v1@4.done(512)
applying profile 'laptop-monitor-home-monitor'
[ 794485.118]  -> zwlr_output_manager_v1@4.create_configuration(new id zwlr_output_configuration_v1@3, 512)
applying profile output 'eDP-1' on connected head 'eDP-1'
[ 794485.128]  -> zwlr_output_configuration_v1@3.enable_head(new id zwlr_output_configuration_head_v1@5, zwlr_output_head_v1@4278190100)
[ 794485.137]  -> zwlr_output_configuration_head_v1@5.set_position(0, 0)
applying profile output 'HDMI-A-4' on connected head 'HDMI-A-4'
[ 794485.146]  -> zwlr_output_configuration_v1@3.enable_head(new id zwlr_output_configuration_head_v1@6, zwlr_output_head_v1@4278190080)
[ 794485.159]  -> zwlr_output_configuration_head_v1@6.set_position(0, 0)
[ 794485.166]  -> zwlr_output_configuration_v1@3.apply()
[ 794489.127] wl_display@1.delete_id(6)
[ 794489.156] wl_display@1.delete_id(5)
[ 794489.163] zwlr_output_configuration_v1@3.succeeded()
[ 794489.170]  -> zwlr_output_configuration_v1@3.destroy()
configuration for profile 'laptop-monitor-home-monitor' applied

I can see:

[ 794484.593] zwlr_output_head_v1@4278190080.name("HDMI-A-4")
...
[ 794484.945] zwlr_output_head_v1@4278190080.current_mode(zwlr_output_mode_v1@4278190081)
[ 794484.951] zwlr_output_head_v1@4278190080.position(0, 0)
[ 794484.957] zwlr_output_head_v1@4278190080.transform(0)
[ 794484.962] zwlr_output_head_v1@4278190080.scale(1.00000000)
[ 794484.968] zwlr_output_head_v1@4278190080.adaptive_sync(0)
...
[ 794484.981] zwlr_output_head_v1@4278190100.name("eDP-1")
...
[ 794485.056] zwlr_output_head_v1@4278190100.current_mode(zwlr_output_mode_v1@4278190101)
[ 794485.065] zwlr_output_head_v1@4278190100.position(0, 0)
[ 794485.074] zwlr_output_head_v1@4278190100.transform(0)
[ 794485.084] zwlr_output_head_v1@4278190100.scale(1.00000000)
[ 794485.092] zwlr_output_head_v1@4278190100.adaptive_sync(0)

Which shows both outputs using the same mode. Then finally:

[ 794485.056] zwlr_output_head_v1@4278190100.current_mode(zwlr_output_mode_v1@4278190101)
[ 794485.065] zwlr_output_head_v1@4278190100.position(0, 0)
[ 794485.074] zwlr_output_head_v1@4278190100.transform(0)
[ 794485.084] zwlr_output_head_v1@4278190100.scale(1.00000000)
[ 794485.092] zwlr_output_head_v1@4278190100.adaptive_sync(0)

And the profiles I'm trying:

% cat ~/.config/kanshi/config
profile laptop-monitor-home-monitor {
        output HDMI-A-4 position 0,0
        output eDP-1 position 0,0
}

profile laptop-only {
        output eDP-1 enable
}

So both outputs with same mode, and both at position 0,0, but only the eDP-1 is showing up stuff, while HDMI-A-4 shows the wallpaper and waybar, but it doesn't show on waybar the applications running which show on the eDP-1 output. Again, when moving the mouse, it does seem to be mirrorred, since I see the movements on both outputs, but I can see anything related to what's running on HDMI-A-4, neither its waybar...

Register here or Log in to comment, or comment via email.