Northstar icon indicating copy to clipboard operation
Northstar copied to clipboard

Improve Linux support

Open GeckoEidechse opened this issue 2 years ago • 21 comments

Introduction

Since the SteamDeck verified program has started, vanilla Titanfall 2 has been marked as Playable, meaning the game works out-of-the-box on Linux!

image

The same however cannot be said about Northstar. While we feature a dedicated section on the Wiki that contains instructions for installing on Linux and describes various workarounds to known issues, running Northstar on Linux is generally more difficult than on Windows.

Why improved Linux support?

As per Steam Survey, only slightly above 1% of players are on Linux, compared to the 96% on Windows. As such Windows will stay our main target. However with the introduction of the SteamDeck and improved support of running Windows native games on Linux, the relative number of players is only expected to rise (though never reaching a majority). As such we should try to ensure that running Northstar on Linux is not significantly more difficult than compared to Windows or compared to running base Titanfall 2 on Linux.

Issues and paper-cuts

While the initial installation (i.e. copying files to the Titanfall 2 directory) is the same for all OS's and platforms, Linux users have to make adjustments to their game depending on whether they are using Steam or Origin.

  • Steam users for example will have to trick Steam into running NorthstarLauncher.exe by renaming Titanfall2.exe and then renaming or symlinking NorthstarLauncher.exe to Titanfall2.exe. This makes switching between the vanilla game and Northstar more difficult.

  • The game console will out-of-the-box not show any text on Linux due to using a (by default) unsupported font.

  • Some users have reported needing to use specific versions of proton in order to be able to run Northstar (while the base game works with default versions).

Notes:

  • Due to their native Linux support for the client and containerised environment, the focus should be on the Steam version of Linux. For example, the easiest solution would be if we could support adding the -northstar to Steam launch arguments also on Linux.
  • The reason -northstar is not working is due to Wine/Proton overwriting the wsock32.dll with its own version at runtime (#291)
  • ~~As per the wiki we say that we do not "officially" support Linux, Considering that some of our contributors run Northstar (exclusively) on Linux we might want to update that statement, should some of the issue stated above be resolved.~~
  • Viper is the only Northstar installer and mod manager known to also have a native Linux version. It's main developer is working on launching Northstar on Linux directly via Viper.

Related issues:

  • #1
  • #7
  • #53
  • #147
  • #210
  • #291

GeckoEidechse avatar Mar 12 '22 18:03 GeckoEidechse

Due to their native Linux support for the client and containerised environment, the focus should be on the Steam version of Linux. For example, the easiest solution would be if we could support adding the -northstar to Steam launch arguments also on Linux.

I don't think this is necessary; tf2 works well out-of-the-box on pretty much any wine 6.x or newer.

pg9182 avatar Mar 13 '22 05:03 pg9182

  • As per the wiki we say that we do not "officially" support Linux, Considering that some of our contributors run Northstar (exclusively) on Linux we might want to update that statement, should some of the issue stated above be resolved.

Changing that right now

abarichello avatar Mar 13 '22 18:03 abarichello

It possible to get origin token without origin - through Northstar launcher options? If i launch origin through lutris through steam (yep, that ugly way for make steam overlay works with origin), it can crash steam after few times, and steam controller stopped works with game. Or mouse input can start jittering after any time, cause worse integration (if play without steam, all fine).

If it possible to make, launch can be easiest not only on linux

IDeathByte avatar Apr 19 '22 15:04 IDeathByte

Agreen, keeping Origin tool from popping up would be nice.

WilsonBradley avatar Apr 19 '22 17:04 WilsonBradley

It possible to get origin token without origin - through Northstar launcher options?

That would require Northstar handling your Origin credentials which is something I personally wouldn't want to have to implement and maintain ._.

My personal recommendation for anyone on Linux is to put the Steam version of Titanfall2 on your wishlist and re-buy it, the moment it's <10€. I'm well aware that the Steam version still uses Origin in the back and requires you to log into Origin but for some reason Steam seems to handle that quite smoothly.

GeckoEidechse avatar Apr 19 '22 19:04 GeckoEidechse

I've been suffering from the Access Violation DEP bug, and no matter what I did I was unable to get the game to launch with Northstar. I'm using the Origin version via lutris, and my attempts to use the recommended version of Proton GE in lutris were unsuccessful.

Nothing worked. Until I tried deleting the LatencyFlex .dlls (the ones you place in the prefix, in system32). It immediately launched on the next attempt, no other changes needed. Not even restarting Origin.

CTalvio avatar May 01 '22 13:05 CTalvio

@KyleGospo might be worth taking a look as you did the initial LatencyFlex PR

GeckoEidechse avatar May 01 '22 14:05 GeckoEidechse

Looking at this now, I'll update you both

KyleGospo avatar May 01 '22 16:05 KyleGospo

https://github.com/R2Northstar/NorthstarLauncher/pull/168

PR to potentially fix this, LatencyFleX received some pretty big updates recently. New code will support both the old/currently working library and the new one.

KyleGospo avatar May 04 '22 22:05 KyleGospo

Above code worked for me in multiple versions of Proton-GE with multiple versions of LatencyFleX. @CTalvio after this is merged and released if you have any further issues please message me on Discord, you'll find me under contributors as "1/4 Life". There's a lot of room for user error with LatencyFleX since it's a manual install. One case I found is if your symlinks to latencyflex_layer.dll and latencyflex_wine.dll point to non-existing files it'll throw an access violation very similar to what you reported.

Another thing you may try is using Bottles instead of Lutris, bottles has a simple checkbox that installs LatencyFleX for you with no further pain. I may update the wiki to suggest that after I get a chance to test it myself. I can confirm it works great for Overwatch.

KyleGospo avatar May 04 '22 23:05 KyleGospo

I've been chatting on Discord about this problem, but it seems like Northstar's DXVK DLLs are broken (for linux). The game crashes on Linux if you don't update them. For someone that packages Northstar - you might want to look into getting the latest DXVKs for 64bit (https://github.com/doitsujin/dxvk/) and packaging them inside the bin/x64_retail folder. If someone needs my system info: CPU - AMD Ryzen 5 3600 GPU - NV GTX 1080ti 16GB DDR4 RAM Pop_OS 22.04

BotchedRPR avatar May 29 '22 11:05 BotchedRPR

I've been chatting on Discord about this problem, but it seems like Northstar's DXVK DLLs are broken (for linux). The game crashes on Linux if you don't update them. For someone that packages Northstar - you might want to look into getting the latest DXVKs for 64bit (https://github.com/doitsujin/dxvk/) and packaging them inside the bin/x64_retail folder.

~~To update based on the discussion on Discord we figured out that the DXVK dlls are downloaded by Steam and not actually shipped by Northstar.~~ EDIT: Turns out it was ReShade that created those DXVK dlls.

c.f.:

  • https://github.com/doitsujin/dxvk/issues/2658#issuecomment-1140439188
  • https://discord.com/channels/920776187884732556/972909610140839956/980435227405062184

GeckoEidechse avatar May 29 '22 12:05 GeckoEidechse

I feel so stupid now :) Thanks everyone for the help anyways.

BotchedRPR avatar May 29 '22 19:05 BotchedRPR

@CTalvio that LatencyFleX change is in the latest version if you want to try it out

KyleGospo avatar Jun 18 '22 19:06 KyleGospo

After some testing, I have some information to add to this.

The last known working version of Proton-GE that works with Northstar is Proton-7.3-GE-1. In the following release, GE-Proton7-1, GloriousEggroll state's the following in his patch notes:

The base for WINE was changed from wine upstream to Proton experimental, and staging currently is not used in this new build. There are several reasons this was done, which are explained in detail in the post above.

It would appear that the WINE base for Proton is the issue, specifically the official Proton base that Valve uses, and now GE does as well.

Further supporting this, I've testing multiple builds of Proton-TKG compiled against Valve Experimental, as well as wine-staging version 7.2 7.3 7.6 and 7.12. All four builds that were compiled against wine-staging worked perfectly, and the build against Valve Experimental did not. It would appear that Northstar is already functional via WINE translation, patches from upstream WINE just need to be backported and/or Proton needs to be rebased.

Discord messages

cyrv6737 avatar Jul 09 '22 10:07 cyrv6737

If you have bottles, can you check if their proton based soda runner has these patches?

KyleGospo avatar Jul 09 '22 18:07 KyleGospo

How does the Soda runner differ from Proton? I am unfamiliar with that particular runner from Bottles and it's not documented in their Docs.

Proton outside of steam is very unsupported, so even if it did work I don't see how that would help. Especially since the goal here is to get N* running out of the box on the version of Proton the Deck ships with.

If I find myself having the time (and patience to deal with Steam under wine) I can take a look regardless.

cyrv6737 avatar Jul 09 '22 19:07 cyrv6737

@cyrv6737 https://twitter.com/usebottles/status/1545488730806534144

If it's missing those patches I'll work with them to correct that, we'd like to start recommending Bottles for Northstar since we can export a ready-made bottle with everything needed and save a lot of headache.

KyleGospo avatar Jul 09 '22 21:07 KyleGospo

@cyrv6737, did you notice anything different wrt performance on 7.12? On the dedicated server with vanilla wine on recent wine versions, there were performance issues in the game loop causing time to appear to be slowed down for clients.

pg9182 avatar Jul 11 '22 08:07 pg9182

@pg9182 Not that I noticed no but I didn't play that long. Did you notice the performance issues on wine or wine-staging?

cyrv6737 avatar Jul 11 '22 09:07 cyrv6737

wine, haven't tried staging

pg9182 avatar Jul 18 '22 21:07 pg9182