ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
14.65k stars 2.17k forks source link

Fullscreen broken on game start or alt-tabbing #18288

Closed Kudostoy0u closed 2 years ago

Kudostoy0u commented 2 years ago

Type

Game behaviour

Bug description

Upon updating to osu!lazer 2022.515.0 on my Ubuntu 22.04 (Wayland) setup, the game window scaling is off when launching the game. Alt-tabbing back to osu also breaks it again. I have to Fn+f11 or Alt-Enter to fix it. Messing around with resolution, screen mode, and screen scaling didn't work. Video provided shows the issue.

Screenshots or videos

https://user-images.githubusercontent.com/69732000/168488222-990a45cd-063a-43bb-97c7-60e97163b694.mp4

Version

2022.515.0

Logs

database.log network.log performance.log runtime.log

bdach commented 2 years ago

It's probably because of #18273. If I am correct then you should see the same behaviour on older releases if specifying the SDL_VIDEODRIVER=x11 envvar.

rugk commented 2 years ago

Same here! Reported downstream (flatpak package) as "Does not (always) use/start with fullscreen on Wayland":

STR

When you initially start the game and when you switch to another app (Super key and switch back) the game window is only shown in the lower left part of the screen. The rest is black. (Full HD screen here)

What happens

badscreen

What should happen

Always full-screen by default/when you switch back.

Workaround

In the settings, you can switch between the "screens" (it still shows on the same screen, I have no idea what that means. At least I have two physical screens connected, but AFAIK under Wayland apps cannot decide their window position, so maybe that's the reason here.). No matter what "screen" you chose, it switched it to "proper" fullscreen.

workaorund-fullscreen

System

Fedora Linux 36 (Workstation Edition) Flatpak 1.12.7 GNOME 42.1 Wayland

$ flatpak info sh.ppy.osu

osu! - A free-to-win rhythm game. Rhythm is just a *click* away!

          ID: sh.ppy.osu
         Ref: app/sh.ppy.osu/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 2022.515.0
     License: MIT
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 267.7�MB
     Runtime: org.freedesktop.Platform/x86_64/21.08
         Sdk: org.freedesktop.Sdk/x86_64/21.08

      Commit: 2fcc18352a03372644d2bd1fe3632b39432cb140222fcd0b03308e5a94df9584
      Parent: 4fa7e9cde27ac360333cde1c67021b30d199e264568168121fc2f6df199f278c
     Subject: Update osu.AppImage to 2022.515.0 (6fa20c67)
        Date: 2022-05-15 05:57:55 +0000

Originally reported as https://github.com/flathub/sh.ppy.osu/issues/38

bdach commented 2 years ago

Screenshots above show "xwayland" as display names which corroborates that the x11 backend is being used and this issue is simply a duplicate of https://github.com/ppy/osu/issues/18273.

Dreamurrrr commented 2 years ago

@bdach I am experiencing the same exact thing as in the video while running in a X11 environment. image System info: https://termbin.com/i7sf Lmk if you want my logs or anything else of that matter.

rugk commented 2 years ago

Well yeah… it's then a problem with Xorg… :upside_down_face: (likely also should not happen there, but I agree, fixing the Wayland issue is more important. Users can and will eventually switch to Wayland.)

smoogipoo commented 2 years ago

I'm not sure this is related to any wayland/xorg issue, but rather looks like a race condition at our side? I get similar things when moving my window very quickly across monitor boundaries while snapping via mouse drag to different parts of the screen.

Some examples of what I can readily reproduce (and sometimes gets annoying):

https://user-images.githubusercontent.com/1329837/168502371-84706500-589a-4f59-903e-f9c7fcd1638b.png https://user-images.githubusercontent.com/1329837/168502397-a427a57b-f070-4934-990c-a40921754fab.png https://user-images.githubusercontent.com/1329837/168502409-410046fe-ea05-411e-8922-0f423c0547ff.png https://user-images.githubusercontent.com/1329837/168502483-be507dba-2619-4132-82ed-e7ec9dc36147.png

Dreamurrrr commented 2 years ago

Forgot to include this, but this is how my display options look like on osu! for context: image

elsandosgrande commented 2 years ago

Ubuntu Jammy GNOME 42

If I put osu! in windowed mode, resize the window, put osu! back in fullscreen mode, and then switch to a different workspace, when I come back to osu!, it's the same size as the size of the window in windowed mode with black wherever system elements would be. Forcing osu! into fullscreen mode from the system side alleviates the issue and does not introduce any input lag, though the settings still warn of input lag because the screen mode was not changed.

This is what I'm referring to when I say forcing into fullscreen mode by the way: image

Edit

Note: The high precision mouse option only works when in fullscreen mode, so keep that in mind.


I'm commenting here because #18301 is locked.