Extreme FPS lag in Minecraft 1.12.2 (Profile in post)

I’m getting extreme FPS lag in a Minecraft 1.12.2 modpack I made, and a Spark Unforged profile shows this is occuring in LibC Pthread. Any tips on how to fix this? Or is this a bug?

On Fedora 40.

It would help to know what hardware and software you are using.
What does `inxi -Fzxx’ report?

You may need to install inxi sudo dnf install inxi.
Please use preformatted text for the output, the </> button.

System:
  Kernel: 6.10.4-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: GNOME v: 46.4 tk: GTK v: 3.24.43 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 40 (Workstation Edition)
Machine:
  Type: Desktop Mobo: Asus model: PRIME B360M-A v: Rev X.0x
    serial: <superuser required> part-nu: ASUS_MB_CNL UEFI: American Megatrends
    v: 0805 date: 08/03/2018
CPU:
  Info: 6-core model: Intel Core i5-9400F bits: 64 type: MCP arch: Coffee Lake
    rev: A cache: L1: 384 KiB L2: 1.5 MiB L3: 9 MiB
  Speed (MHz): avg: 800 min/max: 800/4100 cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 bogomips: 34798
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1660] vendor: Micro-Star MSI
    driver: nvidia v: 555.58.02 arch: Turing pcie: speed: 2.5 GT/s lanes: 16
    ports: active: none off: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 01:00.0
    chip-ID: 10de:2184
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.2
    compositor: gnome-shell driver: gpu: nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: HDMI-A-1 model: LG (GoldStar) FULL HD res: 1920x1080 dpi: 102
    diag: 551mm (21.7")
  API: OpenGL v: 4.6.0 vendor: nvidia v: 555.58.02 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce GTX 1660/PCIe/SSE2
    display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel
    v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a348
  Device-2: NVIDIA TU116 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:1aeb
  Device-3: Logitech H390 headset with microphone
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 1-6:2 chip-ID: 046d:0a8f
  API: ALSA v: k6.10.4-200.fc40.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
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
  IF: wlp4s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK RTL8111H driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 05:00.0 chip-ID: 10ec:8168
  IF: enp5s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 1-11:5 chip-ID: 8087:0aa7
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.2
    lmp-v: 8
Drives:
  Local Storage: total: 4.99 TiB used: 98.01 GiB (1.9%)
  ID-1: /dev/sda vendor: Western Digital model: WDS480G2G0A-00JH30
    size: 447.13 GiB speed: 6.0 Gb/s serial: <filter>
  ID-2: /dev/sdb vendor: Western Digital model: WD10EZEX-08WN4A0
    size: 931.51 GiB speed: 6.0 Gb/s serial: <filter>
  ID-3: /dev/sdc vendor: Seagate model: BUP BK size: 3.64 TiB type: USB
    rev: 3.0 spd: 5 Gb/s lanes: 1 serial: <filter>
Partition:
  ID-1: / size: 1.34 TiB used: 53.74 GiB (3.9%) fs: btrfs dev: /dev/sda3
  ID-2: /boot size: 973.4 MiB used: 451.2 MiB (46.4%) fs: ext4
    dev: /dev/sda2
  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
    dev: /dev/sda1
  ID-4: /home size: 1.34 TiB used: 53.74 GiB (3.9%) fs: btrfs dev: /dev/sda3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 34.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB available: 31.25 GiB used: 3.15 GiB (10.1%)
  Processes: 317 Power: uptime: 34m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: flatpak pkgs: 26 Compilers: clang: 18.1.6 gcc: 14.2.1
    Shell: Bash v: 5.2.26 running-in: gnome-terminal inxi: 3.3.34

I have installed the NVidia drivers from RPMFusion since my original post, and now get an error stating that GLX configs can’t be created on all MC versions.

Can you post the full error message and command you ran?

The Minecraft error? The GLX config error comes up in the game log when launching the game.

To state the obvious I cannot see your screen.

You have to show us what you see. If it not possible as text then a screen shot of the error.
Without that information people have to guess what might be going on and that is hard.

I just found an issue report on Prism Launcher’s Github that has a possible solution for this. Will test that and report back.

EDIT: Both issues are now fixed.