doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.1k stars 842 forks source link

BeamNG Drive very poor performance #1948

Closed rado84-github closed 1 year ago

rado84-github commented 3 years ago

BeamNG Drive is running very poorly with D3D11 x64 (DXVK 1.8 and 1.7.3). The attached screenshots show what the game looks like in freeroam. For whatever reason apitrace isn't working with this game. Maybe someone else will have more luck with it. When I run the game with the apitrace dll, it freezes in the main menu and eventually closes itself without creating the necessary files. First it shows the car floating in the air, a few seconds later the basic road texture appears and about a minute later the rest of the texture appears. Sometimes the game also freezes for like 2 minutes and then the textures appear.

This is my hardware: GTX 1660 Ti 6GB, Core i7-4770, 32 GB DDR3 RAM. Arch Linux.

Picture_created_26-02-2021_17-58-55 Picture_created_26-02-2021_17-58-59

doitsujin commented 3 years ago

and this works better with wined3d?

This sounds more like an I/O problem rather than a graphics problem.

HunterCZ122 commented 3 years ago

Can't reproduce on Proton Experimental with M.2 NVMe SSD, it loads instantly with compiled shaders. This is definitely I/O problem.

rado84-github commented 3 years ago

IDK what I/O is, so how do you suggest I fix that?

mozo78 commented 3 years ago

Input/Output operations.

doitsujin commented 3 years ago

IDK what I/O is, so how do you suggest I fix that?

Install the game on something faster than a punch card, essentially.

rado84-github commented 3 years ago

IDK what I/O is, so how do you suggest I fix that?

Install the game on something faster than a punch card, essentially.

So you're saying that an SSD with 600+ MB read and write speed is slow and so is this hardware?

CPU: Intel Core i7-4770 @ 8x 3.4 GHz [30.0°C] GPU: GeForce GTX 1660 Ti RAM: 32032MiB @ 1600 Mhz

HunterCZ122 commented 3 years ago

Do you have esync or fsync enabled? BeamNG.drive is really CPU heavy game, and without esync, it runs poorly.

rado84-github commented 3 years ago

Do you have esync or fsync enabled? BeamNG.drive is really CPU heavy game, and without esync, it runs poorly. It IS enabled:

[rado@arch]: ~>$ ulimit -n
1048576
Blisto91 commented 2 years ago

@rado84-github Friendly ping. Are you still experiencing this issue? :slightly_smiling_face:

rado84-github commented 2 years ago

@rado84-github Friendly ping. Are you still experiencing this issue? slightly_smiling_face

IDK, I'll download it again and try it. Not long ago I discovered some games run poorly with pure DXVK but they run flawlessly with DXVK-ASYNC, so I'll have to redownload it and try again.

Blisto91 commented 2 years ago

Thanks 👍

If by run poorly you mean shader stutter when you first load up or encounter new stuff in games then that is not a bug. Async can kinda work around it so it isn't as noticeable as in main dxvk. There is some work ongoing in main dxvk master to hopefully solve, or at least improve, this for alot of games (depends on what the game or it's engine does) 🙂

rado84-github commented 2 years ago

Thanks +1

If by run poorly you mean shader stutter when you first load up or encounter new stuff in games then that is not a bug. Async can kinda work around it so it isn't as noticeable as in main dxvk. There is some work ongoing in main dxvk master to hopefully solve, or at least improve, this for alot of games (depends on what the game or it's engine does) slightly_smiling_face

General stuttering, shadows flickering (Titan Quest). Esp. Titan Quest. With the regular DXVK it's virtually unplayable bc it won't make more than 10 FPS. With DXVK-ASYNC it runs almost perfectly. There's still some stuttering but at least no flickering to make you cross-eyed.

Blisto91 commented 2 years ago

Hmm odd 🤔

HunterCZ122 commented 2 years ago

@rado84-github If you have NVIDIA GPU, you can try installing Vulkan dev drivers (nvidia-all for example) and switch Proton Experimental beta branch to bleeding-edge. Recent DXVK from master has some big changes when comes to shader stutter and other things. Besides the game works well and loads really fast with recent DXVK without any stutter, except for the black textures, which is not a DXVK issue (see here) Screenshot_20220808_122431

Experimental Linux native version also works okay-ish (crashes a lot right now) and doesn't have the problem with black textures Screenshot_20220808_123454

Be aware that Vulkan dev drivers can have some regressions.

rado84-github commented 2 years ago

I'll try with vulkan dev drivers. As for the black textures, I know that it's not a DXVK issue. It's a lazy game developer who didn't click "Generate mipmaps" when making the textures. That's a common issue in mods for ETS2 bc the most people make their mods for Windows only.

rado84-github commented 2 years ago

OK, so here's how it is now. DXVK: Textures need 2 minutes to load but after that the game runs somewhat fine, if not counting the black triangle sticking up from the truck. DXVK-ASYNC: Textures load about 5 times faster and the general frame rate is better (IDK the exact values bc dxvk.conf doesn't seem to be working in any game anymore). However the up arrow and down arrow keys (accelerate, brakes) have a huge lag, like 5000 ms or more.

@HunterCZ122 , I'm having trouble running any non-steam game with Proton, even when imported to Steam. And I don't pay for a game if I haven't tried it cracked first. If I like it, then I'll buy it. Since I still can't test the game well enough to see if I like it, it's still cracked which means no Proton for the moment.

rado84-github commented 2 years ago

I found a way to seriously improve game performance - by adding export DXVK_LOG_LEVEL=none to ~./bash_profile. However, one problem remained that I can't find a fix for - that black triangle that sticks up from the truck while driving. I made a video about it: simplescreenrecorder-2022-08-13_01.51.45.mkv https://www71.zippyshare.com/v/ANMhJK8c/file.html

Also, for unknown reasons the game refuses to run in fullscreen. Setting it up to fullscreen in game settings freezes the game and alt+enter doesn't work as it should. Pressing this combination sets the game to fullscreen for about half a second, then it goes back to windowed mode.

Blisto91 commented 1 year ago

@rado84-github Could i get you to try this again? Hopefully all the latest dxvk and related work have improved your issue

rado84-github commented 1 year ago

Not long ago I bought the game on Steam and while the performance was great with Proton Experimental, the game (both the native Linux and Windows versions) didn't let me drive with the keys that I wanted (it kept saying things like "this key is reserved"), so I requested a refund from Steam and gave up on that game for good. So, yes, the performance is OK, but since I can't drive with the keys I'm accustomed to, there was no point in keeping the game. The age of "reserved" keys when Right Shift/Control and KP_Num0/Num1 were forbidden to use is long gone and I had no intention of going back to that age. Ever since I can remember myself I've always been driving racing games with these keys: Right Shift/Control - Shift Up/Down, the arrows to steer, KP_Num0 for handbrake, KP_Num1 for "look back" and Space for "reset car".