Steam not detecting nVidia GPU, falling back to llvmpipe

Hey, it’s more nVidia troubles! :tada:

So one day, randomly, some stuttering started to occur, mostly on YouTube, but the GNOME shell started to lag after longer usage. It got annoying and I wanted to re–install the GPU driver (NVIDIA GeForce GTX 1050). Some errors and problems later, I wiped the drivers to install them completely anew following guides from RPMFusion and Fedora Project. This endeavour though…made things worse…

Not only did the issues not disappear, now Steam cannot load the NVIDIA driver at all! This is what Steam system information panel shows:

Operating System Version:
    "Fedora release 37 (Thirty Seven)" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  6.1.18-200.fc37.x86_64
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12014000
    X Window Manager:  GNOME Shell

Video Card:
    Driver:  Mesa/X.org llvmpipe (LLVM 15.0.7, 256 bits)
    Driver Version: 4.5 (Compatibility Profile) Mesa 22.3.7
    OpenGL Version: 4.5
    Monitor Refresh Rate: 143 Hz
    Revision Not Detected
    Number of Monitors:  1
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 1920 x 1080
    Primary VRAM Not Detected

Games that ran before just fine are barely playable. They all start, sure, but even TES5: Oblivion from 2006 (fresh install) runs at 1~2 FPS! Newer games run better, but it’s still quite unplayable. YouTube videos still stutter even on a clean browser with no extensions, so I just started watching videos using Haruna Player.

I then tried installing the drivers again to no avail, then again using nvautoinstall, but nothing made a difference. Everything in this tool ran successfully, and I don’t really know what to look for even.

I am quite desperate to be honest, so I’ll be glad for any help or info. I’d prefer not trying to game on Linux, but my PC (Intel Core i7-6700, Z270X-Ultra Gaming-CF) started having trouble running Windows 10, which I have on dual boot just for games, but it hardly holds its own UI. :confused:

inxi output:

Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050] vendor: Micro-Star MSI
    driver: nvidia v: 530.30.02 arch: Pascal pcie: speed: 8 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:1c81
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 22.1.8
    compositor: gnome-shell driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv gpu: nvidia
    display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: HDMI-0 res: 1920x1080 dpi: 70 diag: 801mm (31.54")
  API: OpenGL v: 4.6.0 NVIDIA 530.30.02 renderer: NVIDIA GeForce GTX
    1050/PCIe/SSE2 direct-render: Yes

nvidia-smi works: (and so does nvidia-settings)

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02              Driver Version: 530.30.02    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1050         Off| 00000000:01:00.0 Off |                  N/A |
| 35%   40C    P0               N/A /  75W|    459MiB /  2048MiB |      2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

glxinfo | grep OpenGL:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 530.30.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 530.30.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 530.30.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

and yes, I made sude Secure Boot is off.

I do not believe that version of the nvidia driver has been released by rpmfusion as yet.

Several have reported problems with the nvidia drivers installed from the fedora-cuda repo and it seems the fix for most has been to totally remove those drivers and reinstall from the rpmfusion repo. The rpmfusion repo is one of the third party repos that can be enabled either at install time or through the gnome software app on fedora.
I use the rpmfusion version

$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 525.89.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 525.89.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 525.89.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

$ nvidia-smi
Wed Mar 15 07:17:19 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:09:00.0  On |                  N/A |
| 42%   61C    P0    N/A /  70W |    878MiB /  2048MiB |    100%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
 

Screenshot from 2023-03-15 07-39-24

So, I disabled the official NVIDIA repo and re-installed from RPM Fusion, and it worked! Steam now detects it and games run fine.

However, the stuttering problem is back. I mentioned YouTube, but this happens on every app - every few seconds, a <1 second freeze happens. Any idea how to solve this?

$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 525.89.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 525.89.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 525.89.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 35%   40C    P0    N/A /  75W |    417MiB /  2048MiB |     17%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

Did you happen to also install the cuda driver from rpmfusion ?
dnf install xorg-x11-drv-nvidia-cuda would ensure it is installed.

I have no clue if that may be related to the stuttering, but it potentially could be when using apps with the GPU.