R2Northstar / Northstar

Repo for packaged Northstar releases
https://northstar.tf/
MIT License
1.69k stars 129 forks source link

Improve Linux support #214

Open GeckoEidechse opened 2 years ago

GeckoEidechse commented 2 years ago

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.

Notes:

Related issues:

pg9182 commented 2 years ago

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.

abarichello commented 2 years ago
  • 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

IDeathByte commented 2 years ago

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

WilsonBradley commented 2 years ago

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

GeckoEidechse commented 2 years ago

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.

CTalvio commented 2 years ago

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.

GeckoEidechse commented 2 years ago

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

KyleGospo commented 2 years ago

Looking at this now, I'll update you both

KyleGospo commented 2 years ago

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 commented 2 years ago

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.

BotchedRPR commented 2 years ago

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

GeckoEidechse commented 2 years ago

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.:

BotchedRPR commented 2 years ago

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

KyleGospo commented 2 years ago

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

cyrv6737 commented 2 years ago

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

KyleGospo commented 2 years ago

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

cyrv6737 commented 2 years ago

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.

KyleGospo commented 2 years ago

@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.

pg9182 commented 2 years ago

@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.

cyrv6737 commented 2 years ago

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

pg9182 commented 2 years ago

wine, haven't tried staging