Fedora 31 uses llvmpipe as default OpenGL renderer instead of Nvidia (nvidia-settings also don't work)

0

I want to use only my Nvidia card on laptop MSI GL63 8RD (Optimus Bumblebee works horrible for me) with Fedora 31 (freshly installed). This is my cards:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)

So i've installed drivers from nvidia.com, removed nouveau and installed it. This was done in multi-user mode (without graphics). Now i have this module loaded:

lsmod | grep nvidia
nvidia_drm             57344  0
nvidia_modeset       1118208  1 nvidia_drm
nvidia              19116032  1 nvidia_modeset
ipmi_msghandler        73728  2 ipmi_devintf,nvidia
drm_kms_helper        212992  2 nvidia_drm,i915
drm                   512000  5 drm_kms_helper,nvidia_drm,i915
lsmod | grep video
uvcvideo              114688  0
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_memops       20480  1 videobuf2_vmalloc
videobuf2_v4l2         28672  1 uvcvideo
videobuf2_common       57344  2 videobuf2_v4l2,uvcvideo
videodev              237568  3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc                     61440  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
video                  49152  2 msi_wmi,i915

But at the same time i have this error with nvidia-settings:

nvidia-settings 

ERROR: Unable to load info from any available system

And this OpenGL renderer:

inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] driver: nvidia v: 430.50 
           Display: x11 server: Fedora Project X.org 1.20.5 driver: modesetting,nvidia unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 9.0 256 bits) v: 3.3 Mesa 19.2.0 

This llvmpipe starts when i open glxgears:

glxgears -info
GL_RENDERER   = llvmpipe (LLVM 9.0, 256 bits)
GL_VERSION    = 3.1 Mesa 19.2.0
GL_VENDOR     = VMware, Inc.

I assume that i can not start Steam games because of that (i was able to do that in openbox started with nvidia-xrun script when i had bumblebee on). My user is in "video" group but it not works.

UPD: This is what dmesg says:

dmesg | grep nvidia
[   22.335524] nvidia: loading out-of-tree module taints kernel.
[   22.335529] nvidia: module license 'NVIDIA' taints kernel.
[   22.341084] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   22.348074] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
[   22.348359] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[   22.764812] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  430.50  Thu Sep  5 22:39:50 CDT 2019
[   22.805422] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   22.805428] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
linux
graphics-card
fedora
optimus
asked on Super User Nov 2, 2019 by DenisNovac • edited Nov 3, 2019 by DenisNovac

1 Answer

0

Thanks to kind sir in this reddit post, i've managed to make this all work (this guide worked for me).

First of all, installation from nvidia.com was a MISTAKE. Installer build kernel modules, which will later conflict with new modules (Fedora had 440.26 modules and nvidia.com had 430.50):

NVRM: loading NVIDIA UNIX x86_64 Kernel Module 430.50 Thu Sep 5 22:36:31 CDT 2019
NVRM: API mismatch: the client has the version 440.26, but
NVRM: this kernel module has the version 430.50. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.

First of all, i've reinstalled the Fedora (made a lot of tweaks that was, apparently, bad for system).

In fresh updated install of Fedora i get fusion repos:

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Then i install nvidia drivers:

dnf install xorg-x11-drv-nvidia

Then i install an update for drivers and xorg from rawhide:

dnf copr enable kwizart/xorg-x11-server_nvidia
dnf update xorg-x11-server\*
dnf install rpmfusion-nonfree-release-rawhide
dnf update --enablerepo=rpmfusion-nonfree-rawhide xorg-x11-drv-nvidia\*

After this i make config:

cat > /etc/modprobe.d/nvidia.conf <<EOF
# Enable DynamicPwerManagement
# http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/dynamicpowermanagement.html
options nvidia NVreg_DynamicPowerManagement=0x02
EOF

Then the guide says to create nvidia.conf:

cp -p /usr/share/X11/xorg.conf.d/nvidia.conf /etc/X11/xorg.conf.d/nvidia.conf

And edit the file to use: Option "PrimaryGPU" "yes" 

But this step just don't work for me. After reboot SDDM won't start and tty with SDDM is just a powered off screen (not even black screen, it is completely off). But even without this config i can use environment variables:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%

[denis@fedora ~]$ inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] driver: nvidia v: 440.26 
           Display: x11 server: Fedora Project X.org 1.20.5 driver: modesetting,nvidia 
           unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.5 Mesa 19.2.2 

[denis@fedora ~]$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] driver: nvidia v: 440.26 
           Display: x11 server: Fedora Project X.org 1.20.5 driver: modesetting,nvidia 
           unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 440.26 

For example, i can load Steam like this and then play games. This is what i've never achieved with Primusrun or Optirun. I didn't find a way to load the entire SDDM with this options but this workaround is already much better then open new xserver with nvidia-xrun.

Also i had problems with Steam install:

sudo dnf install steam
Ошибка:
Проблема: package libglvnd-glx-1:1.1.1-5.fc31.i686 requires mesa-libGL(x86-32) >= 13.0.4-1, but none of the providers can be installed
- package xorg-x11-drv-nvidia-libs-3:440.26-1.fc32.x86_64 requires (xorg-x11-drv-nvidia-libs(x86-32) = 3:440.26-1.fc32 if mesa-libGL(x86-32)), but none of the providers can be installed
- package libva-2.6.0-0.1.fc31.i686 requires libGL.so.1, but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:440.26-1.fc32.x86_64 requires libnvidia-glcore.so.440.26()(64bit), but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:440.26-1.fc32.x86_64 requires libnvidia-tls.so.440.26()(64bit), but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:440.26-1.fc32.x86_64 requires xorg-x11-drv-nvidia-libs(x86-64) = 3:440.26-1.fc32, but none of the providers can be installed
- package steam-1.0.0.61-4.fc31.i686 requires libva(x86-32), but none of the providers can be installed
- package kmod-nvidia-5.3.7-301.fc31.x86_64-3:440.26-1.fc31.x86_64 requires nvidia-kmod-common >= 3:440.26, but none of the providers can be installed
- conflicting requests
- problem with installed package kmod-nvidia-5.3.7-301.fc31.x86_64-3:440.26-1.fc31.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

This is because nvidia drivers are updated from external repo. To make Steam work you need to add this:

sudo dnf install steam --enablerepo=rpmfusion-nonfree-rawhide

Hope this helps.

answered on Super User Nov 3, 2019 by DenisNovac

User contributions licensed under CC BY-SA 3.0