Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Carmageddon: Max Damage (505170)

Open Morusec opened this issue 8 years ago • 36 comments

The game runs smoothly using wine staging at full details but I have a weird bug with the Proton 3.7-3 and beta versions.

As soon as I start gameplay, the fps drops at 3~5. Quitting the game session back to the main menu retuns to normal perfomance.

PROTON_NO_ESYNC=1 %command% seems to get me some extra frame

Gentoo Linux (64 bit 4.18.5) GeForce GTX 1080/PCIe/SSE2 (396.54) Proton 3.7-3 and Beta 3.7-4

This is my first ticket, let me know how I can bonify this ticket with precious information!

Morusec avatar Aug 29 '18 17:08 Morusec

Same for Carmageddon: Reincarnation too (but with even worse performance). Seems like a threading issue?

flukejones avatar Aug 30 '18 23:08 flukejones

FWIW, I traced the game on Windows, focusing on the "my garage" view. (I can't get apitrace to work in-game but there's a substantial fps drop when viewing a car, and even worse post-race when all cars are displayed):

On Windows I get a steady 125 fps. With Proton Beta 3.7-5 I get a whopping 13 fps with esync off. With esync on I get around 45 fps. However, replaying the apitrace with Wine and DXVK I average 130 fps, though I'm not sure if that's a good representation of dxvk performance given that apitrace runs the trace uncapped and the game stops at 125 fps.

Would be interesting to know what staging does different given that esync doesn't seem to be used by default.

Apitrace if anyone is interested: https://www.dropbox.com/s/ahi8h9i43gvul9c/carma_md_garage.trace.xz?dl=0

whizse avatar Sep 06 '18 18:09 whizse

I bisected the patches from staging and the winner is the nvapi patchset: nvapi-Stub_DLL.

Confirmed by applying the patchset to vanilla Wine. I have no idea why, or what happens given that the patches are mostly stubs. Maybe the game uses another render path when nvapi is detected?

whizse avatar Sep 08 '18 12:09 whizse

That's because there no need in working nvapi, stubs makes game stop making LoadLibrary("nvapi.dll"); every nvapi call. Fake AMD card should also help.

lieff avatar Sep 08 '18 13:09 lieff

That sounds plausible, but I tried spoofing an AMD card both with dxvk.conf and in config.cpp and I don't see any change in performance?

whizse avatar Sep 08 '18 19:09 whizse

This with already disabled nvapi.dll? With some games fake AMD should help more than disable nvapi, and with others - roughly same.

lieff avatar Sep 08 '18 19:09 lieff

No change with disabled nvapi.dll.

whizse avatar Sep 09 '18 10:09 whizse

I can't even get the game to run. I'm not alone: https://www.protondb.com/app/505170

The splash screen appears, I get the stainless logo fullscreen then the game crashes. I can't report to ProtonDB as it says

Validation Errors!Answer To What Game: Could not find game with App ID 505170. This can happen if it is either inaccurate or if it has: been removed from the Steam store, not listed as a 'game', or not available in your country.

Has anyone managed to get this game working well?

TRPB avatar May 23 '19 14:05 TRPB

Hello @TRPB, please add PROTON_LOG=1 %command% to the game's launch options and drag and drop the generated $HOME/steam-$APPID.log into the comment box. Also, please copy your system information from Steam (Steam -> Help -> System Information) and put it in a gist, then include a link to the gist in this issue report.

kisak-valve avatar May 23 '19 14:05 kisak-valve

https://gist.github.com/TRPB/82ed319170822742893ecd2a89e0bae3

And my system info:

Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  AuthenticAMD
    CPU Brand:  AMD Ryzen Threadripper 1950X 16-Core Processor 
    CPU Family:  0x17
    CPU Model:  0x1
    CPU Stepping:  0x1
    CPU Type:  0x0
    Speed:  3400 Mhz
    32 logical processors
    16 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Supported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    Linux (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.0.13-arch1-1-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12004000
    X Window Manager:  KWin
    Steam Runtime Version:  <Runtime disabled>

Video Card:
    Driver:  X.Org AMD Radeon VII (VEGA20, DRM 3.27.0, 5.0.13-arch1-1-ARCH, LLVM 8.0.0)
    Driver Version:  4.5 (Compatibility Profile) Mesa 19.0.4
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 59 Hz
    VendorID:  0x1002
    DeviceID:  0x66af
    Revision Not Detected
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  3840 x 2160
    Desktop Resolution: 7680 x 2160
    Primary Display Size: 20.51" x 11.54" (23.50" diag)
                                            52.1cm x 29.3cm (59.7cm diag)
    Primary VRAM: 16368 MB

Sound card:
    Audio device: Realtek ALC1220

Memory:
    RAM:  64341 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_GB.UTF-8
    Total Hard Disk Space Available:  468083 Mb
    Largest Free Hard Disk Block:  200206 Mb
    VR Headset: None detected

Recent Failure Reports:

TRPB avatar May 23 '19 14:05 TRPB

Possible line of interest from the log: fixme:process:GetNumaHighestNodeNumber (0x6a3fc74): semi-stub

Random guess, does adding PROTON_FORCE_LARGE_ADDRESS_AWARE=1 %command% to the game's launch options have an effect?

kisak-valve avatar May 23 '19 14:05 kisak-valve

Same problem. It shows the splash screen (with the desktop), goes fullscreen and shows the Stainless Games intro movie, then crashes to desktop.

Log file with PROTON_FORCE_LARGE_ADDRESS_AWARE=1:

steam-505170.log

TRPB avatar May 23 '19 15:05 TRPB

I don't know if there's any relation but I also have a AMD Ryzen Threadripper 1950X 16-Core Processor.

System Information

Computer Information: Manufacturer: Unknown Model: Unknown Form Factor: Desktop No Touch Input Detected

Processor Information: CPU Vendor: AuthenticAMD CPU Brand: AMD Ryzen Threadripper 1950X 16-Core Processor CPU Family: 0x17 CPU Model: 0x1 CPU Stepping: 0x1 CPU Type: 0x0 Speed: 4000 Mhz 32 logical processors 16 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported

Operating System Version: "Gentoo Base System release 2.6" (64 bit) Kernel Name: Linux Kernel Version: 5.1.6-gentoo X Server Vendor: The X.Org Foundation X Server Release: 12005000 X Window Manager: Xfwm4 Steam Runtime Version: jenkins-steam-runtime-beta-release_0.20190320.2

Video Card: Driver: NVIDIA Corporation GeForce GTX 1080/PCIe/SSE2 Driver Version: 4.6.0 NVIDIA 430.26 OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 59 Hz VendorID: 0x10de DeviceID: 0x1b80 Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 3440 x 1440 Desktop Resolution: 5360 x 1440 Primary Display Size: 31.50" x 13.19" (34.13" diag) 80.0cm x 33.5cm (86.7cm diag) Primary Bus: PCI Express 16x Primary VRAM: 8192 MB Supported MSAA Modes: 2x 4x 8x 16x

Sound card: Audio device: Realtek Generic

Memory: RAM: 64368 Mb

Miscellaneous: UI Language: English LANG: en_US.utf8 Total Hard Disk Space Available: 479190 Mb Largest Free Hard Disk Block: 18311 Mb VR Headset: None detected

Recent Failure Reports:

This is still unplayable for me. Over 200 fps at start, down to ~10fps ingame and back to 200+ fps in menus.

Here is my proton log. steam-505170.log

Morusec avatar Jul 10 '19 16:07 Morusec

While that may contribute to it, I am seeing a different problem as I can't even past the first loading screen. Looking at ProtonDB it appears to be an AMD/nVidia thing. AMD gpus crash after the loading screen and nvidia GPUs can launch the game but with very poor performance.

So much for the kickstarter I donated to 7 years ago which promised linux support...

TRPB avatar Jul 10 '19 16:07 TRPB

I don't have the time to help narrow this down, but I recently tried this game again, but using Proton-4.19-GE-1 and it works very very well, I could play at full speed (didn't get FPS sorry, but rest assured it was buttery smooth) at max settings on my RTX2060 powered laptop.

Edit: also to confirm and clarify, tried again with Steam provided Proton without changing game settings, and it reduces to a slideshow of what feels like 1 frame every 2-3 seconds.

flukejones avatar Nov 14 '19 19:11 flukejones

Still doesn't work on AMD. It launches and crashes to the desktop.

TRPB avatar Nov 16 '19 15:11 TRPB

Well, it was a Threadripper issue for me!

I had to lock the process to the first 4 'node 0 cpus' using this launcher option: taskset -c 0-3 %command%

My NUMA config was loooking like this:

numactl -H
available: 1 nodes (0)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
node 0 size: 64269 MB
node 0 free: 49081 MB
node distances:
node   0 
  0:  10

I got about 40-70 fps with vanilla Proton but got a steady 124.9 fps using Proton 4.19-GE-1

Morusec avatar Nov 19 '19 05:11 Morusec

Thanks for the suggestion. That gets me further, I can now get to the menu and start a game but it crashes to desktop about 80% into the loading screen when starting a level.

TRPB avatar Nov 19 '19 13:11 TRPB

Here's the log file. I can't see anything in here that causes the crash other than the repeated

 2741.503:002b:002c:err:nvapi:NvAPI_D3D11_SetDepthBoundsTest Failed to get wined3d device handle!

The crash seems to be here:

 terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

but I'm not sure that gives us any real clues. steam-505170.log

My NUMA settings are different, I have two nodes (this seems better in a lot of games):

numactl -H
available: 2 nodes (0-1)
node 0 cpus: 0 1 2 3 4 5 6 7 16 17 18 19 20 21 22 23
node 0 size: 32119 MB
node 0 free: 20765 MB
node 1 cpus: 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31
node 1 size: 32218 MB
node 1 free: 24701 MB
node distances:
node   0   1 
  0:  10  16 
  1:  16  10 

And I also tried setting the launch option:

PROTON_LOG=1 numactl --membind=0 --cpunodebind=0  %command%

This works as much as taskset, it gets past the intro screen into the game's loading screen after selecting a level. It still crashes to desktop at that point though. I had hoped the membind option would fix it because of the bad_alloc error above.

EDIT: tried switching NUMA mode to only have one channel but I get the same result, crash to desktop right before entering the level.

Also tried graphics options on lowest and ultra to see if it's a graphic option that causes it. Both have the same result.

TRPB avatar Nov 19 '19 16:11 TRPB

Been testing this lately and even with 1080TI and proton5.13 the performance is still pretty bad with BEST PERFORMANCE setting. FPS is between 20-60fps depending on situation.

Not sure what the fix would be.

Using proton-tkg-5.19 seemed to help performance a bit, but the game abruptly ctd after a minute of playing.

I suggest people try proton-ge and tkg builds and see if they get the same result or not, just to see if proton in general can be made to work better for this game.

jarrard avatar Oct 27 '20 06:10 jarrard