-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race with kanshi loses output configuration when connected outputs change #676
Comments
Hm, interesting. Could you also get a WAYLAND_DEBUG=1 log from kanshi and upload it, with some annotation on when the outputs reconnect and when the issue occurs?
Hah, that's curious. :) Steam management is tough, yeah.. |
Here's the log, line 141 is the split where I hit the button: kanshi.log You can see it reacting to there only being the internal display and switching it back on, then immediately switching it back off when the external reappears moments later. kanshi doesn't seem to notice anything going wrong despite niri reporting the outdated configuration, so something must be changing internally between the time the zwlr_output_configuration_v1 is created and the time kanshi requests a change? |
Thanks. Also, could you post your kanshi config? |
|
So if you run kanshi only after connecting the dock then it doesn't lose the output config? |
Indeed, if I:
it powers off the internal display without breaking the external one. Seems to require the external one disappearing and reappearing at the same time the internal is being changed to trigger the bug. |
I just switched from sway and carried over my
kanshi
config to disable the internal display on my laptop when at my desk (at least until #145 :). Enable/disabling outputs works correctly when I connect the laptop to my dock, but some sort of race is occurring which causes niri's output config to be ignored when kanshi toggles the internal output right as the external one becomes available. I noticed this because it resets the external display's scale, but I added atransform "90"
to debug and confirmed that it is ignored after the hotplug as well.I use an LG DualUp and this also occurs when I split/unsplit the display into two for use with my second machine, which causes the vertical resolution reported to the system to be cut in half/doubled respectively. I think this just appears as a display disconnecting and reconnecting, so probably the same code path. I used this to test below, but the behavior is identical if I physically unplug and replug the laptop dock.
My output config:
Here are the debug logs at startup, with kanshi launched using
spawn-at-startup
:You can also see it initially disabling eDP-1, which works fine and doesn't break the external output's config despite also throwing the "request from an outdated configuration" message. The later change at 13:10:35 is me switching the display mode (which is why the chosen mode is now 2880) and thus causing a reconnect. After this, the configuration is lost and the scale is the default 1.25.
I fixed it with
niri msg output DP-1 scale 1.0
, killed kanshi, and changed the display mode again. This time without kanshi, the internal display remains disabled throughout the disconnect/reconnect:The configuration is retained.
I haven't tested with any other wlr-output-management tools to see if this is common to all of them or kanshi-specific.
System Information
P.S.: I love Niri, I had started writing this exact compositor a while ago but ran out of steam. Thanks for building it!
The text was updated successfully, but these errors were encountered: