Games freezes mid game along with display and few applications

So the problem my games freezes mid games. The whole display freezes , I can’t tab or anything . discord does’t works either but spotify does cause I can still listen to songs. No problem in FPS drops or anything , the game works smoothly except the random freezes and my only choice is to hard reset.

I am using Manjaro i3 edition.
Here’s everything

neofetch output

   OS: Manjaro Linux x86_64 
   Host: GL553VE 1.0 
   Kernel: 5.15.28-1-MANJARO 
   Uptime: 24 mins 
   Packages: 1301 (pacman) 
   Shell: bash 5.1.16 
   Resolution: 2560x1440 
  WM: i3 
  Theme: Sweet-Dark-v40 [GTK2/3] 
   Icons: candy-icons [GTK2/3] 
  Terminal: terminator 
   CPU: Intel i7-7700HQ (8) @ 3.800GHz 
   GPU: Intel HD Graphics 630 
   GPU: NVIDIA GeForce GTX 1050 Ti Mobile 
   Memory: 4285MiB / 15886MiB

inxi -G output

Graphics:
  Device-1: Intel HD Graphics 630 driver: i915 v: kernel
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] driver: nvidia
    v: 510.54
  Device-3: Realtek USB2.0 HD UVC WebCam type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau gpu: i915
    resolution: 2560x1440~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 21.3.7

I read somewhere that nvidia drivers should be used the same as the kernel i.e I should use the Nvidia-515 drivers.

If the downgraded drivers is the problem my game freezes , then shall I upgrade it and if yes then how should I do it safely without breaking anything.

I already have the drivers donwloaded :

pacman -Sqe | grep 'nvidia’

lib32-nvidia-utils
linux510-nvidia
linux515-nvidia
nvidia-prime
nvidia-utils

Any help / suggestion would be great and I will provide any further info if required.

Thank you.

PS : I use a 2K display external monitor and use these commands everytime I boot:

xrandr --output HDMI-1 --primary #To set my monitor as primary display

xrandr --output eDP-1 --off #To switch off my laptop display (I keep the lid down)

xrandr -s 2560x1440 #To set the monitor resolution (At first it automatically detected and set the resolution but past few a days I have to do it manually so I set an alias)

Update : Now the game freezes after like 2-3 minutes of launch , not even playable.

Update 2 : If I didn’t use the xrandr commands , the game ran for 30 minutes without any problem.

Hi @kniloy07, and welcome!

  1. There is no such thing as nVidia 515 drivers. Or at lest not I know of.
  2. I have been repeatedly told that it’s unsafe to turn off/shutdown your PC like that. So I’m going to give you the same that was given too me:

Then, in order for us or anyone for that matter, to be able to provide assistance, more information is necessary. To that end, please see:

Please also provide the output for:

mhwd

And

mhwd --listinstalled

Tip:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Thereby improving legibility and making it much easier for those trying to be of assistance.

Hope you manage!

Thank You very much for the safely rebooting the system post , I am going to read it after replying to this.

mhwd output

> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0302:10de:1c8c) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
    video-nvidia-390xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:591b) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

mhwd --listinstalled output

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
           video-linux            2018.05.04                true            PCI
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI


Warning: No installed USB configs!

You do not need that driver installed. Remove it. Keep just video-modesetting and video-hybrid-intel-nvidia-prime.

When you want to use an app via the dGPU, simply use:
prime-run <application>

Is it the extra video-linux driver that causing the freezes?

Yes I do use the prime-run %command% in my launch options.

I’ll remove the driver and see if the freezing stops, Thank you.