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

[Overlay] Steam Overlay is glitched when playing Terraria. #7889

Open
nutta-git opened this issue Jun 29, 2021 · 42 comments
Open

[Overlay] Steam Overlay is glitched when playing Terraria. #7889

nutta-git opened this issue Jun 29, 2021 · 42 comments

Comments

@nutta-git
Copy link

nutta-git commented Jun 29, 2021

Your system information

  • Steam client version (build number or date): 1624650462
  • Distribution (e.g. Ubuntu): Arch Linux with Plasma Desktop
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

When using Steam Overlay in Terraria, the overlay is broken and unresponsive. Others are also experiencing this issue.

Steam overlay is required to start co-op servers without manual intervention.

Steps for reproducing this issue:

  1. Enable Steam Overlay in Steam Client Setting.
  2. Start Terraria
  3. Hold SHIFT+TAB

Tried Solutions:

  1. Using Steam Non-Beta Client.
  2. Using Mesa-git ( 21.2.0_devel.141851.3a9716e6b1f-1)
  3. Enabling/Disabling K-win Screen Compositor(x11).

None of these methods have worked so far to fix the issue.

@kisak-valve
Copy link
Member

https://gitlab.freedesktop.org/mesa/mesa/-/issues/4191 is further along in evaluating this issue.

@Tau5
Copy link

Tau5 commented Jul 6, 2021

For what I've seen, they have passed the issue to you.

@supermar1010
Copy link

I have exactly the same issue but with unrailed, so it seems to affect more than one game

@Tau5
Copy link

Tau5 commented Jul 16, 2021

The mesa devs say you have to fix the code in the steam overlay

@nutta-git
Copy link
Author

@Tau5
if I am not wrong, I believe a valve developer (Plagman) already knows about this issue.

@psy-q
Copy link

psy-q commented Jul 17, 2021

This seems to affect (at least) FNA titles, I've seen it in:

  • Full Metal Furies
  • Rogue Legacy
  • Escape Goat 2
  • Streets of Rage 4

Here's a video of the corruption on an RX580, Mesa 21.1.4. Same issue appeared on an HD2000 Intel iGPU.

@nutta-git
Copy link
Author

nutta-git commented Aug 3, 2021

Found a workaround for Arch Linux users:

  • Using the AUR, install amdgpu-pro-libgl
  • Open Steam Client and Click on Terraria
  • Add the Launch Option progl %command%

Start the game and use Overlay.

@crumblingstatue
Copy link

Found a Fix for Arch Linux users:

  • Using the AUR, install amdgpu-pro-libgl
  • Open Steam Client and Click on Terraria
  • Add the Launch Option progl %command%

Start the game and use Overlay.

It's more of a workaround than a fix. Using the mesa driver over amdgpu-pro is highly preferred for most applications.

@nutta-git
Copy link
Author

@crumblingstatue

$ glxinfo | grep "OpenGL vendor string" | cut -f2 -d":" | xargs
AMD

I am using the open drivers for everything except for Terraria, hence the launch option.
https://wiki.archlinux.org/title/AMDGPU_PRO#How_to_ensure_you_are_using_AMDGPU-PRO_driver

@crumblingstatue
Copy link

My point was that you shouldn't have to use AMDGPU-PRO for Terraria either. Hence a workaround, rather than a fix.

@roddyrap
Copy link

This is also a problem for Intel Iris (i7-1165G7) with Celeste. Both on Wayland and Xorg.

@hellotinh03
Copy link

Did someone found a fix? I'm on Linux Mint

@Natural-H
Copy link

Same here, with a RX 570, using Zorin OS and Pop OS (Both based on Ubuntu)

@CobaltSpace
Copy link

Another workaround for FNA games is using -gldevice:Vulkan, but I have found that causes Terraria to crash. Celeste has yet to crash on me with that setting.

@nikhil-prabhu
Copy link

nikhil-prabhu commented Sep 18, 2021

Another workaround for FNA games is using -gldevice:Vulkan, but I have found that causes Terraria to crash. Celeste has yet to crash on me with that setting.

Can confirm that Terraria crashes with this launch option. The game loads and the Steam overlay works fine, but the game randomly crashes while playing.

@flibitijibibo
Copy link

This bug is now confirmed as affecting the Steam Deck - if this bug is not fixed soon, many games will fail to render at launch.

@misyltoad
Copy link

misyltoad commented Sep 24, 2021

The Steam Overlay is a separate window so it gets its own plane on the Steam Deck so, I doubt this is the same issue @flibitijibibo

@roddyrap
Copy link

If the Steam deck is affected by this it means that this issue is probably going to get a lot more attention, which will hopefully fix it.

@Plagman
Copy link
Member

Plagman commented Sep 24, 2021

Where does it say it affects the Steam Deck? The graphics side of the overlay shouldn't run its hooks there.

@flibitijibibo
Copy link

We appear to be running into the same issue as before where GL_COORD_REPLACE affects all rendering - this was fixed in radeonsi a few years ago as far as I know. The overlay is affected on desktop regardless of hardware, but for the Deck's gamescope instance in particular we're seeing untextured geometry from the game.

@flibitijibibo
Copy link

flibitijibibo commented Sep 28, 2021

Going to work around this in FNA 21.10 I think... if a game affected is not in this list, please add it:

  • Apotheon
  • Capsized
  • Cryptark
  • Gateways
  • Shuggy
  • Growing Pains
  • Soulcaster 1+2
  • Escape Goat 1+2
  • AVNT
  • Rogue Legacy
  • Dust: AET
  • Blueberry Garden
  • Fist Puncher
  • Skulls of the Shogun
  • TowerFall Ascension
  • Bleed 1+2
  • Rex Rocket
  • Wyv and Keep
  • Wizorb
  • Mercenary Kings
  • Flinthook
  • Sequence
  • Salt & Sanctuary Updated! (See fna-win32 branch, ignore the name...)
  • Charlie Murder Updated!
  • The Dishwasher: Vampire Smile Updated!
  • Hidden in Plain Sight
  • Quadrilateral Cowboy Art Book
  • Full Metal Furies
  • Flotilla
  • Unexplored
  • SUMICO
  • Little Racers STREET
  • FEZ Updated! See public beta branch.
  • Steel Assault Updated!
  • Streets of Rage 4 Updated!
  • Star-Twine
  • Celeste
  • Unrailed
  • Terraria
  • Chasm
  • Staxel

I'll try and update all except the last 4 within the next month (I still have a script from the last time I updated 35 games at once...). For those last 4, please let the developer know that they will need to update to FNA 21.10, which releases on Friday. This will be a pretty massive deployment that will take a long time, so if you want to move it along faster...

@misyltoad
Copy link

This issue is not overlay or Steam related. It can be reproduced by doing gamescope -w 1280 -h 800 -O eDP-1,DP-1 -- ./FEZ directly in from a tty with no Steam running at all.

@flibitijibibo
Copy link

Could be a radeonsi/Gallium regression in Git (latest stable Mesa is okay), might need someone to check while I keep an eye on Steel Assault this week.

@crumblingstatue
Copy link

On https://gitlab.freedesktop.org/mesa/mesa/-/issues/4191 the developers claim it is not a Mesa issue.
I don't know what the truth is

@Plagman
Copy link
Member

Plagman commented Sep 28, 2021

It's possible that the original bug and what Ethan mentioned in the last few comments could just be different issues.

@flibitijibibo
Copy link

flibitijibibo commented Sep 28, 2021

Turns out it's a combination of both - the overlay does still likely need to reset GL_COORD_REPLACE state, but for the Deck in particular there appears to be a radeonsi regression that is worked around in the latest FNA3D. For games that are updated to 21.10 or newer it won't be an issue but it may be a concern for older games that may not have an active maintainer. The above games should produce a repro case if needed (with the exception of the FEZ beta and Charlie/Dishwasher/Salt, which I updated this morning, and Steel Assault which is launching today).

@Plagman
Copy link
Member

Plagman commented Sep 28, 2021

Deck just happens to use recent Mesa with no functional changes to GL rendering at the moment, so odds are it's a problem on Mesa main on recent AMD chips as well. Can you point us to the workaround so we can look at it from that side?

@flibitijibibo
Copy link

Workaround: FNA-XNA/FNA3D@f8d0443

The previous version would enable point sprites and set GL_COORD_REPLACE to 1, since we only support point sprites with gl_PointCoord/gl_TexCoord[0]. Instead, we now wrap each glDraw* with the same two calls, enabling and disabling with each GL_POINTS draw.

@flibitijibibo
Copy link

@flibitijibibo
Copy link

Merge request for anyone that's self-building Mesa:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105

@crumblingstatue
Copy link

As of Mesa 21.3, this issue still persists.

@flibitijibibo
Copy link

The driver side has thankfully been resolved - the overlay is another story. Some users have tested the latest FNA3D and it seems to fix it, but I wouldn't count on it being that way forever (or until the Vulkan test suite gets finished, which is still far off).

@sonic2kk
Copy link

Still persists on Mesa 21.3.4 it seems, Overlay is still bugged in Terraria.

@murlakatamenka
Copy link

Another workaround for FNA games is using -gldevice:Vulkan

Thanks, this works for Axiom Verge

@crumblingstatue
Copy link

Fixed in Terraria 1.4.3.6

@flibitijibibo
Copy link

Terraria updated to FNA ~22.03 last night, meaning it now has the point sprite workaround to avoid this issue. It will still persist for other titles that haven't updated yet (which I would actually hold off on until SDL's move to Wayland-by-default is finished, aiming for end of March provided #8020 doesn't end up blocking it).

@khaled-0
Copy link

Happening on celeste too.
Using Flatpak Steam on Fedora 36 (Wayland)
image

@sunryze-git
Copy link

sunryze-git commented Sep 2, 2022

Happening on celeste too.
Using Flatpak Steam on Fedora 36 (Wayland)

Update / Fix: To fix issues like this you need to update FNA. I used the script here: https://gist.github.com/flibitijibibo/f06e3f60eb66e5462da824e490229591#file-fnaupdate-sh

Having the same problem with Celeste, Steam from pacman and under xorg.
I suspect it is because Celeste is using an outdated FNA? Haven't looked into that though.
A hacky fix for me is to just use the amdgpu-pro openGL driver

image

@griffi-gh
Copy link

griffi-gh commented Jul 12, 2023

still having this issue in Celeste, arch linux, amdgpu, gnome, wayland
game fails to find a fna driver with the vulkan flag...

@smj-edison
Copy link

smj-edison commented Jan 6, 2024

I just ran into this issue on Terraria too. Running latest version of arch (6.6.9-arch1-1), Terraria (v1.4.4.9), and Proton 8.0-4 on Xorg. -gldevice:Vulkan fixed the overlay issue for me, though I haven't played it long enough to see if it crashes. Steam overlay is also broken on Celeste for me.

EDIT: tried running the script that @sunryze-git mentioned, but it didn't fix the issue (unless I did it wrong, lol).

@yaomtc
Copy link

yaomtc commented Jan 6, 2024

Playing Terraria on Wayland (Plasma 5.27) natively, I don't have any issue with the overlay anymore. I haven't run that script on this install (I used it on a past install)

@yaomtc
Copy link

yaomtc commented Jan 6, 2024

Just to be sure, I deleted all the FNA/mono files and had Steam reacquire them. Still works.
Screenshot_20240105_213429
No idea if it's using Wayland yet or if there's something else that fixed it, for me at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests