swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.64k stars 1.11k forks source link

[1.10][Regression] Output not detected, black screen, duplicated screens #8428

Open andreesteve opened 2 days ago

andreesteve commented 2 days ago

Sway Version: 1.10

Problematic example in 1.10 v1 10

Working example in 1.9 screenshot

Nefsen402 commented 2 days ago

Your log doesn't appear to set the position of the third monitor. Sway might think they are placed in the same spot thus rendering the same thing.

klaasjanelzinga commented 2 days ago

Hi,

I probably have a related issue to this. The result is that in my dual monitor (laptop + HDMI) the screens get mixed up, or so it seems:

image

Image above is showing my HDMI monitor after turned off and on again. I notice now that this issue is in the background, making it a bit confusing. But the waybar is on the bottom of my screen and duplicated on the HDMI from eDP-1.

The log file: sway.log

After reverting to sway 1.9 everything works as expected.

Firwanaa commented 1 day ago

It seems that Sway 1.10 doesn't detect output configurations at startup, however reloading Sway configurations using swaymsg reload, output configurations will be detected.

Downgrading to Sway 1.9 seems to solve the issue as well.

Nefsen402 commented 1 day ago

@kennylevinsen

kennylevinsen commented 1 day ago

@andreesteve your issue appears to just be that you're not specifying the position of one output, while you at the same time have an output that is positioned at 0,0. Depending on order, the automatic positioning might use 0,0 first, with the explicit 0,0 output then placed on top. Explicit position of the remaining output should fix that.

@Firwanaa Your config is setting eDP1, which does not exist and so by accident you hit OPs issue. Try updating your config to set eDP-1.

mukul1729 commented 1 day ago

Same issue, my multi monitor setup is misbehaving badly with 1.10 update. Downgrading to 1.9 fixes it

Firwanaa commented 1 day ago

@andreesteve your issue appears to just be that you're not specifying the position of one output, while you at the same time have an output that is positioned at 0,0. Depending on order, the automatic positioning might use 0,0 first, with the explicit 0,0 output then placed on top. Explicit position of the remaining output should fix that.

@Firwanaa Your config is setting eDP1, which does not exist and so by accident you hit OPs issue. Try updating your config to set eDP-1.

@kennylevinsen Not sure If you meant to reply to me as I didn't mention my output config, however I actually found a mistake in one of my monitors names 😬, still, having some issues with Sway 1.10, downgrading to Sway 1.9 works just fine.

klaasjanelzinga commented 1 day ago

@kennylevinsen There was an error in my config as well, eDP1 => eDP-1. Issue seems fixed. Thanks!

kennylevinsen commented 1 day ago

Not sure If you meant to reply to me

Ah, no, wrong nick.

Same issue, my multi monitor setup is misbehaving badly with 1.10 update. Downgrading to 1.9 fixes it

Everyone here had latent config errors they had not noticed, check yours.

For anything that is not the specific issue OP is having, please open a new, specific issue with config file and debug log. This is not a catch-all issue for 1.10 regressions. Otherwise, #sway@irc.libera.chat.


For this actual issue, a possible regression:

  1. Modeset logic calls wlr_output_layout_add/wlr_output_layout_add_auto when finalizing config after mdoeset
  2. sway_output x/y/width/height is updated immediately after

Now imagine two outputs, one auto and one fixed at 0,0:

  1. Auto layout places output 0 at 0,0
  2. Output 0 x/y/width/height is set to 0,0,w,h
  3. Manual layout places output 1 at 0,0, and moves output 0
  4. Output 1's x/y/width/height is set to 0,0,w,h

There isn't anything to catch that output 0 needs to have its x/y/w/h moved, leading to a disagreement between the wlr_output_layout and sway_output state. We previously had updates littered everywhere, so something probably caught it in the end...

I really don't like that we have two sources of truth here...

kennylevinsen commented 1 day ago

Could anyone with the original issue try to reproduce with: https://github.com/swaywm/sway/pull/8431?

If you have already fixed your issue by adjusting your config file, do please test with config file undone to test the original problem.

andreesteve commented 12 hours ago

@kennylevinsen - thank you for the fix. I could test it but I can't build it locally. Is there a way I could download it from the build system? https://builds.sr.ht/~emersion/job/1363306

Also, on 1.1.0 sans patch, explicitly adding the other display to the config solves the initial rendering issue, but I found a couple of other issues, in case it helps: (1) the focus command in the config after start up seems to fail, as the focus is not set to the target output; and (2) setting background color in 1.10 does not work. I always get a black background.