flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.33k stars 278 forks source link

Getting NVIDIA Xid error on Skyrim Special Edition when 'gpu_timing' is enabled #44

Closed guihkx closed 4 years ago

guihkx commented 4 years ago

My info:

CPU: Intel i5 3570k GPU: NVIDIA GTX 660 RAM: 8 GB

Software:

NVIDIA Driver: 440.59 MangoHud: v0.2.0 Runtime: Flatpak Steam: Beta Update (Feb 18, 2020) Proton: 5.0-2

Launch options for Skyrim Special Edition:

PROTON_LOG=1 MANGOHUD=1 MANGOHUD_CONFIG=gpu_timing WINEDLLOVERRIDES="xaudio2_7=n,b" %command%

This is the Xid message that pops up in dmesg after you click the PLAY button in the game's launcher:

[ 3252.896909] NVRM: Xid (PCI:0000:01:00): 32, pid=16176, Channel ID 00000055 intr1 00000008 HCE_DBG0 00000110 HCE_DBG1 00000000

This crash also occurs if I set MANGOHUD_CONFIG=full instead, but after narrowing them down, I found out that the option crashing the game is gpu_timing.

The proton log file shows the following message too, which is probably the root cause:

[...]
Command buffer submitted multiple times before present.
This could lead to invalid data.
[...]

Full log file: steam-489830.log

gasinvein commented 4 years ago

I guess this might be not specific to Skyrim SE but to DXVK in general.

guihkx commented 4 years ago

FWIW, I've tried reproducing this on Terraria, GTA:SA and Volcanoids (native Vulkan), but this crash only occurred on Skyrim SE (actually not true, read my post below).

gasinvein commented 4 years ago

I was able to reproduce it at least with Unigine Superposition benchmark.

guihkx commented 4 years ago

Yeah, actually, I take that back.

I don't know why it was working before, but I just tested with GTA:SA and Terraria and I get the same Xid error.

Oddly enough, Terraria still launches and works, though.

And Volcanoids (Linux native) works fine (needs -force-vulkan).

gasinvein commented 4 years ago

Yes, both native Vulkan and DX12 via libvkd3d work fine for me, but DX9-11 via DXVK has the issue.

gasinvein commented 4 years ago

Something very strange going on here. If I enable all the options listed in the readme, namely cpu_temp, gpu_temp, core_load, ram and vram, everything works fine. But if I enable full HUD (it should do the same, right?) - the app hangs and this NVRM: Xid ... error appears.

guihkx commented 4 years ago

I thought of that too. But when you use MANGOHUD_CONFIG=full, it also enables some other options other than cpu_temp,gpu_temp,core_load,ram,vram. They just happen to be undocumented as of now. That's how I discovered gpu_timing.

RSerejo commented 4 years ago

AMDGPU HD7000 series - Mesa Drive 20.1 is not showing GPU usage, keeping like 0%.

guihkx commented 4 years ago

@todoexelent I believe your issue is not related to this one. Perhaps related to #7.

gasinvein commented 4 years ago

@guihkx What gpu_timing should do? AFAICT, the HUD looks exactly the same with either all listed above options set manually, or with full option (where it works).

guihkx commented 4 years ago

I have no idea since I don't know anything about this graphics stuff...

You could guess by searching for references of that option, though:

https://github.com/flightlessmango/MangoHud/blob/v0.2.0/src/overlay.cpp#L1250-L1251

https://github.com/flightlessmango/MangoHud/blob/v0.2.0/src/overlay.cpp#L2208-L2210

https://github.com/flightlessmango/MangoHud/blob/v0.2.0/src/overlay.cpp#L2394-L2405

Maybe a dev can answer that.

jackun commented 4 years ago

Did you build from master or still on 0.2.0? You probably want frame_timing anyway.

AFAICT, the HUD looks exactly the same with either all listed ...

HUD doesn't expand currently to show it. Eh, not shown at all currently.

gasinvein commented 4 years ago

@jackun Just tried build from master - the issue is still present.

jackun commented 4 years ago

Strange. I would think it would crash even without gpu_timing because the only thing it does is write timestamps to command buffer :thinking:

Force disabling for now.

gasinvein commented 4 years ago

At least for me it doesn't crash, it hangs, so I have to kill the wine processes. Tried all options listed in the readme - seems like only either gpu_timing or full causes this.

guihkx commented 4 years ago

Yes, the process hangs for me too. I have to alt+tab and SIGKILL the .exe process of the game.