sp614x / optifine

1.8k stars 418 forks source link

FPS slowly drops down to 60 when using any shaders (Linux/AMD/Mesa) #4115

Open jmshrv opened 4 years ago

jmshrv commented 4 years ago

When using any shaders (tested Sildur's Enhanced Default, chocapic13, Vanilla Plus), my FPS starts out great (150+ FPS) but slowly drops to 60 over about half an hour. This happens with any shader and even happens if I just stay still for half an hour.

Here are my specs:

System:    Kernel: 5.7.2-arch1-1 x86_64 bits: 64 compiler: gcc v: 10.1.0 
           parameters: root=/dev/mapper/linux--ssd-root rootflags=subvol=@root initrd=intel-ucode.img 
           initrd=initramfs-linux.img 
           Desktop: KDE Plasma 5.19.1 tk: Qt 5.15.0 info: latte-dock wm: kwin_x11 dm: SDDM Distro: Arch Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: Z170M-PLUS v: Rev X.0x serial: <filter> UEFI: American Megatrends v: 3805 
           date: 05/16/2018 
CPU:       Topology: Quad Core model: Intel Core i5-6600K bits: 64 type: MCP arch: Skylake-S family: 6 model-id: 5E (94) 
           stepping: 3 microcode: D6 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28009 
           Speed: 800 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB filling 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort mitigation: Clear CPU buffers; SMT disabled 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] driver: amdgpu 
           v: kernel bus ID: 03:00.0 chip ID: 1002:731f 
           Display: x11 server: X.org 1.20.8 compositor: kwin_x11 driver: amdgpu resolution: <xdpyinfo missing> 
           OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.37.0 5.7.2-arch1-1 LLVM 10.0.0) v: 4.6 Mesa 20.1.1 
           direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 chip ID: 8086:a170 
           Device-2: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 03:00.1 
           chip ID: 1002:ab38 
           Device-3: Sennheiser Sennheiser Main Audio type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-12:7 
           chip ID: 1395:005d serial: <filter> 
           Sound Server: ALSA v: k5.7.2-arch1-1 
Network:   Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k port: f000 bus ID: 00:1f.6 
           chip ID: 8086:15b8 
           IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 2.50 TiB used: 991.09 GiB (38.7%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda vendor: Seagate model: ST2000DM001-1ER164 size: 1.82 TiB block size: physical: 4096 B logical: 512 B 
           speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: CC26 scheme: MBR 
           ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB block size: physical: 4096 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 023 scheme: GPT 
           ID-3: /dev/sdc vendor: Crucial model: CT120BX500SSD1 size: 111.79 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: R013 scheme: GPT 
           ID-4: /dev/sdd vendor: Samsung model: MZHPV128HDGM-00000 size: 119.24 GiB block size: physical: 512 B 
           logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 500Q scheme: GPT 
Partition: ID-1: / raw size: 457.49 GiB size: 457.49 GiB (100.00%) used: 163.08 GiB (35.6%) fs: btrfs dev: /dev/dm-1 
           ID-2: /boot raw size: 260.0 MiB size: 256.0 MiB (98.46%) used: 75.5 MiB (29.5%) fs: vfat dev: /dev/sdb1 
           ID-3: /home raw size: 457.49 GiB size: 457.49 GiB (100.00%) used: 163.08 GiB (35.6%) fs: btrfs dev: /dev/dm-1 
           ID-4: /var raw size: 457.49 GiB size: 457.49 GiB (100.00%) used: 163.08 GiB (35.6%) fs: btrfs dev: /dev/dm-1 
Swap:      Kernel: swappiness: 10 (default 60) cache pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.00 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-0 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: amdgpu temp: 62 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 1121 
Info:      Processes: 271 Uptime: 56m Memory: 15.58 GiB used: 3.10 GiB (19.9%) Init: systemd v: 245 Compilers: gcc: 10.1.0 
           clang: 10.0.0 Shell: zsh v: 5.8 running in: konsole inxi: 3.1.01 

I am using the latest preview_OptiFine_1.15.2_HD_U_G1_pre26. I have tried both OpenJDK 14 and OpenJDK 8.

TerminalHash commented 4 years ago

I confirm this bug, only on a less powerful configuration. It seems that when using shaders, the frame rate is somehow artificially lowered by itself. Even when using very weak shaders, the FPS falls almost to zero, if you look at the terrain, of course. When looking at the sky or an area free of everything, the FPS tries to stabilize, but it turns out very, very bad.

jmshrv commented 4 years ago

@TerminalHash What are your specs? I'm wondering if this only affects AMD users

TerminalHash commented 4 years ago

My specifications:

[System]
OS:              Void Linux
Arch:            x86_64
Kernel:          5.6.19_1
Desktop:         WindowMaker
Display Server:  x11

[CPU]
Vendor:          AuthenticAMD
Model:           AMD Athlon(tm) II X2 280 Processor
Physical cores:  2
Logical cores:   2

[Memory]
RAM:             7.8 GB
Swap:            8.0 GB

[Graphics]
Vendor:          X.Org
OpenGL Renderer: AMD JUNIPER (DRM 2.50.0 / 5.6.19_1, LLVM 10.0.0)
OpenGL Version:  4.5 (Compatibility Profile) Mesa 20.1.1
OpenGL Core:     4.5 (Core Profile) Mesa 20.1.1
OpenGL ES:       OpenGL ES 3.1 Mesa 20.1.1
Vulkan:          Not Supported
Videocard - AMD Radeon HD 6770 

I forcing OpenGL 4.3 and 4.5 on open driver Radeon, And this situation was repeated equally. Checked by thumb - from the weakest shaders to the most powerful. Naelego's Cel Shaders 1.0.4 ----> bump-shadow-waving-0.9.9 (Tweaked) ----> Chocapic13 Shader v4 Ultra ----> Chocapic13 Shader v7.1 ----> BSL_v7.1.05p2 ----> Sildur's Vibrant Shaders v1.27 Extreme SEUS Shaders not working on Radeon driver It’s not known why, from the v8 to the Renewed versions. All shaders at first showed stable FPS and after a few minutes everything rolled down to almost zero. Without shaders everything is completely stable.

ErikReider commented 4 years ago

I have the same issue on the 1.16.1 release :/

ghost commented 4 years ago

I also report this issue, activating any shader on Linux and the performance will tank immediately, I checked GPU usage and it does not even exceed 15%.

CPU: AMD Ryzen 7 2700X GPU: Nvidia RTX 2060 RAM: 26GB Kernel: 5.6.7-050607-generic Nvidia Driver Version: 450.57

I also tested running Optifine via Wine and I don't get this performance problem, although I have severe I/O lag this way so playing on Wine is not ideal.

gustafla commented 2 years ago

This problem is also happening for me on all Sildur's shaderpacks. For a few seconds the framerate is like expected, 120 or so, and then drops to the low 40s and eventually to under 30. CPU: Ryzen 9 5950X GPU: Radeon Vega 56 RAM 32GB Arch Linux/Linux/Mesa

Tweeprine commented 7 months ago

I can confirm, this bug does not only occur with AMD processors. I've had the same problem for Ubuntu and Linux Mint.

CPU: Intel core i7 11800H GPU: RTX 3050 Ti RAM 16GB

I've had about 16FPS with any shaders, regardless of their performance weight. (fabric with sodium/iris and a bunch of others, 1.19 and 1.20)