Libnvidia-glcore.so crashes when alt-tabbing into Cyberpunk 2077

GPU: RTX 3070
Driver version: 545.29.06
OS: Debian Testing

Steps:

  1. Play Cyberpunk 2077 for a bit (on Steam via Proton Experimental).
  2. Alt-tab out of the game.
  3. Alt-tab back into the game.

The game crashes. May have to repeat steps 2 and 3. I find it hard to reproduce after immediately launching the game - you really have to play the game for a bit (last time what helped for me was getting into a fight).

NVIDIA bug report log: nvidia-bug-report.log.gz (1.1 MB)

Proton log: steam-1091500.log (7.6 MB)

Relevant-looking excerpts from the Proton log:

17234.188:0138:0248:warn:seh:handle_syscall_fault backtrace: --- Exception 0xc0000005 at 0x7f42f88fd3aa: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libnvidia-glcore.so.545.29.06 + 0xcfd3aa.
Assertion failed: !status, file ../src-wine/dlls/winevulkan/loader.c, line 645

To me this looks like a call to vkCreateSwapchainKHR from WINE/Proton fails due to an access violation crash in the NVIDIA driver. The code can be found at wine/dlls/winevulkan/loader.c at 6252c5362851f4091fb6f9c40c1f116f97c94235 · ValveSoftware/wine · GitHub

17234.188:0138:0248:warn:seh:handle_syscall_fault backtrace: --- Exception 0xc0000005 at 0x7f42f88fd3aa: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libnvidia-glcore.so.545.29.06 + 0xcfd3aa.
17234.189:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f42f890267e: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libnvidia-glcore.so.545.29.06 + 0xd0267e.
17234.189:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f42f8903874: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libnvidia-glcore.so.545.29.06 + 0xd03874.
17234.189:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f42f8936618: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libnvidia-glcore.so.545.29.06 + 0xd36618.
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f4301b73cf0: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libGLX_nvidia.so.0 + 0x9ccf0.
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f43030d523a: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libvulkan.so.1 + 0x4023a.
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f4301941290: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/04/steamoverlayvulkanlayer.so + 0x27290 (vkCreateSwapchainKHR + 0x200).
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f4308e728b0: /tmp/pressure-vessel-libs-1V2KI2/lib/x86_64-linux-gnu/libMangoHud.so + 0x728b0.
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f430317bb9d: /home/miro/.steam/debian-installation/steamapps/common/Proton - Experimental/files/lib64/wine/x86_64-unix/winex11.so + 0x49b9d.
17234.190:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f43023d9eee: /home/miro/.steam/debian-installation/steamapps/common/Proton - Experimental/files/lib64/wine/x86_64-unix/winevulkan.so + 0x22eee.
17234.192:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f43023e749d: /home/miro/.steam/debian-installation/steamapps/common/Proton - Experimental/files/lib64/wine/x86_64-unix/winevulkan.so + 0x3049d.
17234.192:0138:0248:warn:seh:dwarf_virtual_unwind backtrace: 0x7f4306f202eb: /home/miro/.steam/debian-installation/steamapps/common/Proton - Experimental/files/bin/../lib64/wine/x86_64-unix/ntdll.so + 0x4c2eb.

From the Proton/WINE log, I was able to piece together the above callstack. Hopefully it helps. Looks like the driver dereferences a null pointer.

Also, something I forgot to mention is that I am using MangoHUD, however I can also reproduce the problem without it.