Running EA Origin Games under Linux via Steam and Proton

Explains how to run EA Origin games on Linux under Steam and Proton, using NFS The Run as an example.

Running EA Origin Games under Linux via Steam and Proton

One of my favourite PS3 games was Need for Speed: The Run. When I saw the PC version on sale I couldn't resist grabbing a copy to see if I could get it to work on my new Linux gaming machine (which I wrote about here).  

The Run isn't listed on ProtonDB so there was a chance it wouldn't be playable but at just $5 there wasn't much to lose. Since this was the first time I'd tried a non-Steam game under Proton I knew there'd be some tinkering around but I got it working in the end.

Update: since posting this article there's a been some discussion on Reddit about why this is necessary:

  • "Why not just use Lutris?" No reason except that I just like using Steam as the launcher for this lounge-room based, controller-only gaming machine.  I personally haven't looked into Lutris, but have only heard good things about it. For me, everything else I play is in Steam, it works fine and I just wanted to add this one non-Steam game.
  • "Why do this when EA Games already install OriginThinSetup."  This is specifically for games that aren't on Steam, in this case NFS The Run.

Ugh, EA Origin

Unfortunately the only way to download, install and run most EA games is via their launcher Origin.  It's like EA's version of Steam but crappier - especially for lounge room gaming machines that don't have a mouse or keyboard since it doesn't support controllers.

Luckily there's a way to launch Origin and then get it to run a specific game - which I'll cover below.  Unfortunately there doesn't seem to be a way to have it automatically shutdown when you close the game so that needs to be done manually.

This post explains the best way I found to set it up. There might be other better ways, in which case please let me know.

Here's How...

  1. On a Windows machine, download OriginThinSetup.exe from their site. You need to do this because viewing the site from a Linux machine doesn't give the Windows download option. (Alternatively, Redditor GGG_246 informs these are also available at winehq)
  2. Transfer OriginThinSetup.exe to your Linux machine. It doesn't matter where you put it but your Downloads folder is a good option.
  3. In Steam, choose the "Add non-Steam Game" command and select OriginThinSetup.exe from where ever you placed it.  Also, choose to run it using Proton.  I used Proton 5.0.
  4. Start the newly added "game" ie: the Origin installer and install it.
  5. Once Origin is installed you can launch it directly from its installer.  Login to your account and choose to download and install the game.
  6. You should now be able to run the game and with a little luck it should basically work.

Now that Origin and the game are installed, the trick is figuring out how to start it directly instead of running the Origin installer again.  The method I ended up using was a bash script:

  1. Close Origin if it's still running.
  2. Go to the directory ~/.steam/steam/steamapps/compatdata/ and look for a sub-directory named with 10 digits.  In my case it was called 3627082160. If you have multiple directories go into each one and work out which has the Origin.exe program.  It should be in a sub-folder named pfx/drive_c/Program Files (x86)/Origin/Origin.exe.
  3. Next you'll need to create a bash script with the code shown below.
  4. In the script update the variable COMPATDIR from 3627082160 to whatever the folder is called on your machine.
  5. Also update the variable GAMEID to the Origin Id of the game you installed. You can get this by logging into origin.com and clicking on the game in your library and the game ID will show up in the URL (see screen shot below).  The Origin Game Id for NFS The Run is 231088400.
  6. If you've got other versions of Proton installed you can experiment with the PROTONVER variable in the script to change which version will be used.  I found for The Run, Proton-5.21-GE-1 worked best.
  7. Save the script somewhere convenient (I just put it in my home directory) and use chmod to mark it executable. eg: ~$ chmod +x nfstherun
  8. Back in Steam, delete the previously created "non-Steam" shortcut to OriginThinSetup.exe.
  9. Use the Add non-Steam game command again to add a shortcut to the script (note this time don't choose to run under Proton as this will cause Steam to create a second compatdata prefix directory which we don't want as we've already got everything setup in the existing prefix).
  10. Finally you can set and icon and grid artwork as you would for any other non-Steam game.
Configuring Steam to run the script

Here's the script:

#!/bin/bash

# Set this the folder where Steam created the Origin prefix
COMPATDIR=3627082160

# Set the to the Origin Game ID of the game to launch
GAMEID=231088400

# Pick a Proton Version
#PROTONVER=steam/steamapps/common/Proton\ 5.0
PROTONVER=root/compatibilitytools.d/Proton-5.21-GE-1

# Location of Origin.exe within the compatdata folder
ORIGIN_EXE="pfx/drive_c/Program Files (x86)/Origin/Origin.exe"

# Steam prefix directory
export STEAM_COMPAT_DATA_PATH=~/.steam/steam/steamapps/compatdata/$COMPATDIR/

# Proton settings
export PROTON_USE_WINED3D=0

# Run
~/.steam/$PROTONVER/proton waitforexitandrun \
    "${STEAM_COMPAT_DATA_PATH}${ORIGIN_EXE}" \
    origin://LaunchGame/DR:${GAMEID}
Locating the Origin Game ID for a game.

In Practice: Origin

That's everything I did to setup Origin on my lounge room gaming machine. There's a couple of caveats:

  1. For some reason sometimes the game either takes a really long time to start, or never starts.  I've found that moving the mouse cursor around using the track pad on the PS4 controller seems to hurry this along quite a bit.
  2. Once the game is closed, Origin will rear it's ugly head. I haven't found a way to prevent this so I just use the controller track pad to shut it down. Unfortunately you can't just leave it running because if you launch the game again it doesn't seem to start. (For a possible work around for this, see this reddit post by lucasrizzini)

In Practice: NFS The Run

As for NFS The Run, it seems to run really well and mostly looks like any other game in Steam:

There are a couple of minor issues:

  • Proton 5 seemed to give fairly frequent micro-stutters.  Switching to Glorious Eggroll 5.1 seemed to really help this.  There's still the occasional stutter but I seem to remember similar behaviour on the PS3 - it could just be the game.
  • Some of the instruction popup screens appeared blank with no text and just a close button.  This didn't bother me since I knew the game anyway.
  • In the snow levels the kicked up spray from other cars appears like black diesel smoke instead of a white mist.  I didn't notice this on PS3 or in online videos of the PC version so I'm guessing this might be a bug in Proton.
  • If you disable V-Sync, the same kicked up spray renders really weirdly in front of your own car and rises vertically from other cars.  This is a known bug in the PC version and nothing to do with running under Linux/Proton.
  • There's some lip-sync issues in the cut scenes.  Not sure if this is a problem with Linux/Proton or just a problem with PC edition of the game. This didn't happen in the PS3 version.  No big deal.

On the positive side, I've played through the entire "Run" part of the game and it's very playable - better than the PS3.  On my GTX-2070 I can set all graphics settings to ultra and run it at 1920 x 1080, the sound is great, PS4 controller works well (although requires mental mapping of Playstation buttons to ABXY style buttons), it looks better than PS3 and I feel like I can see further down the road.

I also have a suspicion things are slightly better balanced on the PC.  Some levels on the PS3 version seemed unusually difficult compared to the levels before and after and I didn't notice it this time through.

TL;DR: Definitely playable and a ton of fun :)