You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used the default config (except switched to term=alacritty, menu=wofi)
Description:
Connect to sway with any app that supports the zwlr_output_management_v1 protocol and just listen to the events (Here's my tiny Rust example, you need the wayland-client and wayland-protocols-wlr dependencies).
Connect an external monitor (I am using a monitor connected through HDMI)
Disable the monitor (I did this using wdisplays which itself uses the output management protocol).
Disconnect the monitor
Reconnect the monitor
See that the new head sends a mode event, but this mode is never populated (its size and refresh rate are never sent).
Bonus: Adjust any monitor (e.g., change the position of another monitor, re-enable the disabled monitor), and a finished event will be sent for the "phantom" mode.
Other details:
I tried this on river and dwl which both use wlroots 0.18. They do not seem to report this phantom mode, but they also have different behavior: Sway will keep the monitor disabled after hotplugging. river and dwl on the other hand will re-enable the monitor on hotplug (I suspect they are just treating the monitor as a brand new monitor). This is also why I've filed this issue against Sway and not wlroots.
The text was updated successfully, but these errors were encountered:
TL;DR even more reasons for why this is a Sway issue and not necessarily a wlroots issue.
Ok perhaps I'm misinterpreting the relationship with river and dwl. Something I didn't notice before (running two desktops at once and sharing a monitor): the "bonus" part seems to always re-enable the disabled monitor. That is, if you have two monitors eDP-1 and HDMI-A-1, apply the above steps to the HDMI-A-1 monitor, and then move eDP-1 (e.g., through wl-displays), HDMI-A-1 enables itself. So maybe river and dwl are doing something correctly that Sway isn't, resulting in this weird buggy behavior.
I assumed Sway was trying to be "smart" and keeping the monitor disabled since it was previously disabled, but maybe instead its a race condition of some kind. That could explain why after changing any other head, the "phantom" mode gets a finished event: the mode gets created accidentally which is sent before this phantom gets cleared server-side. Only later when another "done" batch is sent does the mode realize it doesn't exist and it "finishes" itself.
andriyDev
added a commit
to andriyDev/wl-distore
that referenced
this issue
Oct 31, 2024
Please fill out the following:
Sway Version:
Debug Log:
Configuration File:
Description:
wayland-client
andwayland-protocols-wlr
dependencies).mode
event, but this mode is never populated (its size and refresh rate are never sent).finished
event will be sent for the "phantom" mode.Other details:
river
anddwl
which both use wlroots 0.18. They do not seem to report this phantom mode, but they also have different behavior: Sway will keep the monitor disabled after hotplugging.river
anddwl
on the other hand will re-enable the monitor on hotplug (I suspect they are just treating the monitor as a brand new monitor). This is also why I've filed this issue against Sway and notwlroots
.The text was updated successfully, but these errors were encountered: