protonscr

[Linux][Nvidia][OpenGL/Vulkan] Huge FPS drop after upgrading from Linux 4.9 to Linux 4.1x

steamclosed NVIDIA driversDistro Family: Arch
ValveSoftware/steam-for-linux#5333 · opened 2018-01-11 by astroty · updated 2020-06-12 · 7 comments · github
Aastroty 2018-01-11 github

I was told to post this here too (https://github.com/ValveSoftware/Dota-2/issues/1371)

After upgrading the kernel version to any newer version, I consistently found to get way lower frames while playing dota (30~90 fps loss). To check if this was a more commonplace issue, I ran some benchmarks and found out there were games unaffected by this, like Unigine Heaven. Others suffered heavily from the same performance loss.

I am not sure how to do more tests to solve this issue, but I'm interested in helping.

Manjaro (Arch) Linux
Steam: 
   Built: Dec 15 2017, at 11:47:57
   Steam API: v017
   Steam Package Versions: 1513371133
   Not in beta.
System fully updated.
Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  GenuineIntel
    CPU Brand:  Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz
    CPU Family:  0x6
    CPU Model:  0x3f
    CPU Stepping:  0x2
    CPU Type:  0x0
    Speed:  3500 Mhz
    16 logical processors
    8 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    "Manjaro Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.9.74-2-MANJARO
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11906000
    X Window Manager:  Xfwm4
    Steam Runtime Version:  <Runtime disabled>

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 980/PCIe/SSE2
    Driver Version:  4.5.0 NVIDIA 384.111
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 144 Hz
    VendorID:  0x10de
    DeviceID:  0x13c0
    Revision Not Detected
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 3840 x 1080
    Primary Display Size: 20,91" x 11,77" (23,98" diag)
                                            53,1cm x 29,9cm (60,9cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 4096 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: AV200

Memory:
    RAM:  32095 Mb

Miscellaneous:
    UI Language:  English
    LANG:  pt_BR.utf8
    Total Hard Disk Space Available:  1839143 Mb
    Largest Free Hard Disk Block:  699389 Mb
    VR Headset: None detected

Recent Failure Reports:
Hh1z1 2018-01-12 github

Possible it's related to the bug in Intel CPUs (meltdown) . Which kernel version did you update to? Your sysinfo shows 4.9.

Aastroty 2018-01-12 github

I updated to 4.15 this time, but it's been happening for a while now with releases from 4.12 (earliest I could test) onward

I could try compiling the latest kernel without the PTI patches, but it's probably not needed since 4.9 already got them backported according to a vulnerability checker I ran

Edit: I meant 4.15

Hh1z1 2018-01-12 github

Did you mean 4.1.15?? It's kinda critical because the patches themselves are still moving targets. Depending on what version you have, you may be able to disable them from boot by passing "nopti" for example.

Don't know what vulnerability checker you ran but you can confirm this by

cat /proc/cmdline|grep pti and cat /sys/kernel/debug/x86/pti_enabled.

Aastroty 2018-01-12 github

Sorry, I meant 4.15.
Currently I'm using 4.9 (since it doesn't have the performance regression) and it seems that the patch was backported to this version.

I used this to check for the vulnerability
https://github.com/speed47/spectre-meltdown-checker

Also, dmesg gives me this:

[ 0.000000] Kernel/User page tables isolation: enabled

And my /proc/config.gz has this set:

CONFIG_PAGE_TABLE_ISOLATION=y

Kkisak-valve maintainer 2020-05-08 github

Hello @astroty, are you still experiencing this issue with an up to date system? For all practical purposes, these security mitigations are here to stay.

Aastroty 2020-05-08 github

These security mitigations were already present at the time of opening the issue, being backported to 4.9
Nowadays I found that using the Clear Linux kernel as currently present in the AUR gives me close to the same performance I had in 4.9 so I didn't look further on what changed on Manjaro's kernel that affected me so greatly.

I did some benchmarks when the 5.2 kernel dropped because I was curious on how things had evolved (and because I wanted to test compiling linux tkg from the Tk-Glitch repos) and these were the results
rect2

So yeah, since I don't know how to bisect these kernel changes and I've found a pretty comfortable solution right now, I wasn't really bothered by what happened

Kkisak-valve maintainer 2020-05-08 github

That makes it sound like there's a sub-optimal kernel config in Manjaro's stock kernel build, or possibly a gcc compiler change which was added around the same time as the security mitigations. Since we haven't heard anything productive in the last couple years, it's unlikely any more progress is going to happen here.

You may have better luck bringing this to the attention of your distro's package maintainers for their kernel, after confirming that this is still happening with a fully updated system.

Nothing extracted yet.