OpenGL 3D causes apps to crash or locks up the system


I’m back with another OpenGL related issue and now it’s OpenGL hanging my system completely. Like, when I start an OpenGL game(i.e. minecraft or TF2), it works for a bit, freezes, unfreezes and then locks up the computer. Didn’t find anything on ArchWiki (xorg, nvidia etc.). Games that use Vulkan seem to work fine.

(sometimes it happens with the system just running too…)

CPU: i3-6006u
RAM: 16GiB DDR4 2666
GPUs: Intel HD Graphics 520 and NVIDIA GeForce 920M via optimus-manager
DE: KDE with everything being pretty much umodified
Kernels that I tested: 5.15.12 linux and linux-zen

pacman -Qs nvidia
local/egl-wayland 2:1.1.9+r3+g582b2d3-1
    EGLStream-based Wayland external platform
local/lib32-nvidia-470xx-utils 470.94-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/libxnvctrl-470xx 470.94-1
    NVIDIA NV-CONTROL X extension
local/nvidia-470xx-dkms 470.94-2
    NVIDIA drivers - module sources
local/nvidia-470xx-settings 470.94-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-470xx-utils 470.94-2
    NVIDIA drivers utilities

pacman -Qs mesa
local/glu 9.0.2-1
    Mesa OpenGL Utility library
local/lib32-libva-mesa-driver 21.3.3-1
    VA-API implementation for gallium (32-bit)
local/lib32-mesa 21.3.3-1
    An open-source implementation of the OpenGL specification (32-bit)
local/lib32-vulkan-intel 21.3.3-1
    Intel's Vulkan mesa driver (32-bit)
local/lib32-vulkan-mesa-layers 21.3.3-1
    Mesa's Vulkan layers (32-bit)
local/libva-mesa-driver 21.3.3-2
    VA-API implementation for gallium
local/mesa 21.3.3-2
    An open-source implementation of the OpenGL specification
local/mesa-demos 8.4.0-6
    Mesa demos
local/mesa-utils 8.4.0-6
    essential Mesa utilities
local/vulkan-intel 21.3.3-2
    Intel's Vulkan mesa driver
local/vulkan-mesa-layers 21.3.3-2
    Mesa's Vulkan layers

will be glad to provide any logs, outputs etc. if needed

(pretty sure it has nothing to do with overheating, hardware being broken, 'cause under Windows 10 everything works just fine)

kwin_x11 and xorg seem to dump core when system locks up