Linux Mint freezes when playing games fullscreen with Nvidia GPU

Anything related to gaming on Linux Mint including game discussion or questions concerning Steam or Wine.
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
imDaniX
Level 1
Level 1
Posts: 8
Joined: Mon Dec 05, 2022 3:03 pm

Linux Mint freezes when playing games fullscreen with Nvidia GPU

Post by imDaniX »

This topic is pretty much identical to mine, but as it wasn't resolved, and my specs are a bit different, I've decided to create a new one.
Edit: I guess this topic is similar aswell. All of cases are on Acer Nitro, huh.

The screen freezes, the system stops responding to keyboard, hotkeys, mouse button presses. Although, Alt + SysRq + (S U B) still does restart the system.
I'm still able to move the mouse cursor, and previously played sounds do continue to play, but that's it. The issue happens only when playing games on fullscreen and using Nvidia GPU (__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia *command* or launching through the menu with corresponding option). When playing in windowed mode, even if the window is maximized, everything is just fine.

Can't tell if it's specifically "gaming-related", since I didn't really test this aspect, but it happens with all sorts of games - Minecraft, games on Unity and Unreal Engines, and also when playing anything fullscreen through wine.

My current driver is nvidia-driver-525. I've tried installing 470 as suggested in the previous topic, but had no luck - even more, with 470 the cursor stops moving too. nvidia-driver-525-open doesn't allow me to launch anything with GPU altogether. Saw a recommendation disabling all Cinnamon effects - at first thought it worked, but after just a bit more time it got frozen again. Also tried updating OEM kernel, but it didn't work either, and also messed up my sounds so I rolled it back.
Initially I was using Linux Mint 20.3 Cinnamon (Edge) Edition, and the issue was there aswell.

inxi -Fxxxrz results:

Code: Select all

System:
  Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: gcc v: 11.3.0
    Desktop: Cinnamon 5.4.12 tk: GTK 3.24.33 wm: Mutter vt: 7
    dm: LightDM 1.30.0 Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: Acer product: Nitro AN515-56 v: V1.05
    serial: <superuser required>
  Mobo: TGL model: Scala_TLM v: V1.05 serial: <superuser required>
    UEFI: Insyde v: 1.05 date: 04/22/2021
Battery:
  ID-1: BAT1 charge: 54.8 Wh (100.0%) condition: 54.8/58.8 Wh (93.3%)
    volts: 17.2 min: 15.4 model: SMP AP18E7M type: Li-ion serial: <filter>
    status: Full cycles: 55
CPU:
  Info: quad core model: 11th Gen Intel Core i5-11300H bits: 64 type: MT MCP
    smt: enabled arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB L3: 8 MiB
  Speed (MHz): avg: 1454 high: 2300 min/max: 400/4400 cores: 1: 1012
    2: 1043 3: 1147 4: 1350 5: 1526 6: 1920 7: 2300 8: 1336 bogomips: 49766
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics]
    vendor: Acer Incorporated ALI driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1 bus-ID: 0000:00:02.0 chip-ID: 8086:9a49 class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q]
    vendor: Acer Incorporated ALI driver: nvidia v: 525.60.11 ports:
    active: none empty: HDMI-A-1 bus-ID: 0000:01:00.0 chip-ID: 10de:1f9d
    class-ID: 0300
  Device-3: Chicony HD User Facing type: USB driver: uvcvideo bus-ID: 3-8:3
    chip-ID: 04f2:b72b class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 98 s-size: 499x280mm (19.6x11.0")
    s-diag: 572mm (22.5")
  Monitor-1: eDP-1 model: AU Optronics res: 1920x1080 hz: 144 dpi: 142
    size: 344x193mm (13.5x7.6") diag: 394mm (15.5") modes: 1920x1080
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 22.0.5
    direct render: Yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio
    vendor: Acer Incorporated ALI driver: sof-audio-pci-intel-tgl
    bus-ID: 0000:00:1f.3 chip-ID: 8086:a0c8 class-ID: 0401
  Device-2: NVIDIA driver: snd_hda_intel v: kernel bus-ID: 0000:01:00.1
    chip-ID: 10de:10fa class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX201 vendor: Rivet Networks driver: iwlwifi
    v: kernel bus-ID: 0000:00:14.3 chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek vendor: Acer Incorporated ALI driver: r8169 v: kernel
    port: 3000 bus-ID: 0000:2c:00.0 chip-ID: 10ec:2600 class-ID: 0200
  IF: enp44s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-10:4 chip-ID: 8087:0026 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter>
    bt-v: 3.0 lmp-v: 5.2 sub-v: 237e hci-v: 5.2 rev: 237e
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev:
    class-ID: 0104
Drives:
  Local Storage: total: 476.94 GiB used: 203.81 GiB (42.7%)
  ID-1: /dev/nvme0n1 vendor: Western Digital
    model: PC SN530 SDBPNPZ-512G-1114 size: 476.94 GiB speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 21113000 temp: 31.9 C
    scheme: GPT
Partition:
  ID-1: / size: 467.89 GiB used: 203.81 GiB (43.6%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 27.8 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2927 apt: 2926 flatpak: 1
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/bellsoft.list
    1: deb [arch=amd64] https://apt.bell-sw.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https://mirror.yandex.ru/linuxmint-packages vanessa main upstream import backport
    2: deb http://mirror.yandex.ru/ubuntu jammy main restricted universe multiverse
    3: deb http://mirror.yandex.ru/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://mirror.yandex.ru/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  No active apt repos in: /etc/apt/sources.list.d/volian-archive-scar-unstable.list
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
  Active apt repos in: /etc/apt/sources.list.d/winehq-focal.sources
    1: deb [arch=amd64 i386] https://dl.winehq.org/wine-builds/ubuntu focal main
Info:
  Processes: 285 Uptime: 8m wakeups: 690 Memory: 7.56 GiB
  used: 2.72 GiB (35.9%) Init: systemd v: 249 runlevel: 5 Compilers:
  gcc: 11.3.0 alt: 11/9 Shell: Bash v: 5.1.16 running-in: gnome-terminal
  inxi: 3.3.13
Last edited by LockBot on Mon Jun 05, 2023 10:00 pm, edited 5 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
imDaniX
Level 1
Level 1
Posts: 8
Joined: Mon Dec 05, 2022 3:03 pm

Re: Linux Mint freezes when playing games fullscreen with Nvidia GPU

Post by imDaniX »

Might be something to do with PRIME render offload feature? I turned on "Performance mode" instead of "On demand" so Nvidia GPU is always used, and was able to play in fullscreen for a hour straight with no issues (usually freezing was occurring randomly in the first 10 minutes of playing). Stopped because had no time for playing further, but will try later.
While it (probably) fixes the problem, I don't think this is a solution but rather a workaround, as it consumes more power when not playing games, which is rather crucial for laptops.
User avatar
SMG
Level 25
Level 25
Posts: 31972
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint freezes when playing games fullscreen with Nvidia GPU

Post by SMG »

imDaniX wrote: Mon Dec 05, 2022 5:35 pmAlso tried updating OEM kernel, but it didn't work either, and also messed up my sounds so I rolled it back.
Welcome to the forum, imDaniX.

There is more than one OEM kernel available and those directions do not explain that. (They make the assumption that newer is better which is not always the case.) I've heard feedback from others the 6.0-oem kernel causes audio-related problems so you are not the first to experience it.

There is a 5.17-oem kernel you can try. You can install the latest 5.17-oem kernel with

Code: Select all

sudo apt-get install linux-oem-22.04
and reboot.

According to Acer Support: Nitro AN515-56 your system is not running the most recent BIOS/UEFI.

Machine:
Type: Laptop System: Acer product: Nitro AN515-56 v: V1.05
serial: <superuser required>
Mobo: TGL model: Scala_TLM v: V1.05 serial: <superuser required>
UEFI: Insyde v: 1.05 date: 04/22/2021

I also came across this document Upgrade Video BIOS to improve system performance which applies to your model and seems to be dated for after the BIOS/UEFI update you have so I do not know if you have installed it. The package for the Video BIOS update is on the BIOS page at the bottom. However, it does look like it is a Windows-only file for updating.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
imDaniX
Level 1
Level 1
Posts: 8
Joined: Mon Dec 05, 2022 3:03 pm

Re: Linux Mint freezes when playing games fullscreen with Nvidia GPU

Post by imDaniX »

Hey, thank you for answering.
Have updated to 5.17-oem kernel, but the freezing issue still persists. Will try updating BIOS aswell, but currently I don't have Windows installed, so it'll take me some time to deal with.
Locked

Return to “Gaming”