Hyprland: Disabling a monitor causes it to no longer be detected
Disabling through either kanshi, wlr-randr, or hyperctl makes the monitor undetectable through either.
So for example if I run hyprctl keyword monitor LVDS-1, disable
, the monitor LVDS-1
can no longer be found through: hyprctl monitors
, or wlr-randr
. Thus making it impossible to re-enable. Perhaps the issue that is being alluded to all the way at the end of #453. Perhaps this is even introduced by the fix?
running latest git version.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 21 (12 by maintainers)
I’ve been investigating this a bit, but I have no time at the moment to fully understand how to implement something (will definitely try in the future), but I’ll post my findings here, maybe they help somebody else (or vaxry himself, I’ll tag him).
As mentioned, the problem is that apparently Hyprland is not exactly following the wayland protocol somewhere.
When a monitor is disabled, Hyprland is sending the
finished
anddone
signals via wl_roots (see my previous comment): this shouldn’t happen. It seems to me that the reason this is happening is insrc/events/Monitors.cpp
, in the last line of functionlistener_change
. That call towlr_output_manager_v1_set_configuration
is what is (then) activating the wrong signals. I’m not sure whether this function shouldn’t be called at all in this case, or should be called but with a differentCONFIG
org_pCompositor->m_sWLROutputMgr
(akawlr_output_manager_v1
) state.That said, I believe the problem is also in
src/helpers/Monitor.cpp
. I think the “actually completely destroy the monitor” signal is sent bywlr_output_manager_v1
, whereas the current connection towlr_output
should be used for the “disabling monitor” signal. I’m not too sure about this, in general my plan is to read sway code to understand what they’re doing.Once this is fixed, tools like kanshi or shikane can be correctly used in Hyprland too.
@vaxerski FYI
Hey, sorry to comment on a closed and “old” issue. Just wanted to report this conversation we’ve had on Gitlab regarding kind of the same problem. From the last comment of Hendrik Wolff (author of that Shikane tool):
Do you think that it could be possible to “update” Hyprland behaviour, Vaxry? (I’m available to help if necessary). Thanks 😃