goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.8k stars 325 forks source link

FFXIV marked as always running in Steam despite not launching the game through it (Linux/Flatpak) #1047

Open IAMSolaara opened 2 years ago

IAMSolaara commented 2 years ago

Update disclaimer

What did you do?

When I launch XIVLauncher Steam marks the game as running even though I'm not using the Steam service and I'm not using the Steam version of the game. When I close the game Steam doesnt mark it as closed thus when closing it "tries" to stop FFXIV until I force close it. Steam is not installed as a Flatpak, while XIVLauncher is; dunno if this has anything of importance. I did notice some Steam-related errors in XIVLauncher's logs. Neofetch for specs/os info: image

Platform

Linux (native)

Wine/Proton runner version

No response

Relevant log output

When steam is closed:
[01:05:41 INF] ========================================================
[01:05:41 INF] Starting a session(v1.0.0.9 - 6.2.31-151-g6a1a59f)
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/lorecast162/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.[01:05:42 ERR] Couldn't init Steam with game AppIds, trying FT
System.Exception: SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId.
   at Steamworks.SteamClient.Init(UInt32 appid, Boolean asyncCallbacks)
   at XIVLauncher.Common.Unix.UnixSteam.Initialize(UInt32 appId) in C:/goatsoft/xl/XIVLauncher.Common.Unix/UnixSteam.cs:line 24
   at XIVLauncher.Core.Program.Main(String[] args) in C:/goatsoft/xl/XIVLauncher.Core/Program.cs:line 153
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/lorecast162/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.[01:05:42 ERR] Steam couldn't load
System.Exception: SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId.
   at Steamworks.SteamClient.Init(UInt32 appid, Boolean asyncCallbacks)
   at XIVLauncher.Common.Unix.UnixSteam.Initialize(UInt32 appId) in C:/goatsoft/xl/XIVLauncher.Common.Unix/UnixSteam.cs:line 24
   at XIVLauncher.Core.Program.Main(String[] args) in C:/goatsoft/xl/XIVLauncher.Core/Program.cs:line 159
[01:05:42 INF] [DUPDATE] Starting...
---- snip ----

When Steam is running:
[01:07:53 INF] ========================================================
[01:07:53 INF] Starting a session(v1.0.0.9 - 6.2.31-151-g6a1a59f)
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/lorecast162/.local/share/Steam/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 312060
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198116198393 [API loaded no]
[01:07:54 INF] [DUPDATE] Starting...
---- snip ----
delcake commented 2 years ago

I observe the same issue entirely as described on my own system as well. Ideally, I would like to see a toggle in the options or environment variable we can set to prevent the launcher from trying to integrate with Steam at all for those of us that prefer an entirely standalone option.

delcake commented 2 years ago

After doing some testing with a locally compiled XLCore, it seems creating a situation where the calls for Steam.Initialize([...]) on lines 156/161 of Program.cs aren't reached resolves this behavior. Perhaps creating a conditional or test where the Initialize is only called when the launcher detects it was invoked from Steam, or is otherwise in the correct PID namespace to report on the status of the game, would be the most elegant option to prevent this situation where Steam has to be closed to fix a user's Now Playing status.

coreybruce commented 2 years ago

Having the same issue, after I have closed the game, the launcher is stuck showing it's running

NotNite commented 2 years ago

Having the same issue, after I have closed the game, the launcher is stuck showing it's running

Different bug. Please see the arguments from our Steam Deck guide.

coreybruce commented 2 years ago

Oh ok