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

Source 2007 mods: Unable to join/create servers, or view achievements (218) #2249

Open
2 tasks done
ghost opened this issue Jan 21, 2019 · 31 comments
Open
2 tasks done
Labels
Game compatibility - Unofficial Games not expected to work without issues

Comments

@ghost
Copy link

ghost commented Jan 21, 2019

Compatibility Report

  • Name of the game with compatibility issues: Source SDK Base 2007 / Source Mods
  • Steam AppID of the game: 218

System Information

I confirm:

  • that I haven't found an existing compatibility report for this game.
  • that I have checked whether there are updates for my system available.

steam-9856914317583057114.log

Symptoms

Hello,

Thank you for recently adding the option to force apps to use Proton. This makes it possible to launch Source 2007 mods on Steam for Linux. However, multiplayer mods are unable to create/join servers, or view achievements. The following were observed when playing a multiplayer mod:

Server Browser: Steam Beta must be running to make use of Find Servers

Connect by IP: The server requires that you be running Steam.

Create listen server: CD Key authentication invalid for internet servers.

View achievements: You must be logged in to Steam to unlock or view achievements

Reproduction

  1. Opt into the Steam Beta
  2. Force Source SDK Base 2007 to use Proton
  3. Install Source SDK Base 2007
  4. Install a multiplayer Source mod. I used GoldenEye: Source
  5. Attempt any of the above tasks under Symptoms
@kisak-valve kisak-valve added the Game compatibility - Unofficial Games not expected to work without issues label Jan 21, 2019
@kisak-valve kisak-valve changed the title Source 2007 mods: Unable to join/create servers, or view achievements Source 2007 mods: Unable to join/create servers, or view achievements (218) Jan 21, 2019
@nsivov
Copy link
Contributor

nsivov commented Jan 21, 2019

It probably needs older API that's not exposed currently:

12137.073:0008:0009:err:steamclient:create_win_interface Don't recognize interface name: SteamUser008
...
12145.249:0008:0009:err:steamclient:create_win_interface Don't recognize interface name: SteamGameServer003

@ghost
Copy link
Author

ghost commented Feb 16, 2019

Progress made with the recent 3.16-Beta release! It's now possible to view achievements and use the server browser. However, actually connecting to a server gets the message "This Steam account is being used in another location" in the console, along with the message box below:
image
However, if one uses sv_lan 1 it is finally possible to launch a listen server :)

@ghost
Copy link

ghost commented Feb 23, 2019

I have this problem as well.
Obsidian Conflict, Source SDK 2007.

Proton version: 3.16.7

@romulasry
Copy link

A new Proton 4.2 was just released today.

@ghost
Copy link
Author

ghost commented Mar 27, 2019 via email

@romulasry
Copy link

https://lutris.net/games/obsidian-conflict/ I tried but it isn't working on Lutris yet.

@ghost
Copy link

ghost commented Apr 20, 2019

Proton 4.2-3

Got an error when trying to join a game server.

image

Strange considering I can already join servers using Proton in Half-Life 1 Mods.

@ghost

This comment has been minimized.

@ghost
Copy link
Author

ghost commented Jun 27, 2019

Still unable to join servers due to the error above. Attaching a fresh log.
steam-9856914317583057114.log

@ghost

This comment has been minimized.

@ghost

This comment has been minimized.

@romulasry
Copy link

@kisak-valve
Is this being worked on? I don't see why this would be fixed as of 4.11-6.

@ghost
Copy link

ghost commented Nov 8, 2019

4.11-8

The mod now crashes when trying to connect a server.

Attaching Proton Log
steam-14770360520569520346.log

@ghost
Copy link

ghost commented Jan 15, 2020

4.11-12

The mod still crashes when creating or joining a server.

Is this being worked on?

@ghost
Copy link
Author

ghost commented Jan 25, 2020

Nope

@brianinthered
Copy link

I just tried Goldeneye: Source with Proton 5.0-5 and it launches then crashes.
I watch Source SDK Base 2007 launch and then close.

It used to run fine, but now when I try any version of Proton it crashes

@Fenteale
Copy link

Just want to add that D.I.P.R.I.P. Warm Up on steam does not work on linux with the exact same symptoms posted in OP.
https://store.steampowered.com/app/17530/DIPRIP_Warm_Up/

@ghost
Copy link

ghost commented Apr 28, 2020

Proton 5.0-6

Now only single player works, listen servers will now crash. On Obsidian Conflict I can set maxplayers to 1 to force a single player session and it will work that way.

It seems it gets progressively more broken.

Also I can't seem to find this issue in the GitHub searcher, I have to use Google, anyone else?

@brianinthered
Copy link

Tried both Goldeneye: Source and D.I.P.R.I.P and both still do not work. DIPRIP will launch and I can get to the menu, but anything else will crash.

Really sucks because these games ran fine in PlayOnLinux/Wine but I prefer running them in Steam. Just easier!

@gigawatts

This comment has been minimized.

@kisak-valve

This comment has been minimized.

@gigawatts

This comment has been minimized.

@ozgq
Copy link

ozgq commented Feb 20, 2022

Downgraded to 5.13 since Experimental just makes the screen pitch black. Joining/creating MP servers doesn't work at all.

Using Gmod 11 classic

Using Ubuntu 20.04 Focal Fossa on a Dell Latitude E6430 ATG. Unable to attach logs because none were found under Source SDK Base or Gmod 11.

@niobium93
Copy link

I tried to play the old 2012 mod version of Black Mesa which uses Source 2007 and it crashes on launch.
steam-12487904729269010650.log
Most relevent part seems to be:

29260.412:0124:0128:warn:seh:handle_syscall_fault backtrace: --- Exception 0xc0000005 at 0xec65041e: /home/andrius/.local/share/Steam/linux32/steamclient.so + 0x56641e.
29260.412:0124:0128:trace:seh:handle_syscall_fault returning to user mode ip=7a5eb89d ret=c0000005
29260.412:0124:0128:err:steamclient:steamclient_call Access violation in ISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION002_RequestCurrentStats.
29260.412:0124:0128:trace:seh:dispatch_exception code=c0000005 flags=0 addr=7BC4B288 ip=7bc4b288
29260.412:0124:0128:warn:seh:dispatch_exception EXCEPTION_ACCESS_VIOLATION exception (code=c0000005) raised

So some issue in steamclient.so.
To reproduce download the original Part 1 and Part 2 of the mod. (the 'fixed' version on moddb is actually more broken because the people 'fixing' it didn't know what they're doing)
It need to be extracted into a folder named bms in sourcemods. Folder should NOT be named blackmesa just because the zip is.

@caatge
Copy link

caatge commented Jul 2, 2024

Replying to #2249 (comment)

Hi,
I've looked into this issue for Source SDK Base 2006 and i think i found the cause. The issue is caused by improper IPC mapping for the interface or failed porting attempt to a newer version of the interface. (or both lol) Old Source Engine games use the IClientUser::InitiateGameConnectionOld (previously IClientUser::InitiateGameConnection) interface to generate a userid ticket for authentication, and one of the issues mentioned above causes it to attempt to dereference appid + 4 inside steamclient.so which makes it segfault. Fun fact, some games like Fortress Forever have an appid that's a valid memory location so it actually lets you connect to the server. One solution to this problem could be spoofing the appid passed to the InitiateGameConnection, which is called from CSteam3Client::InitiateConnection in engine.dll. I've been able to modify engine.dll for SDK 06, specifically replace the instruction pushing the steam appid to the esi register with a jmp instruction (to avoid issues with PE relocations) a bunch of bytes back into the int 3 block left over by MSVC (10h (16 dec) function alignment) and modify it there to something that'd be a valid memory location when dereferenced. That solution isn't really a great idea, because it only lets you join servers that are running outdated Steam binaries that don't really care about your SteamID and would let you in no matter what it is. The attached is a screenshot of GDB showcasing the attempted dereference of appid (stored in eax+ 4). If anyone's interested I could attempt to modify SDK 2007 binaries in the same way I did for SDK 2006, but keep in mind that you won't be able to stay on the server for too long if at all. If you want to play SDK 06/07 games properly on Linux you'll need to install Steam inside wine so it completely skips the lsteamclient.dll IPC proxy thing.

Edit: I didn't realize that lsteamclient was open-source until I was done writing this, so now I am able to somewhat tell what's specifically broken, and that is older InitiateGameConnection taking a uint32_t as the appid instead of a CGameID.

vmware_YIq2jSGLad

@niobium93
Copy link

@caatge Not sure why you're replying to me. I'm trying to run a single-player game. No joining servers here. Game crashes on launch for me.

@caatge
Copy link

caatge commented Jul 2, 2024

Sorry, my bad, it's the first time I'm using the Github comments thing.

@caatge
Copy link

caatge commented Jul 4, 2024

So I decided to waste more time debugging this and got it to auth properly without any sketchy workarounds that would make VAC mad and kick you. The actual reason was the difference between the Linux steamclient function prototype and the Windows function prototype. For some reason, the Linux steamclient.so takes a CGameID* instead of a CGameID which in the end results in the Linux function being feeded 4 bytes on stack more than it needs to as well as a bad pointer. I made a small VSP (Valve Server Plugin, and yes, server plugins can be loaded on clients) which hooks the function doing the IPC call between the Unix side and the Windows side and does it correctly. More proper fix is yet to come by telling the lsteamclient C file generator thing to somehow circumvent this issue. I'm going to leave the task of actually making this correction into the C file generator to someone else, as this is my first time dealing with anything Proton and Linux related and I have no experience with the codebase and barely any idea how it works. The small plugin (which is really hacky and bases on x86 patterns) can be found here: https://github.com/caatge/proton-sdk06.

@psychonic
Copy link

Part of the original issue reported here, creating/joining servers on Source 2007 mods, was fixed a couple of years ago, in cd60b70

I'm not sure about the achievements issue. There may still be a problem there, judging by ISteamUserStats crash still being reported in #2249 (comment) earlier this year.

There are other reports in this thread citing the same or similar issues in Source 2006 mods. Part of that is because the server connect fix for the Source 2007 mods was only applied for the specific version of the ISteamUser interface that they target. However, the version targeted by Source 2006 mods, as well as a couple of other versions of the interface are also affected by the same issue.

I'm opening a pull request shortly to apply the same fix to the other affected versions.

@psychonic
Copy link

A look at the ISteamUserStats issue suggests that the same underlying cause is present there. Source SDK 2006 and 2007 mods use pre-1.0 versions of the SteamWorks SDK, in which these initial two versions of the ISteamUserStats interface (001 and 002) all interface functions contain a CGameID passed by value as the first parameter. Or rather, it's by value in the header and in the Windows steamclient. In the Linux steamclient, every one of those functions that I spot-checked (around 6 of them) attempt to dereference the value, which would most likely lead to the instant crash being described.

@psychonic
Copy link

I tested that the same fix also works for the ISteamUsersStats crash in the mod version of Black Mesa on Source SDK 2007. Updated #8375 to include that fix as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game compatibility - Unofficial Games not expected to work without issues
Projects
None yet
Development

No branches or pull requests

10 participants