Jump to content

Running The Game On Ubuntu + Steam Play


30 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 ManganMan

    Member

  • PipPipPipPipPipPip
  • The Benefactor
  • The Benefactor
  • 212 posts
  • LocationPomeranian Voivodeship, PL

Posted 02 December 2018 - 12:03 AM

Don't forget to post results ;-)

#23 ohartenstein23

    Member

  • Pip
  • Little Helper
  • 16 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

  • Pip
  • Little Helper
  • 16 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

  • PipPip
  • Bridesmaid
  • 49 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

  • Pip
  • Little Helper
  • 16 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

  • Pip
  • Little Helper
  • 16 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
  • 35 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

  • Pip
  • Little Helper
  • 16 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 ManganMan

    Member

  • PipPipPipPipPipPip
  • The Benefactor
  • The Benefactor
  • 212 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

  • Pip
  • Little Helper
  • 16 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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users