Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kingdom Come crash/freeze/PC lockup. Hardware or DXVK related? #269

Closed
jarrard opened this issue Apr 11, 2018 · 34 comments
Closed

Kingdom Come crash/freeze/PC lockup. Hardware or DXVK related? #269

jarrard opened this issue Apr 11, 2018 · 34 comments

Comments

@jarrard
Copy link

jarrard commented Apr 11, 2018

Wanting to post this issue to get feedback from other KCD users, basically this game runs pretty good, EXCEPT there have been issues on load screens going into infinite loading or freezing.

I have had a issue where the BAR cutscene freezes the game or my PC (only hard reboot possible), often it is just a blank screen as game prepares for the loading screen, I don't believe I have ever got to this loading screen. (at start of game)

I don't know whats going on here or if its a videocard or Ryzen 1600 related issue (C6 disabled). But it would be great if other KCD users could report their experiences with this game and if they have had odd freezes like this happen.

I'm thinking of doing some testing under Windows to see if DXVK is more stable in that situation, if it is then perhaps CPU or GPU thermal related issue? I will get some log files sorted out also, but when the system freezes there may be nothing logged.

Software information

Kingdom Come Deliverance, Medium settings, no FSAA or Blur

System information

  • GPU: 1080ti
  • Driver: 390.48 & 396.24
  • Wine version: 3.5 Staging & 3.7/3.8 Stagings
  • DXVK version: 0.41 - 0.50+
  • Ubuntu Maui Kernel 4.15 & Manjaro MATE/KDE
  • Ryzen 1600 CPU with C6 state disabled (otherwise it just crashes non stop)

Apitrace file(s)

The bar scene is at the end, I quit the game once I confirmed the cut scene was rendering.

Log files

@volca02
Copy link

volca02 commented Apr 11, 2018

Can't comment on KC:D, but with NVidia I get high FPS related freezes on Witcher 3. Frame limitting to 60 FPS solves the issue pretty much completely for me - maybe it is FPS related in KC:D as well? What FPS is the loading screen before it freezes?

@jarrard
Copy link
Author

jarrard commented Apr 11, 2018

That could be the issue, I believe the loading screens can reach 122fps

@jarrard
Copy link
Author

jarrard commented Apr 11, 2018

Ok I did some more testing with FPS set to 60, which doesn't seem to work for loading screens. However setting vsync on does limit loading screens to 60fps.

This did not resolve the issue with it crashing on the starter game bar scene where some people are having a discussion around the table, well that's what should happen.

I did discover that the system isn't actually freezing, only the backbuffer or drawscreen whatever it is, is. I can Ctrl-F1 and login and reboot system in the blind. The screen is frozen on whatever KCD had up, in this case it was the initial blackscreen before the load icon appearance.

SO, there seems to be some sort of issue with DXVK crashing at this point, its very easy to test, just start a new game, after talking to your mother, go down to the town centre and head straight to the tavern, the cut scene will automatically trigger and this screen freeze will occur.

Maybe it doesn't happen on other nvidia driver versions, or perhaps AMD cards are immune to this type of issue in KCD. More feedback needed. Again, no logs appear to be generated, I will look into that.

PS. e_VolumetricFog = 1 I believe causes flickering black squares on the screen.

@jarrard
Copy link
Author

jarrard commented Apr 11, 2018

Added some log files, not sure how informative they are, I just left DXVK as default logging which seems to have most the modes turned on?

In these logs I these addition configurations set in the user.cfg (+exec user.cfg)

e_VolumetricFog = 1 (This is what I think causes the black squares on screen)

(The below are just tweaks to the ambient occlusion so it looks a bit better, I'd be surprised if that has a negative effect since the feature is enabled with or without these adjustments).
r_ssdo=1
r_ssdoAmountAmbient=1.42
r_ssdoAmountDirect=2
r_ssdoAmountReflection=2
r_ssdoHalfRes=2
r_ssdoRadius=0.1
r_ssdoRadiusMin=0.1
r_ssdoRadiusMax=0.1
e_svoTI_SSAOAmount=1.4
e_svoTI_SpecularAmplifier = 0.82
e_svoTI_DiffuseBias = -0.011
e_svoTI_TemporalFilteringBase = 1

You can turn features on/off in-game to test, unfortunately I was unable to open the drop down console for some reason, could be that my tilde key is hidden behind a ALT function.

@xpander69
Copy link
Contributor

if you have a laptop/other pc and ssh running you can log into your machine to check logs like dmesg and stuff like that. i have used it few times to see that the driver crashed.

@jarrard
Copy link
Author

jarrard commented Apr 11, 2018

I do have a laptop, might attempt that sometime. Not something I have really done before so it will be a NOOB experience. Ultimately it be nice if other KCD owners chimed in about this issue but atm it seems very few have the game.

@xpander69
Copy link
Contributor

i will try to find time to test this also. haven't tried with the last patch, but it was working fine before.

@jarrard
Copy link
Author

jarrard commented Apr 11, 2018

Yes thought keep in mind the game appears to work fine (minus those black sq from efog) until you explore around and experience the bar talk cutscene, which does it every time for me.

I can wander around forever and get into fights and even talk with father etc... and no issue, it just happens at that initialisation of the cut scene at the tavern. It's one of those issues people can easily miss if they don't truly spend time to play the actual game.

@doitsujin doitsujin added the bug label Apr 12, 2018
@doitsujin
Copy link
Owner

Works for me, but if you are getting a GPU hang there must be something wrong.

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

Maybe fullscreen 4k has something to do with it, might do some window mode 1080p tests, and also test with playonlinux (using Lutris atm).

@xpander69
Copy link
Contributor

xpander69 commented Apr 12, 2018

Confirming this issue. on 1440p high settings GTX 1070 396.18 drivers with old compiler enabled

this is what i get when i ssh into the machine and look for dmesg:

[145447.467231] NVRM: GPU at PCI:0000:0a:00: GPU-617b1efe-512a-6598-6182-ba598a019f69 [145447.467233] NVRM: GPU Board Serial Number: [145447.467236] NVRM: Xid (PCI:0000:0a:00): 69, Class Error: ChId 004b, Class 0000902d, Offset 00000250, Data 000002ff, ErrorCode 0000000c

looks like driver crash?

at least pc doesnt freeze as i can kill the process from ssh with the command:
pkill KingdomCome.exe

everything returns to normal then

edit:
with new compiler enabled i get just black screen with music playing, can't even enter the game

logs with new compiler:
KingdomCome_dxgi.log
KingdomCome_d3d11.log

@xpander69
Copy link
Contributor

xpander69 commented Apr 12, 2018

Ok a little more digging. seems black screen happens when debug layers are enabled, doesnt matter if new or old compiler.

game starts fine with new compiler also just 2x slower perf and still freezes with music playing when going into tavern, same dmesg output

also forgot to mention dxvk 654e9e6

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

Pretty sure I have tested it with debug layers disabled. But I haven't tried a newer DXVK build, just being using the general pre-compiled ones people have provided. Guess I should setup the compiling stuff at some point. Tomorrow maybe.

@xpander69
Copy link
Contributor

my english to describe things sucks, so i try better :)

debug layers enabled:
__GL_NextGenCompiler=0 black screen after initial videos when launching the game, menu music playing
__GL_NextGenCompiler=1 black screen after initial videos when launching the game, menu music playing

debug layers disabled:
__GL_NextGenCompiler=0 goes into game - fps ~50 - black screen entering tavern, freezes, music still playing
__GL_NextGenCompiler=1 goes into game - fps ~25 - black screen entering tavern, freezes, music still playing

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

390.48 does not have the new compiler which is what I use. I generally don't use BETA drivers.

@xpander69
Copy link
Contributor

yeah so if i use __GL_NextGenCompiler=0 on the new driver its the same as with 390.48.

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

But you can't get past that initial tavern scene also I assume?

@xpander69
Copy link
Contributor

thats what i wrote yeah

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

doitsujin says he can, perhaps he has AMD hardware? or a much older driver or something.

@xpander69
Copy link
Contributor

xpander69 commented Apr 12, 2018

he has AMD afaik yeah.
Need someone else to get this confirmed also. We both have Ryzen CPU's might be this is doing something to the nvidia driver why it locks up. someone with Intel CPU should test this also

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

Well I had to disable C6 state because it was causing constant lockups. Its a Ryzen bug that you can RMA the CPU to get resolve but I can't afford 3months without the CPU. Easier to disable it.

My Ryzen CPU has not given me any issues with other intensive games and such so I'd be surprised if there is a CPU segfault happening, worth looking for I guess.

@xpander69
Copy link
Contributor

Its going offtopic but i have a Launch day ryzen 1700X, week 7 to be exact. and im just fine with C6 enabled also since kernel 4.15, before that i had random lockups when idle. I dont seem to have the segfault issue also, i ran ryzen-kill.sh 2 times 4 hours in row and no segfault, though some suggest it might still happen when you run longer, anyway its quite un-realistical load for me anyway to worry about. But ryzen cpu's can behave weird with some game engines + wine combination, 1 good example is dunia engine games (Farcry 3, 4 and primal) where fps is locked down to 20 with ryzen no matter the settings, but once you disable half of the cores then the framerate is 3x up

@jarrard
Copy link
Author

jarrard commented Apr 12, 2018

I say its something to do with DXVK and NVIDIA drivers, some bug, because it happens consistently at that specific tavern scene (likely also other scenes if we could ever get to them).

@ghost
Copy link

ghost commented Apr 14, 2018

Just trying KC:D with just released DXVK 0.42. I'm not sure what tavern scene are you guys talking about, but what happens to me is very often when I fast travel or go to sleep game just freezes and terminal is spamming

info: DxgiVkPresenter: Recreating swap chain:
Format: VK_FORMAT_B8G8R8A8_UNORM
Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
Buffer size: 1920x1080
err: DxvkSwapchain::recreateSwapchain: Failed to recreate swap chain

It makes the game absolutely unplayable because of the way saving in KC:D works. Otherwise the games runs "kinda" smoothly 30-40 fps, in more populated areas sometimes drops to 15-25. And it's a dope, can't wait to play it 😃

Mint 18.3 Cinnamon, Wine 3.6, Nvidia GTX 960 - 390 driver, AMD A8 7600, Linux 4.13-ubuntu

@doitsujin
Copy link
Owner

doitsujin commented Apr 14, 2018

Can't reproduce, sleeping and fast travel work fine on RADV. The swap chain issues seem to be a common thing on Nvidia (see #277), but please don't ask me what's causing those, I have no idea.

@jarrard
Copy link
Author

jarrard commented Apr 15, 2018

Yeah the introduction area tavern scene which has the 3 guys arguing about political stuff seems to affect NVIDIA users only. I have not tested past that point so I can't really be sure what happens when you sleep and save on NVIDIA cards.

@ghost
Copy link

ghost commented Apr 15, 2018

Oh, this scene! Well it didn't crash for me. Does it crash with certain dialog choices there?

@xpander69
Copy link
Contributor

for me it crashes right when i go near the tavern, loading screen coming up, i think there should be some "cinematic" or free camera stuff coming up? no idea, i can't even get to the point where it shows the tavern from inside, so i am unable to get pass that to do some further testing

@jarrard
Copy link
Author

jarrard commented Apr 15, 2018

yeah same as xpander69, could be a glitch for 10 series cards on 390.48+ driver.

@jarrard
Copy link
Author

jarrard commented Apr 24, 2018

I have since moved to a Arch based distro (manjaro) running a MATE desktop (kde/kwin has issues with NVIDIA cards) and compiled dxvk 0.42 from master manually and the same issue occurs.

I have 396.18 Nvidia drivers with the new compiler disabled along with wine 3.6 staging (pba patched version). Bit of a shame it wasn't some sort of configuration issue, this seems to be a serious problem for at least 10 series nvidia cards atm.

Hope a solution is found eventually.

@saboya
Copy link

saboya commented Apr 25, 2018

Current master has A LOT of differences from 0.42, so I think you should try with the latest commit first to ensure this is still an issue.

@jarrard
Copy link
Author

jarrard commented Apr 25, 2018

I think I did downloaded the master and not 0.42

@jarrard
Copy link
Author

jarrard commented May 15, 2018

I DID IT! I got a trace out of builtin wine, I loaded up a save file before the tavern and walked through and the cutscene worked, although it was around 1 frame per 3 seconds LMAO

Now the trace file is 25.2GB, ... appears 7z will compress it to 3.3gb, alrighty then...

UPDATE: apitrace file added to original post.

@jarrard
Copy link
Author

jarrard commented Jun 27, 2018

The crashing issue no longer happens for me with 0.60+ and Wine3.11Staging.

If I could get one other NVIDIA user to confirm that the game passes the first BAR cut-scene at the start village (just walk under the archway into seating area) then I will close this issue.

PS. With my 1080ti and Medium settings at 4k with BLUR and SMAA disabled, I get 37fps. Not very amazing but then again it is a very taxing game.

PS2. With some optimization mods and custom user.cfg file I was able to get 40-51fps at 4k, yay!

EDIT: Marking as resolved, if this issue happens still for you with latest wine dxvk and drivers then let us know.

@jarrard jarrard closed this as completed Jun 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants