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

STALKER.2: Heart of Chornobyl || CTD after 1-30mins (Resolved in master) #1633

Closed
3 of 6 tasks
jarrard opened this issue Nov 22, 2024 · 24 comments
Closed
3 of 6 tasks

Comments

@jarrard
Copy link

jarrard commented Nov 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

Game plays but will randomly crash anywhere between 1mins to ~30mins of play.

Determined this is directly related to Gamescope and WSI.

HDR is being used.

Issue does not occur when gamescope is NOT used.

Steps To Reproduce

  1. My current gamescope line. (I've tried many options here, this is just what I have left)
    -H 2160 --expose-wayland --hdr-enabled --adaptive-sync --force-grab-cursor -f -- %command%

DXVK_HDR is enabled, I've tried with several other variables on and off, pretty much everything and the kitchen sink has been tried including suggestions from the issue github.

I did read somewhere that Plasma6.2 could be at fault? I do not know.

My testing continues.

Hardware information

- Distro: EndeavourOS
- CPU: AMD Ryzen 7800X3D
- GPU: ASUS NVIDIA 4090
- Driver Version: 565.57.01
- Kernel Version: 6.12

Software information

- Desktop environment: Plasma
- Session type: Wayland
- Gamescope version: 3.14.22+ and 3.15.13 tried.
- Gamescope launch command(s):

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

The log has a lot in it. But the below segment appears to be the actual crash point

S2-crashlog2-hdr-gs-steam-1643320.zip

17843.755:0130:020c:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
17843.756:0130:020c:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
17843.756:0130:020c:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 889260000 <= 889260000.
17843.856:0130:020c:warn:vkd3d-proton:d3d12_resource_QueryInterface: {aec22fb8-76f3-4639-9be0-28eb43a67a2e} not implemented, returning E_NOINTERFACE.
warning: queue 0x768b88099fa0 destroyed while proxies still attached:
  wp_presentation_feedback#3030 still attached
[Gamescope WSI] getWindowRect: xcb_get_geometry failed for window 0x120005b.
[Gamescope WSI] getLargestObscuringWindowSize: xcb_query_tree failed for window 0x120005b.
[Gamescope WSI] getToplevelWindow: xcb_query_tree failed for window 0x120005b.
[Gamescope WSI] canBypassXWayland: failed to get window info for window 0x120005b.
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
XIO:  fatal IO error 110 (Connection timed out) on X server ":2"
      after 1666 requests (1666 known processed) with 0 events remaining.
17843.931:00c8:00d0:trace:seh:handle_syscall_fault code=c0000005 flags=0 addr=0x7744d36522f9 ip=7744d36522f9 tid=00d0
17843.931:00c8:00d0:trace:seh:handle_syscall_fault  info[0]=0000000000000000
17843.931:00c8:00d0:trace:seh:handle_syscall_fault  info[1]=ffffffffffffffff
17843.931:00c8:00d0:trace:seh:handle_syscall_fault  rax=0000000000000005 rbx=0000555562eb5770 rcx=00007744d36a99db rdx=0000000000000002
17843.931:00c8:00d0:trace:seh:handle_syscall_fault  rsi=0000000000000080 rdi=00007744d37f7fe8 rbp=00007744d039bb50 rsp=00000001001fdc90
17843.931:00c8:00d0:trace:seh:handle_syscall_fault   r8=00000001001fdd88  r9=0000000000000007 r10=0000000000000000 r11=0000000000000246
17843.931:00c8:00d0:trace:seh:handle_syscall_fault  r12=0073706f2d6e6f79 r13=00007744d37f7fe8 r14=00007744ceea3540 r15=0073706f2d6e6f69
17843.931:00c8:00d0:warn:seh:handle_syscall_fault backtrace: --- Exception 0xc0000005 at 0x7744d36522f9: /usr/lib/libc.so.6 + 0x442f9 (__cxa_finalize + 0x59).
17843.931:00c8:00d0:trace:unwind:dwarf_virtual_unwind function 7744d36522f9 base 0x7744d36522a0 cie 0x7744d37cd1f8 len 14 id 0 version 1 aug 'zR' code_align 1 data_align -8 retaddr %rip
17843.931:00c8:00d0:warn:seh:dwarf_virtual_unwind backtrace: 0x7744d36522f9: /usr/lib/libc.so.6 + 0x442f9 (__cxa_finalize + 0x59).
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a0: DW_CFA_def_cfa %rsp, 8
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a0: DW_CFA_offset %rip, -8
17843.931:00c8:00d0:trace:unwind:dwarf_virtual_unwind fde 0x7744d37cfeac len 60 personality (nil) lsda (nil) code 7744d36522a0-7744d3652610
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a0: DW_CFA_advance_loc 6
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a6: DW_CFA_def_cfa_offset 16
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a6: DW_CFA_offset %r15, -16
17843.931:00c8:00d0:trace:unwind:execute_cfa_instructions 7744d36522a6: DW_CFA_advance_loc 2
@jarrard
Copy link
Author

jarrard commented Nov 22, 2024

To me it looks like the X server window times out or shuts down? Very weird non the less.

@OlegAckbar
Copy link

Can confirm

Operating System: Arch Linux
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.0-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: AMD Radeon RX 6700 XT

@jarrard
Copy link
Author

jarrard commented Nov 23, 2024

I do have another VERY annoying issue that seems to be exclusive to me where F S A keys change the gamescope wayland window settings.

solved: usetakefocus=n ::: Maybe not related, just coincidence it suddenly worked that time. Basically Kwin was constantly crashing and restarting which somehow causes a issue.

Tested Stalker-2 with HDR off, gs still ctd after say 20mins. Using a NEW fresh CachyOS install now just to ensure no other bugs interferring like the one above. So I believe this isn't HDR related, just Wayland(Plasma6.2?) and Gamescope related (a AMD user also reported this issue) with this game.

@jarrard jarrard changed the title STALKER.2: Heart of Chornobyl || HDR CTD after 1-30mins STALKER.2: Heart of Chornobyl || CTD after 1-30mins Nov 23, 2024
@dex815
Copy link

dex815 commented Nov 24, 2024

I'm having also the same issue with gamescope -f -r 165 --adaptive-sync -h 2160 -e --force-grab-cursor --mouse-sensitivity 1.5 --hdr-enabled -- %command%. I tried to enable proton logs and also take a look at the coredump, but I didn't see any clear indication of what could be the reason.

The crashes can occur just after the shaders compilation (in the main menu), or while playing, sometimes after a couple minutes, others after 30 or more.

I think that the issue is related to the argument --force-grab-cursor, because I have noticed most of the crashes occur while you are navigating menus like the main one or when you open your inventory or PDA (and the game changes your cursor). A few times it also happened exactly when the cursor reached the border of the screen. I saw that there are some other bug reports for similar issues with the argument / cursor behaviour, i.e.: #1434

@jarrard
Copy link
Author

jarrard commented Nov 24, 2024

I think that the issue is related to the argument --force-grab-cursor, ....

You may be right; however perhaps its just agreevated by those actions but them themselves are not the borderline trigger as I've had it happening when not performing any action but moving around. It could be just input triggered perhaps?

Also are you using NVIDIA or AMD?

I do not know if there is a way to run the game without the force-grab cursor thing. Maybe there is another way to do it via wine? another vector to fiddle with I guess...

ANOTHER vector is all frame-gen. Gamescope may be crashing due to it, I've read of reports of frame-gen crashing this game.

@dex815
Copy link

dex815 commented Nov 24, 2024

System info:

Operating System: Arch Linux
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 7950X3D 16-Core Processor
Memory: 61,9 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B650M AORUS ELITE AX
gamescope 3.15.14-1
vulkan-radeon 1:24.2.7-1
mesa 1:24.2.7-1
proton experimental-9.0-2041111

gdb coredump bt from one of my crashes:

#0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x000070517faa5463 in __pthread_kill_internal (threadid=, signo=6) at pthread_kill.c:78
#2 0x000070517fa4c120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x000070517fa334c3 in __GI_abort () at abort.c:79
#4 0x00005739cb8be145 in gamescope::CWaylandInputThread::ThreadFunc (this=0x5739dab9df80) at ../gamescope/src/Backends/WaylandBackend.cpp:2363
#5 operator() (__closure=) at ../gamescope/src/Backends/WaylandBackend.cpp:2293
#6 std::__invoke_impl<void, gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#7 std::__invoke<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#8 std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::_M_invoke<0> (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#9 std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::operator() (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > > >::_M_run(void) (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#11 0x000070517fce1c34 in std::execute_native_thread_routine (__p=0x5739daba21b0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#12 0x000070517faa339d in start_thread (arg=) at pthread_create.c:447
#13 0x000070517fb2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

@dex815
Copy link

dex815 commented Nov 24, 2024

I have also noticed that if you move the cursor to the top left corner of the screen (in the main menu for example), and do alt-tab, the game window is zoomed in to the corner, and it keeps doing it each time that you put the cursor in the corner until after 2-3 zooms it crashes. May be related or not.

In the ticket that I linked before (#1434) there are mentions about how this may be an issue related to the KDE display scaling. In my case I have it at 150%.

EDIT: I set the KDE display scaling to 100% and the weird zoom behaviour doesn't occur anymore. I will play for a while and see if I get any more crashes.

@matte-schwartz
Copy link

matte-schwartz commented Nov 24, 2024

#0  __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x000070517faa5463 in __pthread_kill_internal (threadid=, signo=6) at pthread_kill.c:78
#2  0x000070517fa4c120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x000070517fa334c3 in __GI_abort () at abort.c:79
#4  0x00005739cb8be145 in gamescope::CWaylandInputThread::ThreadFunc (this=0x5739dab9df80) at ../gamescope/src/Backends/WaylandBackend.cpp:2363
#5  operator() (__closure=) at ../gamescope/src/Backends/WaylandBackend.cpp:2293
#6  std::__invoke_impl<void, gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#7  std::__invoke<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#8  std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::_M_invoke<0> (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#9  std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::operator() (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > > >::_M_run(void) (this=) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#11 0x000070517fce1c34 in std::execute_native_thread_routine (__p=0x5739daba21b0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#12 0x000070517faa339d in start_thread (arg=) at pthread_create.c:447
#13 0x000070517fb2849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

this specific stack looks almost identical to another crash i've seen related to a cursor issue in Planet Coaster 2, which was solved by #1630. might be worth trying that patch

edit: just to add to this, I played the game for ~40 minutes earlier with gamescope -e -f -h 2160 -w 7680 --hdr-enabled --mangoapp --force-grab-cursor -- %command% while using that patch and was unable to get it to crash (although I had not seen your stack trace before testing)

@jarrard
Copy link
Author

jarrard commented Nov 24, 2024

I'll definitely check that out once I learn how to build and use patches again. Could take a while. (I have mental loss issues, I've done this 100x before, lol)

EDIT: Ok I figured it out, going to test against gamescope-plus

@matte-schwartz
Copy link

@jarrard the aforementioned PR was just merged into gamescope master if you build following the readme instructions, or i built a version for Arch with the patch using arch's pkgbuild here: https://app.filen.io/#/d/dc5592d4-17fa-4a9a-8d34-0918e71d5660#8u7DeVFeU6UuS4oca9WyPKeGQ8ctIG84

@dex815
Copy link

dex815 commented Nov 24, 2024

I have been playing 2-3 hours with the KDE Display Scaling set to 100% and so far no crashes.

@jarrard
Copy link
Author

jarrard commented Nov 24, 2024

built a version for Arch with the patch using arch's pkgbuild here

Yep that's what I did. It appears to have applied the patch. Just need to put in time to test.

NVM: got it working with gamescope -H 2160 --adaptive-sync -f --hdr-enable --force-grab-cursor --immediate-flips -- env ENABLE_GAMESCOPE_WSI=1 %command%

I've spent more time debugging this issue then playing the game... lol

UPDATE: Got a chance to play for a few hours with gamescope, so it looks like this particular issue has been solved?

@OlegAckbar
Copy link

Yeah, I've tried this patch too and it seems to be solved.

@matte-schwartz
Copy link

tested this myself on both AMD and NVIDIA with gamescope master (which includes the PR linked above) and was unable to get either to crash after ~1 hour of playtime each, gamescope -e -f -h 2160 -w 7680 -r 240 --mangoapp --hdr-enabled --force-grab-cursor -- %command% on AMD and VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait gamescope -e -f -h 2160 -w 7680 -r 120 --adaptive-sync --mangoapp --hdr-enabled --force-grab-cursor -- %command% on NVIDIA

@jarrard
Copy link
Author

jarrard commented Nov 24, 2024

VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait

What's the benefit of using this for stalker-2? You finding it better frame smoothing?

@matte-schwartz
Copy link

What's the benefit of using this for stalker-2? You finding it better frame smoothing?

i had it set already for #1592, nothing more

@jarrard jarrard changed the title STALKER.2: Heart of Chornobyl || CTD after 1-30mins STALKER.2: Heart of Chornobyl || CTD after 1-30mins (Resolved in master) Nov 28, 2024
@jarrard
Copy link
Author

jarrard commented Nov 28, 2024

Have been noticing frame pacing issues after 5-20mins at times. The framerate is mostly the same but you can tell its not smooth at all like it is when you first have the game running. Bit of a shame.

@matte-schwartz
Copy link

Probably #697

@jarrard
Copy link
Author

jarrard commented Nov 29, 2024

Probably #697

Doesn't seem to have an effect. It's possible the game is just having problems I dunno. I also get a weird HDR flutters which is a indicator that adaptive sync is having issues. Turning if off helps but you loose some smoothing (which goes away after a while anyway...)

@Virkkunen
Copy link

VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait

What's the benefit of using this for stalker-2? You finding it better frame smoothing?

For some people with Nvidia cards, using gamescope freezes the game after a few seconds. Adding this env variable fixes it.

@jarrard
Copy link
Author

jarrard commented Dec 1, 2024

My biggest issue and why I moved to windows for playing this game (I duel boot) is VRR becoming unstable and ALSO causing HDR flutters. (a changing in the gamma that causes flickering) -- THESE issues seem to come and go, probably related to framerate drops.

These issues don't happen for the most part under Windows. The HDR VRR Flutter issue WAS a early NVIDIA AND AMD issue back in the day however (windows).

The game does start off smooth under Linux but after a bit of time starts getting nano stutters or unclear frame delivery. It isn't engine stutter btw.

@matte-schwartz
Copy link

the crash is now fixed in a tagged release, gamescope 3.16.1

@kisak-valve
Copy link
Member

Closing per the last comment.

@jarrard
Copy link
Author

jarrard commented Jan 24, 2025

Yeah it seems to be good now.

However be aware this game has a MASSIVE framerate hit under Linux.

Windows avg 135fps
Linux avg 95fps

That's a 40fps hit on a 4090 at 4k with dlss upscaling and framegen enabled (kind of needed in this game atm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants