sway
sway copied to clipboard
zwp_idle_inhibit_manager_v1 inhibits even if surface is never committed
Please read the following before submitting:
Please fill out the following:
-
Sway Version:
- First reproduced 2023-05-02, so not new issue.
- sway version 1.9
- sway version 1.10-dev-2e951163 (Mar 9 2024, branch 'master')
-
Debug Log:
- https://paste.sr.ht/~whynothugo/ec7fb327932d913edf0f059ffb2404a490355ded
-
Configuration File:
I use a test client to reproduce this (more info below).
exec target/debug/libcaffeine
exec wayidle -t 3 echo idle for three seconds
- Description:
If I create a layer-shell surface, and attach an idle inhibitor to it, idleness is inhibited even if the surface is never committed and never made visible. From idle-inhibit-unstable-v1:
An idle inhibitor prevents the output that the associated surface is visible on from being set to a state where it is not visually usable due to lack of user interaction (e.g. blanked, dimmed, locked, set to power save, etc.) Any screensaver processes are also blocked from displaying.
If the surface is destroyed, unmapped, becomes occluded, loses visibility, or otherwise becomes not visually relevant for the user, the idle inhibitor will not be honored by the compositor; if the surface subsequently regains visibility the inhibitor takes effect once again. Likewise, the inhibitor isn't honored if the system was already idled at the time the inhibitor was established, although if the system later de-idles and re-idles the inhibitor will take effect.
The following (unintentional) proof of concept allows reproducing the issue: https://git.sr.ht/~whynothugo/libcaffeine (currently reproducible with latest commit, aa4febcfbd6bd576d252427d48edefcd930acc40).
Output of the test tool with WAYLAND_DEBUG=1:
[wayrs] -> [email protected]_registry(new id wl_registry@2)
[wayrs] -> [email protected](new id wl_callback@3)
[wayrs] [email protected](1, "wl_shm", 1)
[wayrs] [email protected](2, "wl_drm", 2)
[wayrs] [email protected](3, "zwp_linux_dmabuf_v1", 4)
[wayrs] [email protected](4, "wl_compositor", 6)
[wayrs] [email protected](5, "wl_subcompositor", 1)
[wayrs] [email protected](6, "wl_data_device_manager", 3)
[wayrs] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[wayrs] [email protected](8, "zxdg_output_manager_v1", 3)
[wayrs] [email protected](9, "ext_idle_notifier_v1", 1)
[wayrs] [email protected](10, "zwp_idle_inhibit_manager_v1", 1)
[wayrs] [email protected](11, "zwlr_layer_shell_v1", 4)
[wayrs] [email protected](12, "xdg_wm_base", 2)
[wayrs] [email protected](13, "zwp_tablet_manager_v2", 1)
[wayrs] [email protected](14, "org_kde_kwin_server_decoration_manager", 1)
[wayrs] [email protected](15, "zxdg_decoration_manager_v1", 1)
[wayrs] [email protected](16, "zwp_relative_pointer_manager_v1", 1)
[wayrs] [email protected](17, "zwp_pointer_constraints_v1", 1)
[wayrs] [email protected](18, "wp_presentation", 1)
[wayrs] [email protected](19, "zwlr_output_manager_v1", 4)
[wayrs] [email protected](20, "zwlr_output_power_manager_v1", 1)
[wayrs] [email protected](21, "zwp_input_method_manager_v2", 1)
[wayrs] [email protected](22, "zwp_text_input_manager_v3", 1)
[wayrs] [email protected](23, "zwlr_foreign_toplevel_manager_v1", 3)
[wayrs] [email protected](24, "ext_session_lock_manager_v1", 1)
[wayrs] [email protected](25, "wp_drm_lease_device_v1", 1)
[wayrs] [email protected](26, "zwlr_export_dmabuf_manager_v1", 1)
[wayrs] [email protected](27, "zwlr_screencopy_manager_v1", 3)
[wayrs] [email protected](28, "zwlr_data_control_manager_v1", 2)
[wayrs] [email protected](29, "wp_security_context_manager_v1", 1)
[wayrs] [email protected](30, "wp_viewporter", 1)
[wayrs] [email protected](31, "wp_single_pixel_buffer_manager_v1", 1)
[wayrs] [email protected](32, "wp_content_type_manager_v1", 1)
[wayrs] [email protected](33, "wp_fractional_scale_manager_v1", 1)
[wayrs] [email protected](34, "zxdg_exporter_v1", 1)
[wayrs] [email protected](35, "zxdg_importer_v1", 1)
[wayrs] [email protected](36, "zxdg_exporter_v2", 1)
[wayrs] [email protected](37, "zxdg_importer_v2", 1)
[wayrs] [email protected](38, "xdg_activation_v1", 1)
[wayrs] [email protected](39, "wp_cursor_shape_manager_v1", 1)
[wayrs] [email protected](40, "zwp_virtual_keyboard_manager_v1", 1)
[wayrs] [email protected](41, "zwlr_virtual_pointer_manager_v1", 2)
[wayrs] [email protected](42, "zwlr_input_inhibit_manager_v1", 1)
[wayrs] [email protected](43, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[wayrs] [email protected](44, "zwp_pointer_gestures_v1", 3)
[wayrs] [email protected](45, "wl_seat", 8)
[wayrs] [email protected](47, "zwp_primary_selection_device_manager_v1", 1)
[wayrs] [email protected](48, "wl_output", 4)
[wayrs] [email protected](51, "wl_output", 4)
[wayrs] [email protected](22991)
[wayrs] -> [email protected](4, new id wl_compositor@4v4)
[wayrs] -> [email protected](11, new id zwlr_layer_shell_v1@5v2)
[wayrs] -> [email protected](10, new id zwp_idle_inhibit_manager_v1@6v1)
[wayrs] -> [email protected](48, new id wl_output@7v4)
[wayrs] -> [email protected]_surface(new id wl_surface@8)
[wayrs] -> [email protected]_layer_surface(new id zwlr_layer_surface_v1@9, 8, null, 3, "libcaffeine")
[wayrs] -> [email protected]_inhibitor(new id zwp_idle_inhibitor_v1@10, 8)
[wayrs] -> [email protected](51, new id wl_output@11v4)
[wayrs] -> [email protected]_surface(new id wl_surface@12)
[wayrs] -> [email protected]_layer_surface(new id zwlr_layer_surface_v1@13, 12, null, 3, "libcaffeine")
[wayrs] -> [email protected]_inhibitor(new id zwp_idle_inhibitor_v1@14, 12)
[wayrs] [email protected]_id(3)
[wayrs] [email protected](0, 0, 800, 340, 0, "Ancor Communications Inc", "ROG PG348Q", 0)
[wayrs] [email protected](1, 3440, 1440, 59973)
[wayrs] [email protected](2)
[wayrs] [email protected]("DP-1")
[wayrs] [email protected]("Ancor Communications Inc ROG PG348Q #ASMuhJCcVsHd (DP-1)")
[wayrs] [email protected]()
[wayrs] [email protected](0, 0, 310, 170, 0, "ASUSTek COMPUTER INC", "ASUS PA148", 0)
[wayrs] [email protected](1, 1920, 1080, 60000)
[wayrs] [email protected](2)
[wayrs] [email protected]("HDMI-A-1")
[wayrs] [email protected]("ASUSTek COMPUTER INC ASUS PA148 R3LMTF047543 (HDMI-A-1)")
[wayrs] [email protected]()