steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

[Overlay] Steam Overlay is glitched when playing Terraria.

Open nutta-git opened this issue 3 years ago • 38 comments

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.

  • https://www.reddit.com/r/Terraria/comments/ms53o4/has_anyone_elses_steam_overlay_broken_like_this/
  • https://www.reddit.com/r/Terraria/comments/mtkvme/help_manjaro_linux_steam_overlay_is_glitching/

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.

nutta-git avatar Jun 29 '21 16:06 nutta-git

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

kisak-valve avatar Jun 29 '21 16:06 kisak-valve

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

Tau5 avatar Jul 06 '21 21:07 Tau5

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

supermar1010 avatar Jul 07 '21 10:07 supermar1010

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

Tau5 avatar Jul 16 '21 22:07 Tau5

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

nutta-git avatar Jul 17 '21 10:07 nutta-git

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.

psy-q avatar Jul 17 '21 18:07 psy-q

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.

nutta-git avatar Aug 03 '21 15:08 nutta-git

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.

crumblingstatue avatar Aug 03 '21 16:08 crumblingstatue

@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

nutta-git avatar Aug 03 '21 19:08 nutta-git

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

crumblingstatue avatar Aug 03 '21 22:08 crumblingstatue

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

roddyrap avatar Aug 24 '21 21:08 roddyrap

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

hellotinh03 avatar Sep 02 '21 06:09 hellotinh03

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

Natural-H avatar Sep 10 '21 23:09 Natural-H

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.

CobaltSpace avatar Sep 12 '21 05:09 CobaltSpace

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.

nikhil-prabhu avatar Sep 18 '21 08:09 nikhil-prabhu

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.

flibitijibibo avatar Sep 24 '21 16:09 flibitijibibo

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

Joshua-Ashton avatar Sep 24 '21 17:09 Joshua-Ashton

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.

roddyrap avatar Sep 24 '21 17:09 roddyrap

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

Plagman avatar Sep 24 '21 20:09 Plagman

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 avatar Sep 24 '21 21:09 flibitijibibo

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

flibitijibibo avatar Sep 28 '21 02:09 flibitijibibo

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.

Joshua-Ashton avatar Sep 28 '21 03:09 Joshua-Ashton

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.

flibitijibibo avatar Sep 28 '21 04:09 flibitijibibo

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

crumblingstatue avatar Sep 28 '21 08:09 crumblingstatue

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

Plagman avatar Sep 28 '21 16:09 Plagman

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

flibitijibibo avatar Sep 28 '21 16:09 flibitijibibo

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?

Plagman avatar Sep 28 '21 17:09 Plagman

Workaround: https://github.com/FNA-XNA/FNA3D/commit/f8d0443568df6b57803b80a39c86a35047bd66dc

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 avatar Sep 28 '21 17:09 flibitijibibo

The regression may have already been identified:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423

Commit in question: https://gitlab.freedesktop.org/mesa/mesa/-/commit/11d1309d8276768aca3f02ddd7cc57cdb323113c

flibitijibibo avatar Sep 28 '21 20:09 flibitijibibo

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

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

flibitijibibo avatar Sep 29 '21 19:09 flibitijibibo