Poor Performance when Gaming

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.
Post Reply
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Poor Performance when Gaming

Post by Sting »

I only have one remaining reason to dual-boot, and that is gaming.

For example, when I play Hogwarts Legacy on Linux the computer fan goes to maximum power and stays there, and the game will randomly stutter and lag. This does not happen on Windows. I installed through Steam, and the game supports Linux. Is worse performance on Linux just something I will have to live with, or are there potential workarounds?

I am already running kernel version 6.5 and the 535 Nvidia driver. Full system information:

Code: Select all

System:
  Kernel: 6.5.0-15-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33
    wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: NZXT product: B550 UD AC v: N/A serial: <superuser required>
  Mobo: Gigabyte model: B550 UD AC v: x.x serial: <superuser required>
    UEFI: American Megatrends LLC. v: F2 Y1 date: 07/13/2021
CPU:
  Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP smt: enabled arch: Zen 3 rev: 2
    cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
  Speed (MHz): avg: 2847 high: 3648 min/max: 2200/4650 boost: enabled cores: 1: 2874 2: 3648
    3: 2872 4: 2872 5: 2873 6: 2200 7: 2387 8: 3594 9: 2874 10: 3577 11: 2200 12: 2200
    bogomips: 88635
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070 Lite Hash Rate] vendor: Gigabyte driver: nvidia
    v: 535.154.05 pcie: speed: 16 GT/s lanes: 16 ports: active: none off: HDMI-A-1
    empty: DP-1,DP-2,HDMI-A-2 bus-ID: 06:00.0 chip-ID: 10de:2488 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 162 s-size: 602x341mm (23.7x13.4") s-diag: 692mm (27.2")
  Monitor-1: HDMI-0 res: 3840x2160 hz: 60 dpi: 163 size: 597x336mm (23.5x13.2")
    diag: 685mm (27")
  OpenGL: renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2 v: 4.6.0 NVIDIA 535.154.05
    direct render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel
    pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.1 chip-ID: 10de:228b class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie:
    speed: 16 GT/s lanes: 16 bus-ID: 08:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: C-Media Audio Adapter (Unitek Y-247A) type: USB
    driver: cmedia_hs100b,snd-usb-audio,usbhid bus-ID: 1-1:2 chip-ID: 0d8c:0014 class-ID: 0300
  Sound Server-1: ALSA v: k6.5.0-15-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 Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:24fb class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte
    driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-6:6
    chip-ID: 8087:0aa7 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: <filter>
Drives:
  Local Storage: total: 4.55 TiB used: 1.91 TiB (42.0%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS100T2B0C-00PXH0 size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 233010WD temp: 41.9 C scheme: GPT
  ID-2: /dev/sda vendor: Seagate model: ST4000DM004-2CV104 size: 3.64 TiB speed: 6.0 Gb/s
    type: HDD rpm: 5425 serial: <filter> rev: 0001 scheme: GPT
Partition:
  ID-1: / size: 98.6 GiB used: 46.89 GiB (47.6%) fs: ext4 dev: /dev/nvme0n1p4
  ID-2: /boot/efi size: 96 MiB used: 31.1 MiB (32.4%) fs: vfat dev: /dev/nvme0n1p1
  ID-3: /home size: 1.79 TiB used: 954.13 GiB (52.1%) fs: ext4 dev: /dev/sda3
Swap:
  ID-1: swap-1 type: partition size: 15.26 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p5
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-1:2 info: C-Media Audio Adapter (Unitek Y-247A) type: Audio,HID
    driver: cmedia_hs100b,snd-usb-audio,usbhid interfaces: 4 rev: 1.1 speed: 12 Mb/s power: 100mA
    chip-ID: 0d8c:0014 class-ID: 0300
  Device-2: 1-3:3 info: Integrated Express ITE Device type: HID driver: hid-generic,usbhid
    interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 048d:5702 class-ID: 0300
  Device-3: 1-4:4 info: Keychron V3 type: Keyboard,HID driver: hid-generic,usbhid interfaces: 3
    rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 3434:0330 class-ID: 0300
  Hub-2: 1-5:5 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s power: 100mA
    chip-ID: 05e3:0608 class-ID: 0900
  Device-1: 1-5.2:7 info: HP HyperX Pulsefire Haste 2 Wireless type: Mouse,Keyboard,HID
    driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 03f0:0f98
    class-ID: 0300
  Device-2: 1-6:6 info: Intel Wireless-AC 3168 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0aa7 class-ID: e001
  Hub-3: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-4: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-5: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 34.0 C mobo: 34.0 C gpu: nvidia temp: 50 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Repos:
  Packages: 2811 apt: 2781 flatpak: 30
  No active apt repos in: /etc/apt/sources.list
  No active apt repos in: /etc/apt/sources.list.d/atom.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https: //brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/cuda-ubuntu2204-11-7-local.list
    1: deb [signed-by=/usr/share/keyrings/cuda-F83D2C4C-keyring.gpg] file: ///var/cuda-repo-ubuntu2204-11-7-local /
  Active apt repos in: /etc/apt/sources.list.d/nordvpn.list
    1: deb https: //repo.nordvpn.com//deb/nordvpn/debian stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //packages.linuxmint.com virginia main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 329 Uptime: 6m wakeups: 0 Memory: 46.98 GiB used: 3.31 GiB (7.1%) Init: systemd
  v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12/9 Client: Cinnamon v: 6.0.4 inxi: 3.3.13
Weelinux_49
Level 1
Level 1
Posts: 18
Joined: Thu Jan 25, 2024 9:14 am

Re: Poor Performance when Gaming

Post by Weelinux_49 »

Hi,

I installed Hogwarts on a previous set-up with Pop!Os and it was working quite good. Now I am on Mint, but I don't think performance would differ much.

What version of Steam are you using? Did you install it via the Software Manager? If the answer is "yes" then uninstall it and downlaod the .deb package from Steam website: https://store.steampowered.com/about/

Gamemode might help: sudo apt install gamemode

To activate it go to Launch Options (Steam Library -> Your Game -> Properties) and add: gamemoderun %command%

Are you using Nvidia Performance Mode profile? Do not use OnDemand.

Do you turn off compositor for full screen windows when playing games? To do so press Start, type General and press Enter. In the window that opens check "Disable compositing for full-screen windows".

EDIT

I've installed Hogwarts Legacy on Mint and it works amazingly. 60 fps and no stutter at all with NVIDIA DLSS on Quality and graphics settings on Low.
Disabled Steam Overlay. Switched to Proton 8.0-5. Launch Options: gamemoderun %command%

My specs are:

Code: Select all

System:
  Kernel: 6.7.0-tkg-pds x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
    tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: ASUSTeK product: ROG Strix G531GT_G531GT 

CPU:
  Info: 6-core model: Intel Core i7-9750H bits: 64 
  Speed (MHz): avg: 800 min/max: 800/4500 

Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK driver: i915 v: kernel
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK driver: nvidia
    v: 545.29.06
User avatar
Neigdoig
Level 3
Level 3
Posts: 117
Joined: Fri Jul 29, 2022 10:33 pm
Contact:

Re: Poor Performance when Gaming

Post by Neigdoig »

As stated, if you're using the Steam Flatpak, that's a big mistake. Performance is worse on that than the native package, which is easily accessible. For me, I downloaded it using APT, and it isn't all that bad (then again, I got native packages for quite a few Linux distros, so I know a little something about that).
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Re: Poor Performance when Gaming

Post by Sting »

Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am What version of Steam are you using? Did you install it via the Software Manager? If the answer is "yes" then uninstall it and downlaod the .deb package from Steam website: https://store.steampowered.com/about/
I uninstalled steam and reinstalled it from the website. That didn't seem to change performance much.
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Gamemode might help: sudo apt install gamemode

To activate it go to Launch Options (Steam Library -> Your Game -> Properties) and add: gamemoderun %command%
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Do you turn off compositor for full screen windows when playing games? To do so press Start, type General and press Enter. In the window that opens check "Disable compositing for full-screen windows".
After I activated gamemode and turned of compositor the game ran more smoothly. The fan still runs hot but it isn't lagging like it was.
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Are you using Nvidia Performance Mode profile? Do not use OnDemand.
I don't use Nvidia Performance Mode. Would that help?
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am I've installed Hogwarts Legacy on Mint and it works amazingly. 60 fps and no stutter at all with NVIDIA DLSS on Quality and graphics settings on Low.
Disabled Steam Overlay. Switched to Proton 8.0-5. Launch Options: gamemoderun %command%
Maybe I will try using NVIDIA DLSS, disabling Steam Overlay, and switching to Proton 8.0-5. But, it's already much better than it was. Thanks for the help!

For future reference, are these optimizations you mentioned the same ones I should apply to any game with performance issues? And if not, is there somewhere I can look up the best configuration for a specific game?
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Re: Poor Performance when Gaming

Post by Sting »

Neigdoig wrote: Wed Feb 07, 2024 4:45 pm As stated, if you're using the Steam Flatpak, that's a big mistake. Performance is worse on that than the native package, which is easily accessible. For me, I downloaded it using APT, and it isn't all that bad
I believe I was also using the apt version. Using the .deb didn't seem to make much difference, so your observation that the apt version isn't all that bad checks out.
Weelinux_49
Level 1
Level 1
Posts: 18
Joined: Thu Jan 25, 2024 9:14 am

Re: Poor Performance when Gaming

Post by Weelinux_49 »

Sting wrote: Thu Feb 08, 2024 9:35 pm
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am What version of Steam are you using? Did you install it via the Software Manager? If the answer is "yes" then uninstall it and downlaod the .deb package from Steam website: https://store.steampowered.com/about/
I uninstalled steam and reinstalled it from the website. That didn't seem to change performance much.
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Gamemode might help: sudo apt install gamemode

To activate it go to Launch Options (Steam Library -> Your Game -> Properties) and add: gamemoderun %command%
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Do you turn off compositor for full screen windows when playing games? To do so press Start, type General and press Enter. In the window that opens check "Disable compositing for full-screen windows".
After I activated gamemode and turned of compositor the game ran more smoothly. The fan still runs hot but it isn't lagging like it was.
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am Are you using Nvidia Performance Mode profile? Do not use OnDemand.
I don't use Nvidia Performance Mode. Would that help?
Weelinux_49 wrote: Mon Feb 05, 2024 8:29 am I've installed Hogwarts Legacy on Mint and it works amazingly. 60 fps and no stutter at all with NVIDIA DLSS on Quality and graphics settings on Low.
Disabled Steam Overlay. Switched to Proton 8.0-5. Launch Options: gamemoderun %command%
Maybe I will try using NVIDIA DLSS, disabling Steam Overlay, and switching to Proton 8.0-5. But, it's already much better than it was. Thanks for the help!

For future reference, are these optimizations you mentioned the same ones I should apply to any game with performance issues? And if not, is there somewhere I can look up the best configuration for a specific game?
Glad to hear you are getting better performance! Yes, I apply all these optimizations for every game I play.

Do switch to NVIDIA PERFORMANCE MODE when playing. You can do it either with the nvidia-prime-applet or in Nvidia X Server Settings; or via a terminal with the following command: sudo prime-select nvidia

Don't forget to check what cpu power profile you are using. To do so run: powerprofilesctl . There is a * that indicates the profile you are using.
To change it run: powerprofilesctl set <profile> (e.g powerprofilesctl set perfomance ). You should set it to performance when playing.
In Cinnamon, by default, there is no graphical interface for profile switching.
However, there is an nice applet that allows you to switch between power profiles very easily directly from the panel, avoiding so the using of a console. Check it out here: https://cinnamon-spices.linuxmint.com/applets/view/369 . To download and install go to System Settings -> Applets -> Download Tab -> Look for "power profile" -> Download it -> go to Manage and add it to the panel.

I am not using NVIDIA DLLS anymore. I use AMD FSR Quality 2, it is smoother and the visual fidelity is more or less the same as before.
So my settings are:
- Upscale Method: AMD FSR 2 (Quality)
- VSync: Off
- Framerate: Uncapped
- Graphics Presets: Low

But you have a 3070, you should run this game much smoother than me and with better graphics :D
I couldnt play Hogwarts Legacy with this laptop on Windows !! On Linux it runs great, this is amazing.
CJRoss
Level 1
Level 1
Posts: 30
Joined: Tue Feb 20, 2024 7:42 am

Re: Poor Performance when Gaming

Post by CJRoss »

It looks like you have enough system memory, but you don't have enough vram to play Hogwarts depending on your settings. Hardware Unboxed has talked about this in several videos, but here's the most recent one regarding the game specifically. I've linked to where he talks about the system memory and vram issues along with calling out the 3070 specifically.

https://youtu.be/qxpqJIO_9gQ?t=1408
User avatar
MiZoG
Level 8
Level 8
Posts: 2395
Joined: Fri Jan 26, 2018 8:30 pm
Location: Athens, Greece

Re: Poor Performance when Gaming

Post by MiZoG »

1. Install Steam from Valve not in "Software Manager" (Ubuntu repos) no matter what...
"Steam Installer", the ubuntu package installs steam libs v1.0.0.74 found in Software Manager. There is no way to update steam libs when you install this package. Valve's steam deb installer will install steam libs v1.0.0.79 at the time of this writing. Obsolete steamlibs will be a headache with games that require newer versions and Steam client which is self-updated independently will throw errors related to paths.
2. Gamemode is installed OOB in latest builds of Linux Mint. No need to run any extra command.
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Re: Poor Performance when Gaming

Post by Sting »

Weelinux_49 wrote: Fri Feb 09, 2024 4:55 am But you have a 3070, you should run this game much smoother than me and with better graphics :D
I couldnt play Hogwarts Legacy with this laptop on Windows !! On Linux it runs great, this is amazing.
Thanks for all the help! It turns out that most of the "very bad performance" that I was getting at the start was because the settings had defaulted to "Ultra", while on Windows they defaulted to "High". Ultra at 1440p on a 3070 is not practical, even with upscaling. So it was mostly my fault for not checking the graphics settings, not Mint's.

With corrected graphics settings and AMD FSR 2 upscaling, the frame rate is now great at 4k resolution. However, the game will occasionally lag or stutter, and sometimes crashes. I also couldn't change the CPU power profile with powerprofilesctl, maybe because I have an AMD CPU? I suspect changing the CPU power profile will help fix the stuttering. I will post an update when I find a workaround.
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Re: Poor Performance when Gaming

Post by Sting »

MiZoG wrote: Wed Mar 06, 2024 2:37 pm 1. Install Steam from Valve not in "Software Manager" (Ubuntu repos) no matter what...
There is no way to update steam libs when you install this package.
Thanks for the info. I am learning to always use the .deb when available to get the most up-to-date version of any software.
Sting
Level 1
Level 1
Posts: 30
Joined: Sat Jul 22, 2023 7:22 pm

Re: Poor Performance when Gaming

Post by Sting »

CJRoss wrote: Wed Mar 06, 2024 10:41 am It looks like you have enough system memory, but you don't have enough vram to play Hogwarts depending on your settings.
Yes, I initially didn't notice that the settings had defaulted to "Ultra" instead of "High" like on Windows. That was what caused most of the performance issues.
Weelinux_49
Level 1
Level 1
Posts: 18
Joined: Thu Jan 25, 2024 9:14 am

Re: Poor Performance when Gaming

Post by Weelinux_49 »

Sting wrote: Thu Mar 07, 2024 11:07 am
Weelinux_49 wrote: Fri Feb 09, 2024 4:55 am But you have a 3070, you should run this game much smoother than me and with better graphics :D
I couldnt play Hogwarts Legacy with this laptop on Windows !! On Linux it runs great, this is amazing.
Thanks for all the help! It turns out that most of the "very bad performance" that I was getting at the start was because the settings had defaulted to "Ultra", while on Windows they defaulted to "High". Ultra at 1440p on a 3070 is not practical, even with upscaling. So it was mostly my fault for not checking the graphics settings, not Mint's.

With corrected graphics settings and AMD FSR 2 upscaling, the frame rate is now great at 4k resolution. However, the game will occasionally lag or stutter, and sometimes crashes. I also couldn't change the CPU power profile with powerprofilesctl, maybe because I have an AMD CPU? I suspect changing the CPU power profile will help fix the stuttering. I will post an update when I find a workaround.
Have a look here https://wiki.archlinux.org/title/CPU_frequency_scaling for the power-profile issue.
Post Reply

Return to “Gaming”