Skip to content
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

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

Open
andreesteve opened this issue Nov 3, 2024 · 14 comments
Open
Labels
bug Not working as intended
Milestone

Comments

@andreesteve
Copy link

Sway Version: 1.10

output DP-1 pos    0 0 res 3440x1440@100Hz
output DP-2 pos 3440 0 res 3440x1440@100Hz adaptive_sync on
workspace 1 output DP-2
workspace 2 output DP-1
# Focus on main monitor on startup
focus output DP-2
bar {
    swaybar_command waybar
}
include /etc/sway/config.d/*
  • Description:
  • I have a 3 monitor setup (swaymsg -t get_outsputs)
  • After updating from 1.9 to 1.10, it seems my center monitor is not recognized and I get a black screen with the sway bar (see image below). The two monitors on the side seem to get mirrored, whereas the expected setup is that they are independent (see 1.9 screenshot for working scenario).

Problematic example in 1.10
v1 10

Working example in 1.9
screenshot

@andreesteve andreesteve added the bug Not working as intended label Nov 3, 2024
@Nefsen402
Copy link
Member

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
Copy link

klaasjanelzinga commented Nov 4, 2024

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
Copy link

Firwanaa commented Nov 5, 2024

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
Copy link
Member

@kennylevinsen

@kennylevinsen
Copy link
Member

@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
Copy link

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

@Firwanaa
Copy link

Firwanaa commented Nov 5, 2024

@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
Copy link

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

@kennylevinsen
Copy link
Member

kennylevinsen commented Nov 5, 2024

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, #[email protected].


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
Copy link
Member

Could anyone with the original issue try to reproduce with: #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.

@emersion emersion added this to the 1.10.1 milestone Nov 6, 2024
@andreesteve
Copy link
Author

@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.

@ya-isakov
Copy link

ya-isakov commented Nov 8, 2024

I bisected this issue to 2879260 (I was finding #8435 first, but it seems that it's duplicate of current one). Adding deleted lines back fixes the issue for me.

P.S. Cherry-picking commit from #8431 fixes issue for me, too, thank you, @kennylevinsen

@Sinaaaa
Copy link

Sinaaaa commented Nov 9, 2024

Does #8431 work for you all even if sway -D noatomic is used?

@ya-isakov
Copy link

@Sinaaaa yes, still works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

9 participants