ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.87k stars 1.04k forks source link

Battlefield 4™ (1238860) #3994

Open ipkpjersi opened 4 years ago

ipkpjersi commented 4 years ago

Compatibility Report

System Information

I confirm:

Symptoms

This isn't a problem specific to Linux with Proton, but rather, a problem that also exists on Windows. When you first install the game and enter a multiplayer game, after 5 minutes or so you will get kicked from the multiplayer game by PunkBuster, but there is an easy fix available for this. Other than that, the game seems to run quite well for me and I haven't really noticed any other issues.

Solution

The solution to this is fairly simple, it was originally posted by Feline Fowl on ProtonDB. I will crosspost it here so others can easily find it. The solution is as follows:

Battlefield 4 uses "PunkBuster" Anti-Cheat, however the game has an issue (also happens on Windows) where even though during the install it says everything is fine, you'll get kicked from every multiplayer match. To fix this, you'll have to manually download PunkBuster for Windows from the site, and run the EXE via Wine: https://www.evenbalance.com/pbsetup.php

I recommend putting this EXE in its own folder, as it downloads some extra files. Run it with the same prefix that Battlefield 4 uses, so run the game at least one time and then close it. Then run WINEPREFIX="/path/to/library/compatdata/1238860" wine pbsetup.exe. Select "Battlefield 4" from the dropdown, and point it to the game's install folder if it didn't find it automatically. It might take a while to download, but it'll complete and Battlefield 4 multiplayer will work!

Xiretza commented 4 years ago

There is also the issue of no ping indicator in multiplayer matches - the leaderboard simply shows - instead of the RTT in ms. Many servers have plugins that automatically kick players with a missing ping. Of note is that all other in-game latency displays, such as in the server browser or in the debug overlay, work correctly.

Unfortunately I don't have the game on steam, but the ratings on ProtonDB suggest that at least some steam players also have the problem. As an attempted workaround, I tried setcap cap_net_raw+epi /usr/bin/wine-preloader, which results in ping working inside wine (which it didn't before), but no change in BF4 ingame latency display.

$ wine ping steampowered.com
Pinging steampowered.com [104.96.45.241] with 32 bytes of data:
Reply from 104.96.45.241: bytes=32 time=34ms TTL=54
Reply from 104.96.45.241: bytes=32 time=31ms TTL=54
Reply from 104.96.45.241: bytes=32 time=34ms TTL=54
Reply from 104.96.45.241: bytes=32 time=38ms TTL=54

Ping statistics for 104.96.45.241
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
    Minimum = 31ms, Maximum = 38ms, Average = 34ms

Personally I've never encountered any punkbuster related kicks on a vanilla Wine/Origin setup.

ThaChillera commented 4 years ago

Same issue with the ping, getting kicked is super annoying. Haven't managed to solve it yet with the setcap solution, but others apparently have

ipkpjersi commented 4 years ago

Battlefield 4 no longer even opens for me with Proton 5.09, I had to switch to Proton-5.11-GE-1-MF by GloriousEggroll to get it to open. Is anyone else having this problem or is it just me?

edit: the problem was just me. I had Proton installed on an external drive SteamLibrary for some reason, I was in the process of replacing the drive (which meant it no longer existed)

As for the issue with ping not displaying and getting kicked for missing ping, I am not having that issue. I have tried over 10 different servers and I have yet to be kicked once I completed the initial PunkBuster setup.

Everything is working as expected for me once again.

toma678 commented 4 years ago

I appear to be having an issue with the game (Origin overlay?). The game starts with Proton 5.11-GE-2-MF. The mouse works in the menus however if I join a game, neither the mouse nor the keyboard work. The keyboard doesn't work in the menus as if I try and change a key binding, there's no response from any keys. I can't disable the overlay as I own the game through Steam and so it launches Origin in external launcher mode which defaults the overlay on and it can't be turned off from what I can see.

Can anyone shed any light on this?

EDIT: I was using GE proton as 5.09 didn't appear to work. It seems to work using 5.09 however now although the mouse works in the menu, when selecting a deployment point, the selection "scrolls" through vertically and the mouse is frozen in game, but the keyboard works.

ipkpjersi commented 4 years ago

I had a similar issue I think with my keyboard not working in Battlefield V, I don't believe it was related to Origin in-game overlay or Steam in-game overlay. I switched from Fullscreen to Borderless and that fixed my keyboard not working in Battlefield V, might be worth a try for you.

Cherser-s commented 4 years ago

I have a similar issue with keyboard not working in both menu and a game, as well as mouse in locked mode in game, though Origin overlay is disabled. Thought at first it was due to XWayland, but it doesn't work in native Xorg window manager either as well as Wine virtual desktop.

warriormaster12 commented 3 years ago

When is the ping issue going to be fixed or is there at least a workaround for it?

Cherser-s commented 3 years ago

Well, there is a workaround for ping, you just need to allow wineserver and wine-preloader binaries (both 64 and 32) to use raw sockets. https://appdb.winehq.org/objectManager.php?sClass=version&iId=31145

poperigby commented 3 years ago

I'm having an issue with Origin not recognizing the game as installed. I get all the way through the setup, but when I press play Origin launches and says:

The game Battlefield 4™ Premium Edition does not appear to be installed. Please install it or try relaunching the game.

OS: Arch Linux Proton version: 5.13-4

fedebenelli commented 3 years ago

When I try to launch the game steam just nothing happens except for Steam showing it as running. Doesn't even launch Origin

OS: Arch Linux Proton version: Proton 5-21-GE-1 GPU: Nvidia GTX 960 CPU: AMD FX 6300

tunanachos commented 3 years ago

Any update on the no ping issue? Picked this up during the Winter summer sale on Steam and it works fine (using Proton-5.21-GE-1). The main issue I have (besides Origin being a bit difficult at launch) is not having a ping, for the majority of the servers I've joined they are running an addon which kicks you for this.

I've found numerous posts on Reddit / forums detailing how to fix this, however they are running these fixes (and the installs) with Lutris and not Steam+Proton.

Just for clarification, I did try the fix on WineHQ and @Cherser-s suggestion but my ping is still missing/the issue remains.

tunanachos commented 3 years ago

Replying to https://github.com/ValveSoftware/Proton/issues/3994#issuecomment-779256073

No and unfortunately there doesn't seem much interest in fixing the issue. if your total playtime is under 2-hours I sincerely suggest refunding and buying one of the other battlefields.

sigzegv commented 3 years ago

The setcap issue is explained here https://www.reddit.com/r/linux_gaming/comments/gc5qss/wine_and_ping_support_on_ubuntu_a_guide/

But this solution doesn't work for me either in my ubuntu 20.04, I tried to link the custom proton-ge's libwine.so I'm using in steam to the ld.conf.so. So from what I understood is that could be solved by a spefic way to build wine. Does somebody have such build ?

sigzegv commented 3 years ago

After reading this https://github.com/ValveSoftware/Proton/issues/4586 (about ping issue), I tried to run bf4 from a windows steam with a lutris wine build, and after running the setcap trick on the lutris wine's binaries, it seem that ping works ingame. So the only workaround for BF4 and ping issue is to not use Proton.

nowburp commented 3 years ago

Installed yesterday and ootb was getting ping but also getting kicked after 3-4 minutes by punkbuster.

Today I tried to manually reinstall (and update) punkbuster with the: WINEPREFIX=$HOME/.steam/steam/steamapps/compatdata/1238860/pfx wine pbsetup.exe trick and it broke my ping.

So I removed the proton prefix and also moved the game (from within steam) from spinning rust to ssd had it performed the origin and punkbuster setup and still got no ping (so actually worse than yesterday :))

I've tried various "setcap cap_net_raw+epi" solutions also symlinking the used wine* files to my /etc/ld.so.conf

also tried various proton versions

I'm on Debian 10

if anyone has suggestions let me know

sigzegv commented 3 years ago

As it's said on my previous post, ping doesn't work with proton either with setcap trick, you must run the game directly from a wine build (lutris or wine-tkg as example)

nowburp commented 3 years ago

As it's said on my previous post, ping doesn't work with proton either with setcap trick, you must run the game directly from a wine build (lutris or wine-tkg as example)

I hear you mate but there are plenty of ppl here playing it with proton: https://www.protondb.com/app/1238860 perhaps those are old reports and it broke recently ?

sigzegv commented 3 years ago

no idea if a distrib issue or a regression, I know many people is playing without the ping on servers that dont' kick for that. Fact is that proton is now bothering with setcap trick.

Cherser-s commented 3 years ago

Interesting, after latest Wine update I can't get Origin working, and it simply hangs while trying to connect to some api server for eternity, if I have capability cap_net_raw+epi on wine-preloader (32 bit version). If I remove this, Origin launches fine, but I think I won't be able to connect to Punkbuster servers.

I simply get winsock error 10035 infinitely, this probably is connected to Origin updater checking, if new version is available.

TheGreatestJannet commented 3 years ago

Has anyone found a fix yet for the ping issue that doesn’t require running Windows Steam in wine though Lutris? I was thinking of buying the game but if the ping issue means it doesn’t work in proton it might not be worth it.

tunanachos commented 3 years ago

Has anyone found a fix yet for the ping issue that doesn’t require running Windows Steam in wine though Lutris? I was thinking of buying the game but if the ping issue means it doesn’t work in proton it might not be worth it.

Don't buy it. I spent ages trying to fix it and couldn't. You'll be kicked from 95% of the multiplayer servers because of some stupid add-on most of them run.

GloriousEggroll commented 3 years ago

looks like a patch for the ping issue was proposed last night: https://source.winehq.org/patches/data/207990

Here's a proton-ge test build with the patch, i was able to play for about 45 min in multiplayer without issue (completed a match start to finish): https://drive.google.com/file/d/189Y7Khlpeti-1vLiNbWPYV7X-OTAIOxG/view?usp=sharing

tunanachos commented 3 years ago

Replying to https://github.com/ValveSoftware/Proton/issues/3994#issuecomment-864833324

Not to try and insult you by asking this, but are you 100% sure you were playing on a server that has this issue?

I'm sure you're right correct and it's working - I just thought I'd double check before getting my hopes up.

Still, that being said I guess that only goes to prove the old adage about the internet; "if you want the answer to something don't ask for it, Instead post the wrong answer and someone will correct you almost immediately" 😛

sigzegv commented 3 years ago

I can confirm the Proton-6.11-GE-1 fixes the issue. I tried it, ping displays nicely, sometimes it takes some couple of seconds to be refreshed and displayed, but it definitely works.

Sturmlocke86 commented 3 years ago

looks like a patch for the ping issue was proposed last night: https://source.winehq.org/patches/data/207990

Here's a proton-ge test build with the patch, i was able to play for about 45 min in multiplayer without issue (completed a match start to finish): https://drive.google.com/file/d/189Y7Khlpeti-1vLiNbWPYV7X-OTAIOxG/view?usp=sharing

Found this conservation by randomly googling the subject and just created a Github account in order to provide feedback for this type of thing. Going to test your new 6.11 build tonight and report back asap. In any case, thanks for taking the time to fix this issue in ProtonGE. My family and friends have moved over to Ubuntu / Suse / Fedora Linux and we all just bought BF4 on Steam a couple of days ago. Your timing is perfect in our case. Looking forward to the official release.

Cheers

Sturmlocke86 commented 3 years ago

Update: Ok, just played online a couple of rounds: no kicks whatsoever, ping was shown just fine. Worked like a charm.

Cherser-s commented 3 years ago

Interesting, this patch doesn't work for me (in vanilla wine version, that is), if I don't enable raw sockets capability for wine binary files.

I've ran wine ping commands to test this patch. In the case if I enable those capabilities, then Origin just doesn't start and hangs, looping through some crypt32 calls or something like that. The same happens, if wineserver is already running (regardless of capabilities being set).

UPD: I allowed unprivileged ICMP requests for my user by sysctl. Also Origin started working somehow and doesn't hang just as in case with setcap, so I could start bf4 and play multiplayer with working ping. Though Origin still hangs at the start in case if wineserver wasn't initiated by Origin executable. Something isn't right with Origin itself probably.

Sturmlocke86 commented 3 years ago

Another update: The game is still working just fine ping-wise (with ProtonGE 6.11), but I noticed a different issue.

The game stutters heavily every second or two when playing online. I checked ProtonDB and noticed that there are other users with the same issue. I've tried a bunch of the suggested workarounds (-notexturestreaming, gamemode, turning off bandwith optimization etc.), unfortunately to no avail.

According to one ProtonDB report (from the user "Arge"): "Origin, when being online, seems to heavily stutter this game (as well as Battlefield1 via Lutris) exactly every single second. If one manages to launch the game with the chat of Origin being offline, this stutter doesn't exist."

Is anyone else experiencing the above? I am able to confirm the issue on two separate machines, one equipped with an RTX 2080 Super. OS: Ubuntu 21.04 and 20.04.2.

Thanks!

TheGreatestJannet commented 3 years ago

Are you sure it isn’t compiling shaders? On my Arch Linux i5 6500 and GTX 1060 6GB machine, it does stutter online but not as frequently as every 1 or 2 seconds.

Xiretza commented 3 years ago

The game stutters heavily every second or two when playing online. I checked ProtonDB and noticed that there are other users with the same issue. I've tried a bunch of the suggested workarounds (-notexturestreaming, gamemode, turning off bandwith optimization etc.), unfortunately to no avail.

I've noticed the same symptom on vanilla wine 6.11 (with setcap on wine{server,{,64}-preloader} to get privileged ICMP). It's intermittent, but when it's there, it's a very obvious regular stutter.

Cherser-s commented 3 years ago

Didn't notice stutters that frequent in privileged ICMP (using vanilla wine as well), but I notice some pretty heavy stutters around every 20-30 seconds, regardless of whether ICMP is privileged or not.

legendofmiracles commented 3 years ago

For me, when I start the game it

  1. launched origin
  2. did the usual origin shenanigans (opened several windows that were tiled, had to kill them all except one in order to open the real game menu) But the launch button of the game was greyed out, when I tried to close origin again it said that bf4 was already running and that I should close it before proceeding. And indeed, in my process list there was bf4.exe - but no window was open with the game, nor did nvidia-smi (which reported origin) show it as a client.

Is there anything I can do to resolve this?

Penagwin commented 3 years ago

We need to figure out this ping thing, I'm not sure what version I'm on but I got banned from a bf4 server for not having a ping - this is going to happen to others, especially with the new handheld that was announced.

TheGreatestJannet commented 3 years ago

The ping is fixed on Proton-GE 6.12.

Cherser-s commented 3 years ago

Did anyone else encounter Origin hang when using privileged (through setcap cap_net_raw+epi on wine-preloader*) ICMP?

Penagwin commented 3 years ago

Okay for those that missed it like me here's how to install Proton-GE 6.12

git clone https://github.com/p-mng/proton-ge-custom-updater
cd proton-ge-custom-updater
./proroton-ge-custom-updater.sh

Restart steam Make sure to right click on Battlefield 4 and force Proton-GE 6.12

If you have issues with origin not launching try the regular steam branch and not the beta branch and/or restarting steam again.

nixRidge commented 3 years ago

Has anyone been able to fix the periodic stutter? I've been playing BF4 for quite a while and amassed a hefty collection of compiled shaders, but still getting some stutters at just the wrong times in combat 😳 lolol

I've tried -notexturestreaming, disabling AppData write permissions, GE patches, various DXVK builds, gamemode, esync/fsync and disabling desktop compositing all to no avail

Only thing I haven't tried is a custom kernel, but I really don't know if it'd be worth messing with to be honest.

Edit: Using Majaro KDE, AMD Ryzen 5 2600 and an RTX 2060

Sturmlocke86 commented 3 years ago

Has anyone been able to fix the periodic stutter? I've been playing BF4 for quite a while and amassed a hefty collection of compiled shaders, but still getting some stutters at just the wrong times in combat flushed lolol

I've tried -notexturestreaming, disabling AppData write permissions, GE patches, various DXVK builds, gamemode, esync/fsync and disabling desktop compositing all to no avail

Only thing I haven't tried is a custom kernel, but I really don't know if it'd be worth messing with to be honest.

Hi there, I am still experiencing the stuttering on my Nvidia system, will test on my AMD RX 560 + i7 PC tonight.

A user on ProtonDB commented on the issue and suggests the following:

"Performance:Slight Performance Problems Stuttering, need to run at 200% scaling to keep gpu full to prevent stuttering."

Not sure what he means by that though, will try to test it and report back here asap.

Cheers, Sturm

nixRidge commented 3 years ago

"Performance:Slight Performance Problems Stuttering, need to run at 200% scaling to keep gpu Not sure what he means by that though, will try to test it and report back here asap.

Cheers, Sturm

They are referring to resolution scaling in the game's video settings. Although, my rig cannot run the game at 200% scaling in Windows to begin with so I'm a bit hesitant to try that 🤭 (That's effectively playing at 4k if you have a 1080p monitor)

That being said I could try messing with the CPU governor and/or telling the Nvidia driver you prefer maximum power. I'll edit this post after trying that later tonight. Edit: It is now later tonight, performance governor and max perf in the Nvidia driver didn't help sadly.

BETLOG commented 3 years ago

Interesting, after latest Wine update I can't get Origin working, and it simply hangs while trying to connect to some api server for eternity

I tried to force a proton version on bf3 and this happened. Delete the entire .....steam/steam/steamapps/compatdata/ and restart it from steam. https://steamcommunity.com/app/1238860/discussions/0/3061868384744675919/

BETLOG commented 3 years ago

The ping is fixed on Proton-GE 6.12.

Doesn't work with Proton 6.3-5 I just forced it as compatibility tool in steam and it still doesnt show my ping in this server (you get banned for being kicked 3 times, i'm 1/3 and trying to test if i will be kicked is making me nervous)

nixRidge commented 3 years ago

The ping is fixed on Proton-GE 6.12.

Doesn't work with Proton 6.3-5 I just forced it as compatibility tool in steam and it still doesnt show my ping in this server (you get banned for being kicked 3 times, i'm 1/3 and trying to test if i will be kicked is making me nervous)

Advice you to just find some empty low-slots server to test until you know it works 🤭

So when you say "you forced [it]", you mean you launched it with GE-12 right? Did you make sure it was set in Steam, restarted Steam and/or also set it in Battlefield 4's Steam properties?

Try killing all Wine processes before launching BF4 (not sure if this one will help with Proton, but as far as I can tell there's some Wine in there)

BETLOG commented 3 years ago

you launched it with GE-12 right?

I'm in the process of juggling that right now, but each time i have to destroy the compaddata/ folder and reinstall origin etc before i can even try... game just started, now to test.

Doesn't work with Proton 6.3-5

I was hoping the latest stock proton would have it fixed, so tried it before the GE... which so far appears to work as previously confirmed. Will try it on a pingnazi server now once i figure out how to copy my control settings over.

EDIT: double confirmed Proton-6.12-GE-1.tar.gz - WORKS. 2021-07-22--15-12-22_betlogbeast_FullscreenGeeqie

EDIT EDIT: and now i get kicked for 214/200 ping instead of no ping... yay?

KairanD commented 3 years ago

Hey there!

The issue with stuttering can be solved in Battlefield 4 as it can be solved in Battlefiled 1. Post processing effects are somehow confliting with Proton. In Battlefield 1, I've disabled motion blur and the other post processing effects in the "graphics" tab and set the post processing quality to low in the "advenced graphics" tab. In Battlefield 4, just setting the motion blur to 0% was enough. I'm playing both games really well on a Core i5 4670K, 16GB RAM and GTX 1070Ti after doing that. Everything is on ultra except for these options.

However, the no ping issue continues. I've tried the latest version of Proton (6.3.5), Proton Experimental, Proton-6.12-GE-1 and Proton-6.15-GE-2. Nothing changed (and, with Proton GE, the menu interface was a bit buggy). So, multiplayer is still broken for me :(

I'm using Debian 11 with GNOME 3.38.

KairanD commented 3 years ago

Just tried:

sudo setcap cap_net_raw+epi /home/kairand/.steam/root/compatibilitytools.d/Proton-6.15-GE-2/files/bin/wineserver sudo setcap cap_net_raw+epi /home/kairand/.steam/root/compatibilitytools.d/Proton-6.15-GE-2/files/bin/wine-preloader sudo setcap cap_net_raw+epi /home/kairand/.steam/root/compatibilitytools.d/Proton-6.15-GE-2/files/bin/wine64-preloader

My ping is still not showing up. :(

Probably something related to Debian?

ipkpjersi commented 3 years ago

Just played some Battlefield 4 on a few different servers, no lag or ping issues. I'm using Ubuntu 20.04 with ProtonGE 6.14-GE-2.

Here's some screenshots of a round of TDM, showing my ping and others ping: ![](https://i.imgur.com/Apl9kgX.png) ![](https://i.imgur.com/ywOxarB.png)
BETLOG commented 3 years ago

setcap cap_net_raw+epi

Not a fix, just a workaroud. https://github.com/GloriousEggroll/proton-ge-custom/releases

I'm surprised that the latest official proton doesn't work yet given that this patch code is available. Should be an easy way to tick a longstanding bug off the todo list.

KairanD commented 3 years ago

Just played some Battlefield 4 on a few different servers, no lag or ping issues. I'm using Ubuntu 20.04 with ProtonGE 6.14-GE-2. Here's some screenshots of a round of TDM, showing my ping and others ping:

Thanks for the info! So it seems like this issue is fixed on Ubuntu when using Proton GE.

I don't have lag issues and my ping shows up at the server selection menu. However, it's not appearing when I'm playing.

setcap cap_net_raw+epi

Not a fix, just a workaroud. https://github.com/GloriousEggroll/proton-ge-custom/releases

I'm surprised that the latest official proton doesn't work yet given that this patch code is available. Should be an easy way to tick a longstanding bug off the todo list.

I've already tried Proton-6.12-GE-1 and Proton-6.15-GE-2, with and without the setcap commands. Unfortunately, my ping is still not showing up. :(

I found this solution - the author mentioned Ubuntu -, but it seems risky: https://www.reddit.com/r/linux_gaming/comments/gc5qss/wine_and_ping_support_on_ubuntu_a_guide/. And, as it seems to be working on Ubuntu now, I'm trying to find out what Debian does differently, or if there's something wrong with my system.

A friend of mine also uses Debian and the GloriousEggroll build didn't solve his problem as well: https://plus.diolinux.com.br/t/battlefield-4-no-debian-11-usando-proton-ping-nao-aparece-nas-partidas/37782/2. It seems like something specific to Debian. And I don't have any idea why.

KairanD commented 2 years ago

I've reinstalled everything. Just tried the setcap commands again with many Proton versions. None worked. Same with ProtonGE.

This game is only partially playable on Debian. This fix doesn't work. :(

cdgriffith commented 2 years ago

Providing example of random stutter (ever 30-120s it seems)

https://user-images.githubusercontent.com/3275435/136723946-12757693-4947-461e-96db-05e6fe4ea6ef.mp4

It's showing it as CPU related for something, not sure how to gauge what's causing it. Have the ping fix, 125 resolution scaling (1440p 144hz screen so trying to keep it around 140fps) and also set Motion Blur to 0 as recommended. CPU hovers around 20-40% usage across all cores, none seem to spike.