~je-vv


#12 Not working on mirroring monitor 6 months ago

Comment by ~je-vv on ~kennylevinsen/wlsunset

#98 Dynamic discovery of monitors turning off 6 months ago

Comment by ~je-vv on ~emersion/kanshi

From Kanshi not getting notified of outputs getting disconnected or turned off issue on github, I realized that by using kanshi 1.5.0, which I was not using before, pulling the cable out, in order to disconnect the external monitor from the laptop, actually makes kanshi change the profile, details on the wayfire issue. The sad thing is that turning the monitor off, or removing the power cable from the external monitor, do not generate the same behavior as just pulling the HDMI cable out of the laptop. So if there's a power outage for example, that won't get noticed by wayfire, since linux shows the output still connected. Indeed sounds like a linux bug then. But very uncomfortable. The workaround for power outages would be to actually remove the HDMI cable from the laptop.

There's a really bad behavior though, waybar with no exception crashes, which in my ming is not related to kanshi, but for others to be aware, that happens. Some times, after waybar crashes, wayfire also crashes, but that happens less often.

Also I think my prior testing with kanshi 1.4.0 exposed a different behavior when I unplugged the HDMI cable, because as far as I remembered that didn't trigger the profile change, like in the monitor turning off case.

I believe this can be closed.

Thanks a lot !

#97 output mirroring support 6 months ago

Comment by ~je-vv on ~emersion/kanshi

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...

#12 Not working on mirroring monitor 6 months ago

Comment by ~je-vv on ~kennylevinsen/wlsunset

Fixed the logs. Sorry about that, please take a look at them again.

If you allow me to, as I don't understand those logs, I can place an issue on wayfire, but referencing to this ticket. Please let me know.

#12 Not working on mirroring monitor 6 months ago

Comment by ~je-vv on ~kennylevinsen/wlsunset

These are the logs:

[  50894.109]  -> wl_display@1.get_registry(new id wl_registry@2)
[  50894.117]  -> wl_display@1.sync(new id wl_callback@3)
[  50896.555] wl_display@1.delete_id(3)
[  50896.562] wl_registry@2.global(1, "wl_shm", 1)
[  50896.564] wl_registry@2.global(2, "wl_drm", 2)
[  50896.566] wl_registry@2.global(3, "zwp_linux_dmabuf_v1", 4)
[  50896.567] wl_registry@2.global(4, "wl_compositor", 5)
[  50896.568] wl_registry@2.global(5, "wl_subcompositor", 1)
[  50896.569] wl_registry@2.global(6, "wl_data_device_manager", 3)
[  50896.571] wl_registry@2.global(7, "zwp_primary_selection_device_manager_v1", 1)
[  50896.572] wl_registry@2.global(8, "zwlr_data_control_manager_v1", 2)
[  50896.573] wl_registry@2.global(9, "zwlr_output_manager_v1", 4)
[  50896.574] wl_registry@2.global(10, "zwlr_output_power_manager_v1", 1)
[  50896.576] wl_registry@2.global(11, "xdg_wm_base", 2)
[  50896.577] wl_registry@2.global(12, "zwlr_layer_shell_v1", 4)
[  50896.579] wl_registry@2.global(13, "zwp_tablet_manager_v2", 1)
[  50896.580] wl_registry@2.global(14, "wl_seat", 8)
[  50896.581] wl_registry@2.global(15, "zwlr_screencopy_manager_v1", 3)
[  50896.583] wl_registry@2.global(16, "zwlr_gamma_control_manager_v1", 1)
[  50896.585]  -> wl_registry@2.bind(16, "zwlr_gamma_control_manager_v1", 1, new id [unknown]@4)
[  50896.587] wl_registry@2.global(17, "zwlr_export_dmabuf_manager_v1", 1)
[  50896.588] wl_registry@2.global(18, "zxdg_output_manager_v1", 3)
[  50896.589] wl_registry@2.global(19, "zwlr_input_inhibit_manager_v1", 1)
[  50896.591] wl_registry@2.global(20, "org_kde_kwin_server_decoration_manager", 1)
[  50896.592] wl_registry@2.global(21, "zxdg_decoration_manager_v1", 1)
[  50896.593] wl_registry@2.global(22, "zwp_virtual_keyboard_manager_v1", 1)
[  50896.595] wl_registry@2.global(23, "zwlr_virtual_pointer_manager_v1", 2)
[  50896.596] wl_registry@2.global(24, "zwp_idle_inhibit_manager_v1", 1)
[  50896.597] wl_registry@2.global(25, "org_kde_kwin_idle", 1)
[  50896.598] wl_registry@2.global(26, "zwp_pointer_gestures_v1", 3)
[  50896.600] wl_registry@2.global(27, "zwp_relative_pointer_manager_v1", 1)
[  50896.601] wl_registry@2.global(28, "zwp_pointer_constraints_v1", 1)
[  50896.602] wl_registry@2.global(29, "zwp_input_method_manager_v2", 1)
[  50896.604] wl_registry@2.global(30, "zwp_text_input_manager_v3", 1)
[  50896.605] wl_registry@2.global(31, "wp_presentation", 1)
[  50896.606] wl_registry@2.global(32, "wp_viewporter", 1)
[  50896.607] wl_registry@2.global(33, "zxdg_exporter_v1", 1)
[  50896.609] wl_registry@2.global(34, "zxdg_importer_v1", 1)
[  50896.610] wl_registry@2.global(35, "zxdg_exporter_v2", 1)
[  50896.611] wl_registry@2.global(36, "zxdg_importer_v2", 1)
[  50896.612] wl_registry@2.global(37, "wl_output", 4)
registry: adding output 37
[  50896.615]  -> wl_registry@2.bind(37, "wl_output", 1, new id [unknown]@5)
[  50896.617]  -> zwlr_gamma_control_manager_v1@4.get_gamma_control(new id zwlr_gamma_control_v1@6, wl_output@5)
[  50896.618] wl_registry@2.global(38, "zwlr_foreign_toplevel_manager_v1", 3)
[  50896.620] wl_registry@2.global(39, "gtk_shell1", 3)
[  50896.621] wl_callback@3.done(914)
[  50896.623]  -> wl_display@1.sync(new id wl_callback@3)
[  50896.736] wl_display@1.delete_id(3)
[  50896.743] zwlr_gamma_control_v1@6.gamma_size(1024)
[  50896.768] wl_callback@3.done(914)
calculated sun trajectory: polar night
setting temperature on output '37' to 4000 K
[  50896.870]  -> zwlr_gamma_control_v1@6.set_gamma(fd 7)

I hope those can be of help, since I can't really make sense out of them.

Thanks !

#12 Not working on mirroring monitor 6 months ago

Ticket created by ~je-vv on ~kennylevinsen/wlsunset

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

One can enable mirroring on the wayfire.ini, like:

[output:eDP-1]
mode = enabled

[output:HDMI-A-4]
mode = mirror eDP-1

If your wondering, both screens are running under the same mode (same resolutions, same frequency).

Bad thing, only on the output being mirrored (eDP-1), wlsunset has effect. wlsunset has no effect on the mirroring output (HDMI-A-4).

#98 Dynamic discovery of monitors turning off 6 months ago

Comment by ~je-vv on ~emersion/kanshi

It's wayfire. Which BTW, recommends using kanshi... I don't see any open/closed issue filed related to kanshi on wayfire, :( I'm not familiar with those logs? What should such an issue say? Perhaps referencing to this ticket?

#97 output mirroring support 6 months ago

Comment by ~je-vv on ~emersion/kanshi

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?

#98 Dynamic discovery of monitors turning off 6 months ago

Comment by ~je-vv on ~emersion/kanshi

Just the logs after the profile at the point the laptop-monitor-home was applied initially and then on:

applying profile 'laptop-monitor-home-monitor'
[1144682.390]  -> zwlr_output_manager_v1@4.create_configuration(new id zwlr_output_configuration_v1@3, 7654)
applying profile output 'HDMI-A-4' on connected head 'HDMI-A-4'
[1144682.411]  -> zwlr_output_configuration_v1@3.enable_head(new id zwlr_output_configuration_head_v1@5, zwlr_output_head_v1@4278190083)
applying profile output 'eDP-1' on connected head 'eDP-1'
[1144682.425]  -> zwlr_output_configuration_v1@3.disable_head(zwlr_output_head_v1@4278190080)
[1144682.434]  -> zwlr_output_configuration_v1@3.apply()
[1144683.042] wl_display@1.delete_id(5)
[1144683.047] zwlr_output_configuration_v1@3.succeeded()
[1144683.049]  -> zwlr_output_configuration_v1@3.destroy()
configuration for profile 'laptop-monitor-home-monitor' applied

Notice how when turning the external monitor off the logs say:

applying profile output 'eDP-1' on connected head 'eDP-1'

But the profile laptop-only wasn't applied, and all monitors remained turned off, :( When turning the external monitor back on, then the profile laptop-monitor-home was applied again, which is fine:

configuration for profile 'laptop-monitor-home-monitor' applied

The full output, since starting kanshi:

[1144676.261]  -> wl_display@1.get_registry(new id wl_registry@2)
[1144676.279]  -> wl_display@1.sync(new id wl_callback@3)
[1144680.940] wl_display@1.delete_id(3)
[1144680.972] wl_registry@2.global(1, "wl_shm", 1)
[1144680.982] wl_registry@2.global(2, "wl_drm", 2)
[1144680.988] wl_registry@2.global(3, "zwp_linux_dmabuf_v1", 4)
[1144680.994] wl_registry@2.global(4, "wl_compositor", 5)
[1144680.999] wl_registry@2.global(5, "wl_subcompositor", 1)
[1144681.005] wl_registry@2.global(6, "wl_data_device_manager", 3)
[1144681.012] wl_registry@2.global(7, "zwp_primary_selection_device_manager_v1", 1)
[1144681.017] wl_registry@2.global(8, "zwlr_data_control_manager_v1", 2)
[1144681.023] wl_registry@2.global(9, "zwlr_output_manager_v1", 4)
[1144681.031]  -> wl_registry@2.bind(9, "zwlr_output_manager_v1", 4, new id [unknown]@4)
[1144681.039] wl_registry@2.global(10, "zwlr_output_power_manager_v1", 1)
[1144681.044] wl_registry@2.global(11, "xdg_wm_base", 2)
[1144681.050] wl_registry@2.global(12, "zwlr_layer_shell_v1", 4)
[1144681.055] wl_registry@2.global(13, "zwp_tablet_manager_v2", 1)
[1144681.061] wl_registry@2.global(14, "wl_seat", 8)
[1144681.067] wl_registry@2.global(15, "zwlr_screencopy_manager_v1", 3)
[1144681.073] wl_registry@2.global(16, "zwlr_gamma_control_manager_v1", 1)
[1144681.078] wl_registry@2.global(17, "zwlr_export_dmabuf_manager_v1", 1)
[1144681.084] wl_registry@2.global(18, "zxdg_output_manager_v1", 3)
[1144681.094] wl_registry@2.global(19, "zwlr_input_inhibit_manager_v1", 1)
[1144681.104] wl_registry@2.global(20, "org_kde_kwin_server_decoration_manager", 1)
[1144681.114] wl_registry@2.global(21, "zxdg_decoration_manager_v1", 1)
[1144681.123] wl_registry@2.global(22, "zwp_virtual_keyboard_manager_v1", 1)
[1144681.134] wl_registry@2.global(23, "zwlr_virtual_pointer_manager_v1", 2)
[1144681.140] wl_registry@2.global(24, "zwp_idle_inhibit_manager_v1", 1)
[1144681.147] wl_registry@2.global(25, "org_kde_kwin_idle", 1)
[1144681.153] wl_registry@2.global(26, "zwp_pointer_gestures_v1", 3)
[1144681.158] wl_registry@2.global(27, "zwp_relative_pointer_manager_v1", 1)
[1144681.164] wl_registry@2.global(28, "zwp_pointer_constraints_v1", 1)
[1144681.170] wl_registry@2.global(29, "zwp_input_method_manager_v2", 1)
[1144681.177] wl_registry@2.global(30, "zwp_text_input_manager_v3", 1)
[1144681.183] wl_registry@2.global(31, "wp_presentation", 1)
[1144681.189] wl_registry@2.global(32, "wp_viewporter", 1)
[1144681.197] wl_registry@2.global(33, "zxdg_exporter_v1", 1)
[1144681.207] wl_registry@2.global(34, "zxdg_importer_v1", 1)
[1144681.217] wl_registry@2.global(35, "zxdg_exporter_v2", 1)
[1144681.227] wl_registry@2.global(36, "zxdg_importer_v2", 1)
[1144681.245] wl_registry@2.global(39, "zwlr_foreign_toplevel_manager_v1", 3)
[1144681.251] wl_registry@2.global(40, "gtk_shell1", 3)
[1144681.259] wl_registry@2.global(57, "wl_output", 4)
[1144681.270] wl_callback@3.done(21745)
[1144681.704] zwlr_output_manager_v1@4.head(new id zwlr_output_head_v1@4278190080)
[1144681.727] zwlr_output_head_v1@4278190080.name("eDP-1")
[1144681.734] zwlr_output_head_v1@4278190080.description("Chimei Innolux Corporation 0x1515 (eDP-1)")
[1144681.740] zwlr_output_head_v1@4278190080.physical_size(340, 190)
[1144681.747] zwlr_output_head_v1@4278190080.make("Chimei Innolux Corporation")
[1144681.753] zwlr_output_head_v1@4278190080.model("0x1515")
[1144681.758] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190081)
[1144681.763] zwlr_output_mode_v1@4278190081.size(1920, 1080)
[1144681.769] zwlr_output_mode_v1@4278190081.refresh(60008)
[1144681.774] zwlr_output_mode_v1@4278190081.preferred()
[1144681.779] zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190082)
[1144681.784] zwlr_output_mode_v1@4278190082.size(1920, 1080)
[1144681.790] zwlr_output_mode_v1@4278190082.refresh(40004)
[1144681.794] zwlr_output_head_v1@4278190080.enabled(0)
[1144681.800] zwlr_output_manager_v1@4.head(new id zwlr_output_head_v1@4278190083)
[1144681.809] zwlr_output_head_v1@4278190083.name("HDMI-A-4")
[1144681.817] zwlr_output_head_v1@4278190083.description("HP Inc. HP V24i 1CR20308TZ (HDMI-A-4)")
[1144681.824] zwlr_output_head_v1@4278190083.physical_size(530, 300)
[1144681.833] zwlr_output_head_v1@4278190083.make("HP Inc.")
[1144681.841] zwlr_output_head_v1@4278190083.model("HP V24i")
[1144681.849] zwlr_output_head_v1@4278190083.serial_number("1CR20308TZ")
[1144681.857] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190084)
[1144681.866] zwlr_output_mode_v1@4278190084.size(1920, 1080)
[1144681.872] zwlr_output_mode_v1@4278190084.refresh(60000)
[1144681.878] zwlr_output_mode_v1@4278190084.preferred()
[1144681.885] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190085)
[1144681.894] zwlr_output_mode_v1@4278190085.size(1920, 1080)
[1144681.903] zwlr_output_mode_v1@4278190085.refresh(59940)
[1144681.911] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190086)
[1144681.919] zwlr_output_mode_v1@4278190086.size(1920, 1080)
[1144681.927] zwlr_output_mode_v1@4278190086.refresh(50000)
[1144681.936] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190087)
[1144681.946] zwlr_output_mode_v1@4278190087.size(1680, 1050)
[1144681.955] zwlr_output_mode_v1@4278190087.refresh(59883)
[1144681.963] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190088)
[1144681.971] zwlr_output_mode_v1@4278190088.size(1600, 900)
[1144681.980] zwlr_output_mode_v1@4278190088.refresh(60000)
[1144681.988] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190089)
[1144681.997] zwlr_output_mode_v1@4278190089.size(1280, 1024)
[1144682.006] zwlr_output_mode_v1@4278190089.refresh(60020)
[1144682.014] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190090)
[1144682.024] zwlr_output_mode_v1@4278190090.size(1440, 900)
[1144682.033] zwlr_output_mode_v1@4278190090.refresh(59901)
[1144682.041] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190091)
[1144682.050] zwlr_output_mode_v1@4278190091.size(1280, 800)
[1144682.058] zwlr_output_mode_v1@4278190091.refresh(59910)
[1144682.066] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190092)
[1144682.075] zwlr_output_mode_v1@4278190092.size(1280, 720)
[1144682.083] zwlr_output_mode_v1@4278190092.refresh(60000)
[1144682.092] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190093)
[1144682.100] zwlr_output_mode_v1@4278190093.size(1280, 720)
[1144682.109] zwlr_output_mode_v1@4278190093.refresh(59940)
[1144682.117] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190094)
[1144682.135] zwlr_output_mode_v1@4278190094.size(1280, 720)
[1144682.141] zwlr_output_mode_v1@4278190094.refresh(50000)
[1144682.147] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190095)
[1144682.156] zwlr_output_mode_v1@4278190095.size(1024, 768)
[1144682.164] zwlr_output_mode_v1@4278190095.refresh(60004)
[1144682.172] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190096)
[1144682.179] zwlr_output_mode_v1@4278190096.size(800, 600)
[1144682.184] zwlr_output_mode_v1@4278190096.refresh(60317)
[1144682.189] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190097)
[1144682.194] zwlr_output_mode_v1@4278190097.size(720, 576)
[1144682.199] zwlr_output_mode_v1@4278190097.refresh(50000)
[1144682.203] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190098)
[1144682.211] zwlr_output_mode_v1@4278190098.size(720, 480)
[1144682.220] zwlr_output_mode_v1@4278190098.refresh(60000)
[1144682.227] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190099)
[1144682.235] zwlr_output_mode_v1@4278190099.size(720, 480)
[1144682.244] zwlr_output_mode_v1@4278190099.refresh(59940)
[1144682.251] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190100)
[1144682.258] zwlr_output_mode_v1@4278190100.size(640, 480)
[1144682.267] zwlr_output_mode_v1@4278190100.refresh(60000)
[1144682.276] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190101)
[1144682.283] zwlr_output_mode_v1@4278190101.size(640, 480)
[1144682.291] zwlr_output_mode_v1@4278190101.refresh(59940)
[1144682.299] zwlr_output_head_v1@4278190083.mode(new id zwlr_output_mode_v1@4278190102)
[1144682.307] zwlr_output_mode_v1@4278190102.size(720, 400)
[1144682.315] zwlr_output_mode_v1@4278190102.refresh(70082)
[1144682.321] zwlr_output_head_v1@4278190083.enabled(1)
[1144682.329] zwlr_output_head_v1@4278190083.current_mode(zwlr_output_mode_v1@4278190084)
[1144682.338] zwlr_output_head_v1@4278190083.position(0, 0)
[1144682.347] zwlr_output_head_v1@4278190083.transform(0)
[1144682.355] zwlr_output_head_v1@4278190083.scale(1.00000000)
[1144682.364] zwlr_output_head_v1@4278190083.adaptive_sync(0)
[1144682.371] zwlr_output_manager_v1@4.done(7654)
applying profile 'laptop-monitor-home-monitor'
[1144682.390]  -> zwlr_output_manager_v1@4.create_configuration(new id zwlr_output_configuration_v1@3, 7654)
applying profile output 'HDMI-A-4' on connected head 'HDMI-A-4'
[1144682.411]  -> zwlr_output_configuration_v1@3.enable_head(new id zwlr_output_configuration_head_v1@5, zwlr_output_head_v1@4278190083)
applying profile output 'eDP-1' on connected head 'eDP-1'
[1144682.425]  -> zwlr_output_configuration_v1@3.disable_head(zwlr_output_head_v1@4278190080)
[1144682.434]  -> zwlr_output_configuration_v1@3.apply()
[1144683.042] wl_display@1.delete_id(5)
[1144683.047] zwlr_output_configuration_v1@3.succeeded()
[1144683.049]  -> zwlr_output_configuration_v1@3.destroy()
configuration for profile 'laptop-monitor-home-monitor' applied

#98 Dynamic discovery of monitors turning off 6 months ago

Ticket created by ~je-vv on ~emersion/kanshi

I'm using wayfire and kanshi 1.4.0 on arch. I have the following 2 profiles:

profile laptop-monitor-home {
        output HDMI-A-4 enable
        output eDP-1 disable
}

profile laptop-only {
        output eDP-1 enable
}

This so that when having the monitor turned on at home I can work with it, and turn off the laptop screen. I was expecting that if the monitor goes away, whether because it gets unplugged, or there's a power outage and only the laptop remains working on battery, then the profile dynamically and automatically changes to the one using only the laptop screen. That doesn't happen, I just remain with both screens turned off.

I tried, having alacritty up and with the command ready just to hit enter, for kanshictl reload, so that I just hit enter although I have no screen, then turn the external monitor off, and nothing, the profile kept used is the one when the monitor is present, and all monitors remain off.

I also tried similarly, having the command ready but for kanshictl switch laptop-only, and then turn the monitor off, and hit enter, and the monitors remain off, and kanshi's output is a complain that the profile doesn't apply to the current outputs.

It's like kanshi only autodetects outputs when it starts, but after that, when running, no dynamic discovery of outputs happen, when there are events of monitors or screens turning off/on.

Is there a work around I can apply? Are there plans to support such behaviors?

Supporting output mirroring would make this dynamic auto discovery unnecessary, since when mirroring, whether the laptop's screen goes off when closing the lid, or the monitor gets turned off for whatever reason, the other screen remains working, or so that's the way it works on Xorg, but I have no clue about it on wayland yet.

At any rate, both issues are different. The dynamic auto-discovery would work wonders, since when adding/removing external outputs, like projectors, TVs and so on, one could dynamically get what's specified in the profiles, without much hassle.

Thanks a lot !