Jump to content

Running The Game On Ubuntu + Steam Play


69 replies to this topic

#21 Wulfex

    Rookie

  • Elite Founder
  • Elite Founder
  • 2 posts

Posted 30 November 2018 - 05:12 PM

I'm honestly glad to see this thread, I'm going to try to get it to launch. If I can get MWO to run in Linux, I wouldn't even need Windows. I'd be happy as a clam. I don't play much because I've been waiting for the day this is playable in linux.

If anyone gets MWO up and running ( even just partially ) don't forget to rate it over at https://www.protondb.com/app/342200. The proton reports say it's broken, but the game launches for me and that's highly encouraging!

edit:

After deleting logs and trying over and over again (as mention by the OP), I was able to play a game! It ran perfectly, like it does on Windows. Just needs a little love in the login and mechlab and the game would have no issues on linux. Super exciting!

Edited by Wulfex, 30 November 2018 - 05:44 PM.


#22 Ch_R0me

    Member

  • PipPipPipPipPipPip
  • The Mercenary
  • The Mercenary
  • 278 posts
  • LocationPomeranian Voivodeship, PL

Posted 02 December 2018 - 12:03 AM

Don't forget to post results ;-)

#23 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 03 December 2018 - 05:23 AM

Glad you got it working Wulfex! Unfortunately it still doesn't reliably run for me on my Ubuntu laptop and according to the report on wineHQ it's going to be hit or miss in general for most users. I wouldn't want to report it as not-borked until the situation improves from having to delete the logs and restart the game ~20 times first. However, when I do have time I may try the hacky fix mentioned in the wine report as a stopgap measure and post some instructions on how to do it if I can swing it.

#24 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 07 December 2018 - 04:48 PM

I've managed to compile wine on my machine and run the game without crashing - here's some instructions if anyone wants to try a 'hacky fix' similar to the one mentioned in the wineHQ report on the previous page.

The instructions for building wine can be found here, I've summarized them for what I did on Ubuntu 18.04: https://wiki.winehq.org/Building_Wine

Start by cloning the source code and configuring for your system
git clone git://source.winehq.org/git/wine.git ~/wine-dirs/wine-source
cd ~/wine-dirs/wine-source
./configure --enable-win64

Use apt to get any libraries that the configure script complains about missing and re-run that last line until it stops complaining.
Once configured, edit ~/wine-dirs/wine-source/dlls/ntdll/path.c:
Find the function "static ULONG get_full_path_helper" and change these lines
	if (NtCurrentTeb()->Tib.SubSystemTib)  /* FIXME: hack */
		cd = &((WIN16_SUBSYSTEM_TIB *)NtCurrentTeb()->Tib.SubSystemTib)->curdir.DosPath;
	else
		cd = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectory.DosPath;

to
	cd = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectory.DosPath;

and save the file.
Next, compile wine:
make -j5

The number is just how many processes to use, up to number of processors you have + 1 is good if you don't have to do anything else with your computer during compilation. The '-j5' is unnecessary.
Wait 20-30 minutes. When it completes, you should have a shortcut to a script that runs wine at "~/wine-dirs/wine-source/wine64". I would recommend against the last step listed on the wineHQ instructions where you run "make install" after compilation - as this is a hacky version of wine we compiled, you don't want it overwriting any other wine install you have on your system. Do not run "make clean" after this step unless you want to recompile and waste another 20 or so minutes of your time.

Assuming you have MWO installed with steam play, the following shell script should run the game with your new build of wine:
 
export WINEPREFIX=~/.steam/steam/steamapps/compatdata/342200/pfx
~/wine-dirs/wine-source/wine64 ~/.steam/steam/steamapps/common/MechWarrior\ Online/Bin64/MWOClient.exe

I'd recommend saving this script somewhere so you can just use it to run the game.

I'll be testing it more to make sure it's running correctly, but it seems to be okay for now. Still, PGI I do hope that if you're reading this you'll take into consideration the suggestions on the wineHQ report to update boost 1.65.0 or later so we can run this directly through steam play: https://bugs.winehq....ug.cgi?id=46022

Edit: Adding some more details.

Edited by ohartenstein23, 07 December 2018 - 06:12 PM.


#25 MrVaad

    Member

  • PipPipPipPipPip
  • The Privateer
  • The Privateer
  • 129 posts
  • LocationFrance

Posted 10 December 2018 - 08:31 AM

Do you use MWO with vulkan on Proton ?

Because i use vulkan on windows and it works (just more CPU consumption on one of the threads due to shaders cache compute)

Edited by MrVaad, 10 December 2018 - 08:52 AM.


#26 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 10 December 2018 - 09:24 AM

Switching to Vulkan shouldn't fix the issues for running on Ubuntu, as it's only an openGL replacement and the problem is with the directory calls in Wine/Proton themselves. I'll try it to see if it changes anything at least.

Edit: Tried switching to running vulkan by setting up dxvk in the prefix that steam creates for MWO, now getting just a black screen on starting the game, both with and without dxvk setup and using Proton. However, I've found in the Proton source code where the same file I edited in Wine is, so theoretically I could update the above instructions for compiling Proton with the hacked fix and installing it so only MWO uses the 'fixed' Proton version.

More Edit: On reading further, Proton seems to use Vulkan by default, or at least the configuration options when building suggests that it must be specified to not use Vulkan when compiling a version of Proton.

Even More Edit: Compiling Proton from source takes an obnoxiously long amount of time, would not recommend unless you're a masochist. My build didn't manage to fix this issue either, so if somebody else gets it working, kudos to them.

Edited by ohartenstein23, 10 December 2018 - 11:37 AM.


#27 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 27 December 2018 - 05:43 AM

Having tested this a bit with the re-compiled Wine, I realize I forgot to mention that DirectX11 doesn't seem to work well under the most recent Wine version - if you're getting low framerates, I recommend trying switching to DX9 in the settings menu and restarting. This significantly improved my performance in game.

#28 Rascally Jack

    Member

  • PipPip
  • Shredder
  • Shredder
  • 36 posts
  • LocationRobinson

Posted 31 December 2018 - 09:15 AM

oharenstein23 that so worked... I made a few wrong turns *terribly new at Linux* popped timeshift cooldowns a couple times to correct my ignorance and WHAM!!!! totally works great. I can play MWO again after switching over to Linux. Super excited and it was simple when I stopped and thought about what was needing done to get rid of the warnings etc.... I will warn everyone else... Leave the OSS and audio stuff alone other than pulse audio... just LEAVE it ALONE... or have a real good timeshift set up and be prepared to use it.

I just have one question Ohartenstein23 either here or by PM where did you find the file for the the if else statement in Proton? Thank you again so very much!

*edit in Proton addded*

Edited by Rascally Jack, 31 December 2018 - 09:20 AM.


#29 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 31 December 2018 - 09:19 PM

Great, glad it worked for you! The file is nestled a layer deeper in the Proton source code, but still in the same location with respect to the Wine module that Proton uses - here's the file on the Proton github page: https://github.com/V...ls/ntdll/path.c. It's still in dlls/ntdll, Proton just has an extra folder for the Wine source.

#30 Ch_R0me

    Member

  • PipPipPipPipPipPip
  • The Mercenary
  • The Mercenary
  • 278 posts
  • LocationPomeranian Voivodeship, PL

Posted 12 January 2019 - 12:54 PM

ohartenstein23

Do you're actively posting your efforts on ProtonDB and Wine's AppDB?

Input there would help Linux fans a lot ;)

#31 ohartenstein23

    Member

  • PipPip
  • Little Helper
  • 20 posts

Posted 14 January 2019 - 10:53 AM

I did post a link to this thread on the ProtonDB thread, Wine's AppDB is where I got the idea for the fix.

#32 ThatFnGuy

    Rookie

  • The Hungry
  • The Hungry
  • 6 posts

Posted 24 January 2019 - 06:09 PM

Thanks ohartenstein23 for the heads up. I can confirm this also works on Arch and I've submitted this patch to Tk-Glitch who makes the WINE-TKG builds used by Lutris. He's added it to his PKGBUILDS github repo so if anyone is running Arch or an Arch-like they can build this from his PKGBUILD script. Just make sure you edit
customization.cfg
and change
_mwo_fix="true"
to apply the patch. Keep in mind you can enable the Proton patches and FAUDIO patches as well with his build making it similar to Proton. Just be sure to install faudio-git and lib32-faudio-git if you decide to use FAUDIO.

Edited by ThatFnGuy, 24 January 2019 - 06:09 PM.


#33 sleet01

    Member

  • PipPipPipPipPip
  • Bad Company
  • Bad Company
  • 185 posts
  • LocationSeattle, WA, USA

Posted 27 January 2019 - 02:01 AM

I was able to compile a custom build of Wine as per ohartenstein23's example, and run MWO from the Steam Play dir without any crashes.
Unfortunately DX11 performance is abysmal: ~26 fps in the Mechlab, ~12 fps in actual games.
Installing dxvk and vulkan dlls in the Wine prefix via Winetricks about quadrupled the Mechlab fps and doubled in-game fps, but it's still pretty terrible.
This is with a TR 1950x and Vega 64 card so the horsepower should be there; currently I'm not seeing full utilization of either so I suspect a driver or Vulkan config issue.
It's also possible that I missed some required lib when compiling Wine - there were a lot of optional libs so I may have missed some key set of development headers when I built Wine.

DX9 performance is adequate but a few effects don't seem to be supported so lighting looks a little wonky. I'll keep tweaking the settings and dlls to see if I can get everything running smoothly and without obvious graphical issues.

#34 UrAllJerks

    Member

  • Pip
  • The Determined
  • The Determined
  • 16 posts

Posted 27 January 2019 - 01:56 PM

It would be nice if PGI looked into fixing this on their end. For about a year I maintained a Windows partition just to play MWO but eventually decided it wasn't worth the effort given the amount of games available on Linux. A lot of games 'just work' in Steam with proton these days; the experience is much better than it was years ago sorting out library orders etc. in wine. I'm sure if they fixed this crash-on-launch bug I'd be back to squandering money on mechpacks in no time.

#35 mutestory

    Rookie

  • Little Helper
  • 5 posts

Posted 03 February 2019 - 04:27 AM

View Postohartenstein23, on 10 December 2018 - 09:24 AM, said:

Switching to Vulkan shouldn't fix the issues for running on Ubuntu, as it's only an openGL replacement and the problem is with the directory calls in Wine/Proton themselves. I'll try it to see if it changes anything at least.

Edit: Tried switching to running vulkan by setting up dxvk in the prefix that steam creates for MWO, now getting just a black screen on starting the game, both with and without dxvk setup and using Proton. However, I've found in the Proton source code where the same file I edited in Wine is, so theoretically I could update the above instructions for compiling Proton with the hacked fix and installing it so only MWO uses the 'fixed' Proton version.

More Edit: On reading further, Proton seems to use Vulkan by default, or at least the configuration options when building suggests that it must be specified to not use Vulkan when compiling a version of Proton.

Even More Edit: Compiling Proton from source takes an obnoxiously long amount of time, would not recommend unless you're a masochist. My build didn't manage to fix this issue either, so if somebody else gets it working, kudos to them.


I'm also getting the black screen with this build, though it appears everything is there(clicks on random spots will open links). I wonder, if I could blindly login, if the game would work.

I've also noticed that MWO is no longer available for steamplay. I think this whole thing is making someone mad.

Edit: Indeed, blindly clicking in the bottom right got it to start patching.
Posted Image

Edited by mutestory, 03 February 2019 - 04:42 AM.


#36 sleet01

    Member

  • PipPipPipPipPip
  • Bad Company
  • Bad Company
  • 185 posts
  • LocationSeattle, WA, USA

Posted 04 February 2019 - 06:22 PM

View Postmutestory, on 03 February 2019 - 04:27 AM, said:



I've also noticed that MWO is no longer available for steamplay. I think this whole thing is making someone mad.



I believe I have had this setting get reset a couple of times after the beta Steam client gets re-installed.
Is it still missing if you go to Steam -> Settings -> Steam Play and enable both "Enable Steam Play for supported titles" and "Enable Steam Play for all other titles"?

My MWO installation is still in place when these boxes are checked, but I haven't tried uninstalling and re-installing recently.

Edited by sleet01, 04 February 2019 - 06:23 PM.


#37 ThatFnGuy

    Rookie

  • The Hungry
  • The Hungry
  • 6 posts

Posted 06 February 2019 - 06:51 PM

View Postsleet01, on 27 January 2019 - 02:01 AM, said:

I was able to compile a custom build of Wine as per ohartenstein23's example, and run MWO from the Steam Play dir without any crashes.
Unfortunately DX11 performance is abysmal: ~26 fps in the Mechlab, ~12 fps in actual games.
Installing dxvk and vulkan dlls in the Wine prefix via Winetricks about quadrupled the Mechlab fps and doubled in-game fps, but it's still pretty terrible.
This is with a TR 1950x and Vega 64 card so the horsepower should be there; currently I'm not seeing full utilization of either so I suspect a driver or Vulkan config issue.
It's also possible that I missed some required lib when compiling Wine - there were a lot of optional libs so I may have missed some key set of development headers when I built Wine.

DX9 performance is adequate but a few effects don't seem to be supported so lighting looks a little wonky. I'll keep tweaking the settings and dlls to see if I can get everything running smoothly and without obvious graphical issues.


On my system there seems to be a regression in WINE 4.x, recommend using WINE-Staging 3.21 as the base. Also recommend the following in your DXVK.conf file:
dxgi.nvapiHack = True
dxvk.numCompilerThreads = X 

X = number of cores

Also recommend using the ASYNC Shader patches on DXVK. Mind you this patch only works on DXVK 0.95 and lower at the moment, it won't patch 0.96 so we're waiting on the dev to update it. Also install GameMode.
I also created a folder (~/Games/MWO) for holding the DXVK.conf file and shader caches. I'm also using the following environment variables:
DXVK_ASYNC=1
DXVK_CONFIG_FILE=/home/<user>/Games/MWO/dxvk.conf
DXVK_STATE_CACHE=0
WINEESYNC=1
LD_PRELOAD=/usr/\$LIB/libgamemodeauto.so.0


Since I use Nvidia cards I also use these:
__GL_NextGenCompiler=1
__GL_SHADER_DISK_CACHE=1
__GL_SHADER_DISK_CACHE_PATH=/home/<user>/Games/MWO
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
__GL_THREADED_OPTIMIZATIONS=1


Also this may help as well.
Give my buddy Larsh the Casual Mechwarrior some love... or potatoes. He'll get a kick out of either. Posted Image
After playing with all this I'm now running upwards of a 140~ in game and most of the time I'm getting now 70-100fps compared to 45~ FPS before.

Edited by ThatFnGuy, 06 February 2019 - 06:52 PM.


#38 mutestory

    Rookie

  • Little Helper
  • 5 posts

Posted 07 February 2019 - 12:02 PM

View Postsleet01, on 04 February 2019 - 06:22 PM, said:


I believe I have had this setting get reset a couple of times after the beta Steam client gets re-installed.
Is it still missing if you go to Steam -> Settings -> Steam Play and enable both "Enable Steam Play for supported titles" and "Enable Steam Play for all other titles"?

My MWO installation is still in place when these boxes are checked, but I haven't tried uninstalling and re-installing recently.


Yeah, that's exactly what happened. I guess I jumped to conclusions after reading some of the vitriol related to getting this working with wine.

(Anyone get the dxvk hud working? I'm not even sure dxvk is on with this build at all, and the hud wont come up.)
Edit: nvm i was on on windows 2003

Still not positive whether its taking the conf file though.

Edited by mutestory, 07 February 2019 - 01:38 PM.


#39 Gagis

    Member

  • PipPipPipPipPipPipPip
  • FP Veteran - Beta 1
  • FP Veteran - Beta 1
  • 552 posts

Posted 10 February 2019 - 04:30 PM

View PostThatFnGuy, on 24 January 2019 - 06:09 PM, said:

Thanks ohartenstein23 for the heads up. I can confirm this also works on Arch and I've submitted this patch to Tk-Glitch who makes the WINE-TKG builds used by Lutris. He's added it to his PKGBUILDS github repo so if anyone is running Arch or an Arch-like they can build this from his PKGBUILD script. Just make sure you edit
customization.cfg
and change
_mwo_fix="true"
to apply the patch. Keep in mind you can enable the Proton patches and FAUDIO patches as well with his build making it similar to Proton. Just be sure to install faudio-git and lib32-faudio-git if you decide to use FAUDIO.
This is looking good. I am using _poe_fix="true" and _arena_fix="true" patches anyways so it wasn't much trouble to test. MWO runs fine so far. Going to try the DXVK environment variables some other day.

#40 sleet01

    Member

  • PipPipPipPipPip
  • Bad Company
  • Bad Company
  • 185 posts
  • LocationSeattle, WA, USA

Posted 11 February 2019 - 03:36 PM

Well, I tried to submit a review for the latest version of MWO under Wine, with the specific steps necessary for working around /the bug they refuse to fix themselves/, and... it got shot down after two weeks. Every single piece of the review was flagged, so I just deleted it.

Going forward I don't recommend wasting any time trying to update Wine's review for MWO; we should probably just track work-arounds here until Lutris and Steam Play are working. Let Wine be obnoxious on their own.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users