OpenGL applications using LLVMpipe despite nvidia gpu and drivers installed since update

Background:
I was playing Minecraft with some friends last night and found my FPS to be abnormally low, (8-24 vs 40 -70 odd), I’d done a regular update earlier and rebooted but nothing specific to graphics drivers.

Looking through the F3 and glxinfo | grep -i "OpenGL renderer", Open GL is using
llvmpipe (LLVM 13.0.1, 256 bits)
Previously Minecraft would report using the installed NVIDIA GeForce GTX 1070 and I’d installed drivers using the Manjaro Settings panel’s MWHD interface. This has also changed in the “About” section of Gnome Settings

Recently signed up so image can’t be embedded :upside_down_face: imgur/a/pd9p2Gz.png

I’ve been trying to self-solve this issue, but feel a little out of my depth with Nvidia.
prime-run crashes with the error:

$ prime-run glxspheres32
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x2d1 (8/8/8/0)
Visual ID of window: 0x2d
Context is Direct
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  156 (NV-GLX)
  Minor opcode of failed request:  4 ()
  Resource id in failed request:  0x2400002
  Serial number of failed request:  47
  Current serial number in output stream:  47

Apologies for another Nvidia thread, been using Linux for a decade and still can’t seem to make sense of their driver issues.

Output of inxi -Fazy

  Kernel: 5.17.0-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.17-x86_64
    root=UUID=9e7b4fb4-6083-487b-9839-6c354ae91a52 rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: GNOME 41.4 tk: GTK 3.24.31 wm: gnome-shell dm: GDM 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: HP product: OMEN by HP Desktop PC 880-p1xx v: N/A
    serial: <superuser required> Chassis: type: 3 serial: <superuser required>
  Mobo: HP model: 8437 v: 1.3 serial: <superuser required> UEFI: AMI v: F.21
    date: 05/17/2018
CPU:
  Info: model: Intel Core i7-8700 bits: 64 type: MT MCP arch: Coffee Lake
    family: 6 model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xEC
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 927 high: 2326 min/max: 800/4600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 800 9: 800 10: 2326 11: 800 12: 800
    bogomips: 76831
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: Hewlett-Packard
    driver: nvidia v: 510.54 alternate: nouveau,nvidia_drm pcie: gen: 3
    speed: 8 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:1b81 class-ID: 0300
  Device-2: Microdia Webcam Vitade AF type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-5.2.1:12 chip-ID: 0c45:6366
    class-ID: 0102 serial: <filter>
  Display: x11 server: X.org v: 1.21.1.3 compositor: gnome-shell driver: X:
    loaded: N/A failed: nvidia gpu: nvidia note:  X driver n/a - try sudo/root
    display-ID: :1 screens: 1
  Screen-1: 0 s-res: 4920x1920 s-size: <missing: xdpyinfo>
  Monitor-1: DP-1 pos: right res: 1080x1920 hz: 60 dpi: 129
    size: 212x377mm (8.3x14.8") diag: 433mm (17")
  Monitor-2: DP-2 pos: primary,center res: 1920x1080 hz: 60 dpi: 103
    size: 475x267mm (18.7x10.5") diag: 545mm (21.5")
  Monitor-3: DP-4 pos: primary,left res: 1920x1080 hz: 60 dpi: 103
    size: 475x267mm (18.7x10.5") diag: 545mm (21.5")
  OpenGL: renderer: llvmpipe (LLVM 13.0.1 256 bits) v: 4.5 Mesa 21.3.7
    direct render: Yes
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0
    class-ID: 0403
  Device-2: NVIDIA GP104 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 8
    link-max: lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f0 class-ID: 0403
  Device-3: Microdia Webcam Vitade AF type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-5.2.1:12 chip-ID: 0c45:6366
    class-ID: 0102 serial: <filter>
  Device-4: Razer USA RZ19-0229 Gaming Microphone type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-9:9 chip-ID: 1532:0511
    class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.17.0-2-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.20 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.47 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw_8821ce v: N/A modules: rtw88_8821ce
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: c000 bus-ID: 04:00.0
    chip-ID: 10ec:c821 class-ID: 0280
  IF: wlp4s0 state: down mac: <filter>
  Device-3: Realtek RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
    type: USB driver: N/A bus-ID: 1-1:2 chip-ID: 0bda:8812 class-ID: 0000
    serial: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth 4.2 Adapter type: USB driver: btusb v: 0.8
    bus-ID: 1-13:13 chip-ID: 0bda:b00a class-ID: e001 serial: <filter>
  Report: rfkill ID: hci1 rfk-id: 2 state: up address: see --recommends
  Device-2: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB
    driver: btusb v: 0.8 bus-ID: 1-5.4:11 chip-ID: 0a12:0001 class-ID: e001
  Report: ID: hci0 rfk-id: 1 state: up address: N/A
Drives:
  Local Storage: total: 3.32 TiB used: 182.2 GiB (5.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba model: N/A
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s
    lanes: 2 type: SSD serial: <filter> rev: ADHA0101 temp: 61.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Toshiba model: DT01ACA200
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: AC60 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST3500418AS
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC44 scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: Western Digital
    model: WD2500AAKX-603CA0 size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: 1H18
  ID-5: /dev/sdd maj-min: 8:48 vendor: Western Digital
    model: WD6400BEVT-22A0RT0 size: 596.17 GiB block-size: physical: 512 B
    logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A01 scheme: MBR
Partition:
  ID-1: / raw-size: 238.17 GiB size: 238.06 GiB (99.95%)
    used: 182.2 GiB (76.5%) fs: xfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 30.0 C mobo: 27.8 C gpu: nvidia temp: 48 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 32%
Info:
  Processes: 343 Uptime: 1h 6m wakeups: 0 Memory: 31.28 GiB
  used: 4.58 GiB (14.7%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: 1729 pacman: 1714 lib: 378 flatpak: 15
  Shell: fish v: 3.3.1 running-in: terminator inxi: 3.3.13
``

You installed all of them?
Please share from terminal
mhwd -li
If only video-nvidia is listed, then check also this

If more drivers are listed, remove those and reinstall video-nvidia then check the above for early kms part.

video-linux was installed but has been removed and I then went through the steps from your linked post, I hope:

  • I changed MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) in /etc/mkinitcpio.conf
  • Ran sudo mkinitcpio -P
  • Appended GRUB_CMD_LINUX="nvidia-drm.modeset=1" to /etc/default/grub`
  • Ran sudo update-grub
  • Rebooted

$ mhwd -li Reports:

--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2021.12.18               false            PCI


Warning: No installed USB configs!

Still experiencing the same behavior after reboot, sorry for my slow reply to your prompt response

Share the /etc/X11/mhwd.d/nvidia.conf content
By the way, the use of

On your system is not needed … You only have one GPU, hence everything will be rendered trough it.

Please make sure you did not created extra xorg.conf files …

Check the configuration as mentioned here Configure Graphics Cards - Manjaro

When in doubt, run this:

sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

Following your link and command the configuration does not look off to me, but I may be missing something.
Here is the output of $ cat /etc/X11/mhwd.d/nvidia.conf:


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
	Option "NoLogo" "1"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

And $ glxinfo | grep OpenGL still appears to use LLVM:

OpenGL renderer string: llvmpipe (LLVM 13.0.1, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.3.7
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 21.3.7
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

And there is a symlink to that file right?

ls -la /etc/X11/xorg.conf.d/

It appears so:

$ ls -la /etc/X11/xorg.conf.d/
total 4
drwxr-xr-x 2 root root  50 Mar 10 17:19 .
drwxr-xr-x 5 root root  52 Jan 23 12:47 ..
-rw-r--r-- 1 root root 232 Jan 31 21:40 00-keyboard.conf
lrwxrwxrwx 1 root root  27 Mar 10 17:19 90-mhwd.conf -> /etc/X11/mhwd.d/nvidia.conf

My guess is that for some reason (and I saw it now the first time ever), xorg doesn’t load the submodule:

/usr/lib/nvidia/xorg/libglxserver_nvidia.so

Example from /var/log/Xorg.0.log:

[    13.292] (II) Loading sub module "glxserver_nvidia"
[    13.292] (II) LoadModule: "glxserver_nvidia"
[    13.292] (II) Loading /usr/lib/nvidia/xorg/libglxserver_nvidia.so
[    13.425] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[    13.425] 	compiled for 1.6.99.901, module version = 1.0.0
[    13.425] 	Module class: X.Org Server Extension

Reinstalling the driver should be the most simple solution.

sudo mhwd -r video-nvidia
sudo mhwd -i video-nvidia
reboot

I tried those steps, removing video-nvidia and reinstalling. But no change is found in performance.

However, I do find this in the logs you pointed towards:

[    15.587] (**) NVIDIA(0): Enabling 2D acceleration
[    15.587] (II) Loading sub module "glxserver_nvidia"
[    15.587] (II) LoadModule: "glxserver_nvidia"
[    15.587] (WW) Warning, couldn't open module glxserver_nvidia
[    15.587] (EE) NVIDIA: Failed to load module "glxserver_nvidia" (module does not exist, 0)
[    15.587] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[    15.587] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[    15.587] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[    15.587] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[    15.587] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
[    15.587] (II) NVIDIA: The X server does not support PRIME Render Offload.
[    16.425] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    16.425] (--) NVIDIA(0):     DFP-0
[    16.425] (--) NVIDIA(0):     DFP-1
[    16.425] (--) NVIDIA(0):     DFP-2
[    16.425] (--) NVIDIA(0):     DFP-3
[    16.425] (--) NVIDIA(0):     DFP-4
[    16.425] (--) NVIDIA(0):     DFP-5
[    16.425] (--) NVIDIA(0):     DFP-6 (boot)
[    16.425] (--) NVIDIA(0):     DFP-7
[    16.425] (WW) NVIDIA: No DRM device: No direct render devices found.
[    16.425] (II) NVIDIA(0): NVIDIA GPU NVIDIA GeForce GTX 1070 (GP104-A) at PCI:1:0:0
[    16.425] (II) NVIDIA(0):     (GPU-0)

Is nvidia-utils installed?

$ pamac list --files nvidia-utils | grep "libglx"
/usr/lib/nvidia/xorg/libglxserver_nvidia.so
/usr/lib/nvidia/xorg/libglxserver_nvidia.so.1
/usr/lib/nvidia/xorg/libglxserver_nvidia.so.510.54

According to this, yeah.

$ pamac list --files nvidia-utils | grep "libglx"
/usr/lib/nvidia/xorg/libglxserver_nvidia.so
/usr/lib/nvidia/xorg/libglxserver_nvidia.so.1
/usr/lib/nvidia/xorg/libglxserver_nvidia.so.510.54

Here is a list of nvidia stuff that is installed:

$ pamac list | grep nvidia
lib32-nvidia-utils                        510.54-1                      multilib   122.9 MB
linux515-nvidia                           510.54-4                      extra      50.1 MB
linux517-nvidia                           510.54-0.5                    extra      49.2 MB
mhwd-nvidia                               510.54-1                      extra      1.4 kB
mhwd-nvidia-390xx                         390.147-2                     extra      1.9 kB
mhwd-nvidia-470xx                         470.103.01-1                  extra      1.7 kB
nvidia-dkms                               510.54-1                      extra      53.1 MB
nvidia-utils                              510.54-1                      extra      460.6 MB

Sorry for this, it seems to be all the noodles none of the soup.

:arrow_down:

pamac list --installed | grep nvidia

:person_facepalming:

pamac list --installed | grep nvidia
lib32-nvidia-utils                        510.54-1                      multilib   122.9 MB
linux515-nvidia                           510.54-4                      extra      50.1 MB
linux517-nvidia                           510.54-0.5                    extra      49.2 MB
mhwd-nvidia                               510.54-1                      extra      1.4 kB
mhwd-nvidia-390xx                         390.147-2                     extra      1.9 kB
mhwd-nvidia-470xx                         470.103.01-1                  extra      1.7 kB
nvidia-dkms                               510.54-1                      extra      53.1 MB
nvidia-utils                              510.54-1                      extra      460.6 MB
pamac reinstall nvidia-utils
ls -la /usr/lib/nvidia/xorg/

btw… why are both installed?

Chhose dkms or the precompiled one.

Reinstalled nvidia-utils, Removed nvidia-dkms, rebooted. Still no change.
Sorry for the confusion with the dkms, think that was from when I was trying to figure out what was wrong. The 515 and 517 is due to having both kernels installed at present, but I’m running 5.17

$ ls -la /usr/lib/nvidia/xorg/
total 12388
drwxr-xr-x 2 root root      105 Mar 10 19:34 .
drwxr-xr-x 4 root root       30 Mar 10 19:03 ..
lrwxrwxrwx 1 root root       29 Feb 14 19:20 libglxserver_nvidia.so -> libglxserver_nvidia.so.510.54
lrwxrwxrwx 1 root root       29 Feb 14 19:20 libglxserver_nvidia.so.1 -> libglxserver_nvidia.so.510.54
-rwxr-xr-x 1 root root 12684968 Feb 14 19:20 libglxserver_nvidia.so.510.54```

No, idea then :man_shrugging: Do a clean install of everything nvidia related…

1 Like

I gave reinstalling a go, rebooted and no change…
$ pamac list --installed | grep nvidia | awk '{print($1)}' > nvidia_list
$ pamac reinstall (cat nvidia_list ) Running fish, so this syntax is functionally correct

Don’t think I’ve ever rebooted this frequently in my life, thank you for your help though @megavolt
I appreciate your help, I’m lost too

That’s still experimental kernel yet. Try version 5.16 instead.

I have tried 5.17 and 5.15 and had the same issue

Delete the 5.17. Boot with 5.15 and then reinstall xorg-server and nvidia driver.