Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Battlefield 4™ (1238860)

Open ipkpjersi opened this issue 4 years ago • 135 comments

Compatibility Report

  • Name of the game with compatibility issues: Battlefield 4™
  • Steam AppID of the game: 1238860

System Information

  • GPU: GTX 1070
  • Driver/LLVM version: NVIDIA 440.82
  • Kernel version: Linux 4.15.0-106-generic x86_64
  • Link to full system information report: Gist
  • Proton version: 5.0.9

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

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!

ipkpjersi avatar Jun 17 '20 01:06 ipkpjersi

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.

Xiretza avatar Jun 17 '20 07:06 Xiretza

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

ThaChillera avatar Jun 25 '20 22:06 ThaChillera

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.

ipkpjersi avatar Jun 26 '20 04:06 ipkpjersi

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.

toma678 avatar Jul 02 '20 17:07 toma678

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.

ipkpjersi avatar Jul 02 '20 17:07 ipkpjersi

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.

Cherser-s avatar Jul 28 '20 19:07 Cherser-s

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

warriormaster12 avatar Dec 13 '20 19:12 warriormaster12

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

Cherser-s avatar Dec 13 '20 20:12 Cherser-s

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

poperigby avatar Dec 13 '20 20:12 poperigby

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

fedebenelli avatar Dec 14 '20 01:12 fedebenelli

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 avatar Dec 27 '20 20:12 tunanachos

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.

tunanachos avatar Feb 15 '21 16:02 tunanachos

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 avatar Apr 22 '21 08:04 sigzegv

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.

sigzegv avatar Apr 22 '21 16:04 sigzegv

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

nowburp avatar May 08 '21 21:05 nowburp

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)

sigzegv avatar May 08 '21 21:05 sigzegv

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 ?

nowburp avatar May 08 '21 22:05 nowburp

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.

sigzegv avatar May 09 '21 14:05 sigzegv

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.

Cherser-s avatar May 20 '21 18:05 Cherser-s

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.

TheGreatestJannet avatar Jun 20 '21 18:06 TheGreatestJannet

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.

tunanachos avatar Jun 20 '21 21:06 tunanachos

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

GloriousEggroll avatar Jun 21 '21 08:06 GloriousEggroll

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" 😛

tunanachos avatar Jun 21 '21 11:06 tunanachos

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.

sigzegv avatar Jun 21 '21 12:06 sigzegv

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 avatar Jun 28 '21 19:06 Sturmlocke86

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

Sturmlocke86 avatar Jun 28 '21 20:06 Sturmlocke86

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.

Cherser-s avatar Jun 28 '21 20:06 Cherser-s

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!

Sturmlocke86 avatar Jul 02 '21 06:07 Sturmlocke86

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.

TheGreatestJannet avatar Jul 02 '21 09:07 TheGreatestJannet

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.

Xiretza avatar Jul 02 '21 13:07 Xiretza