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

Overlays cause screen to flash (modeset?) when in a full screen game (regression) #8440

Open
marcelohdez opened this issue Nov 9, 2024 · 7 comments
Labels
bug Not working as intended
Milestone

Comments

@marcelohdez
Copy link

Please fill out the following:

  • Sway Version: 1.10
  • Debug Log: https://gist.github.com/marcelohdez/513599d7f412b87b2f51c65584e012da
  • Configuration File: Works with default config
  • Stack Trace:
  • Description:
    • When in a full screen game (not in e.g. Firefox for some reason), any overlay (from Mako notifications, to Steam notifications) will cause the screen to flash black when it is shown, and again when it goes away
    • Tested with the game Ancestors: The Humankind Odyssey
    • This does not occur in Sway 1.9
    • Video from phone (not visible in screen recording, although screen recording has another issue I will create after this one):
11-09-2024.mp4
@marcelohdez marcelohdez added the bug Not working as intended label Nov 9, 2024
@marcelohdez
Copy link
Author

After some more testing it seems to occur only in Steam/Proton games?

  • Firefox (wayland) does not have this issue
  • Minecraft (xwayland) through Prism Launcher does not either
  • Far Cry Primal on Bottles (wine, xwayland) does not either

however, Skyrim through Steam Proton does have the issue.

Will try to bisect soon

@emersion emersion added this to the 1.10.1 milestone Nov 10, 2024
@emersion
Copy link
Member

Does WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 help?

@marcelohdez
Copy link
Author

marcelohdez commented Nov 10, 2024

Setting that variable removes the black screen, however it still stutters when the overlay is shown

After bisecting it seems the issue begins on commit 19ca790

Edit: to verify, I commented out the lines from that commit and built v1.10's HEAD at the moment (c93ff73) and the issue does not occur

@kennylevinsen
Copy link
Member

Can you test if #8447 resolves the issue?

The commit you found is a fix for a regression introduced in 1e00317, but a minor behavior difference was still left behind.

@marcelohdez
Copy link
Author

I cherry-picked those commits on top of v1.10 instead of building master as Fedora does not have wlroots 0.19 however they did make the issue much better. With those commits appplied the black screens are gone in-game and so is some stutters that would affect the overlays such as Steam's FPS counter and their in-game overlay.

Although the issue still persists during the loading screen of Ancestors for some reason, where it did not occur in Sway 1.9 (tried again just now), haven't tested other games yet.

@kennylevinsen
Copy link
Member

For the other glitch sources, is 19ca790 still the first commit showing the issue? If so, does it happen before the original regression (1e00317)?

@marcelohdez
Copy link
Author

I have not tested those extensively, but I have found a way to reproduce the issue for free so someone can test locally:

  • Install Bottles
  • Create a new Gaming bottle (+ on top left) and go into it
  • Download the windows zip of this game: https://roarkdev.itch.io/raot
  • Unzip it anywhere Bottles can see (if using Flatpak and outside the bottle's directory, Flatseal can give Bottles permission to see it)
  • "Run Executable..." and select the raot.exe file
  • When inside the game (should be fullscreen), you can ignore firewall warning etc. and host a game, select any team and character
  • esc to go to settings, turn graphics to high, anti-aliasing, bloom etc, put system in power-saver, anything to make frame times inconsistent (leave fps limit != your screen's hz)
  • You should see stutters and black screens as long as VSync is off (maybe a clue?) and running around WASD/dashing Q making an overlay popup every now and then, e.g.:
while true; do notify-send hi -t 2000; sleep 3; done

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

3 participants