[Linux Mint 21] Offloading freezes my entire system

Hello,
I am experiencing a freeze of my entire system when playing CS:GO (usually after max. 10 minutes or less of playing). It completely hangs until I hard-reboot.
I have had this issue when I upgraded my system from Linux Mint 20.3 to 21 and thought it might be related to the upgrade that broke some package or anything. But now I am on a clean installation and it is still happening. No issues on 20.3.
System information: https://termbin.com/vkce
I run the game on my Nvidia GPU via Prime (by using the launch options below)
Launch options in steam: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command% +fps_max 80 -novid -nojoy

However, when I tested it a few minutes in Nvidia performance mode (not on-demand) I had no issues.

What still works after the freeze:

  • Music (keeps playing in the background)
  • Network
  • SSH? (Not sure about it, but it worked when I tried a few months ago)

What doesn’t work after the freeze:

  • Interacting with the game or my system in general
  • Closing the game
  • Getting to my desktop (neither Super+D nor Alt+Tab)
  • Switching to a console (Ctrl+Alt+F1)

What I tried so far (didn’t help):

  • Clean installing the system, steam and CS:GO
  • Switching NVidia driver version to 515, 520 or 525
  • Updating BIOS
  • Setting intel’s max_cstate to 1
  • Launching the game in Vulkan mode (-vulkan launch option) (runs as OpenGL application otherwise)
  • Disabling CPU undervolting
  • Disabling Swap
  • Checking my RAM and VRAM (no errors)
  • Launching steam (not only CS:GO) with Nvidia GPU

I would really appreciate any help as I can’t find a fix for it.
Thanks.

1 Like

This might be a Muffin issue, not NV.

Which driver version?
Please see this
https://forums.developer.nvidia.com/t/vk-khr-present-id-wait-causes-device-loss-on-nvidia-525-60-11-on-prime-setup/236510

@generix I’m currently using 525.60.11, but I tested 515 and 520 and it happens as well.

@VulkanGuy Well that looks interesting. Even though the issue report is outdated, there might be a regression (again). I asked if someone can reproduce this.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

@generix Okay, here is the log file
nvidia-bug-report.log.gz (368.7 KB)

This freeze occurred in the game “Among Us” (not just CS:GO is affected)

The problem is actually with your intel gpu.

[ 21266.188] (WW) modeset(0): Present-flip: queue async flip during flip on CRTC 0 failed: Invalid argument

Async flip was enabled in kernel 5.11 and later and doesn’t work properly on some older hardware, leading to the display output to freeze. So when you upgraded from Mint 20.3 (kernel 5.4) to 21 (kernel 5.15) you ran into this.
You mght want to use the liquorix ppa to get the latest kernel to check if this has been fixed meanwhile.
Another workaround would be downgrading the mint kernel to GA, if possible, which should be still 5.4 and stick to that.
https://wiki.ubuntu.com/Kernel/LTSEnablementStack
IIRC, another workaround is disabling PRIME sync
https://forums.developer.nvidia.com/t/ubuntu-18-04-3-blank-screen-at-startup-with-430-drivers-and-gtx-960/107501/2?u=generix
but this will result in tearing and disabling external outputs on the nvidia gpu.
Furthermore, you should check with the i915 issue tracker if there’s some work done.

Fwiw, i’ve created that Muffin issue back in the day; same system with same kernel and everything just worked when i switched to KDE as it was also noted in the issue thread. No system wide hangs/freezes etc.

Likewise trying the packages that Muffin dev asked me to use also worked.

So that being a kernel issue is less likely.

I had the same with Lenovo IdeaPad gaming 3(Ryzen 5 5600H radeon graphics, Nvidia gtx 1650 4GB, 8GB RAM). Same as him when i put on performance mode i have no problem.

Same problem only on KDE Plasma and only in FULLSCREEN.
You can also check my logs here: KDE Plasma completely freezes in fullscreen except cursor - Help - Discuss
Alt+SysRq+R and then changing the tty fixes the problem, but not for long