Need help installing new? nvidia drivers

So my end goal is to get Blender to recognize my graphics card. I thought changing the drivers from nouveau to nvidia would help with that. But in the process I have gotten a bit lost and I’m not sure what to do next.

I took help from the manjaro wiki and Here’s what I have done so far:

  1. I checked what drivers I was running by doing:
inxi -G

It showed me that my Nvidia Graphics card was running nouveau driver.

  1. I installed the nvidia drivers by doing:
sudo mhwd -a pci nonfree 0300
  1. Then I rebooted the system and ran:
mhwd -li

and the result is:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

I also ran inxi -G again and it shows the following output:

Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: N/A 
           Display: x11 server: X.Org 1.20.10 driver: modesetting unloaded: intel resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.3.1 

Which shows that the nvidia driver hasn’t been installed.

Now from a post on the forum, I see that there are new 450 drivers instead of 300 (which I have installed if I’m not wrong).

Please guide me through this.

You did everything right. In the next step you should remove video-linux driver or add nouveau driver to blacklist – now your system probably doesn’t know which driver should use so doesn’t use any.

mhwd should’ve already done that.


I think the problem might be that your GPU is not supported by the latest NVIDIA drivers. And for some reason mhwd incorrectly thought that it was supported. Find the PCI device ID of the NVIDIA GPU using lspci -nn, and then check this list and determine if the device ID is before or after the

Below are the legacy GPUs that are no longer supported in the unified driver. These GPUs will continue to be maintained through the special legacy NVIDIA GPU driver releases.

The 390.xx driver supports the following set of GPUs:

text. If it’s after, then you’ll need to remove video-hybrid-intel-nvidia-prime by running sudo mhwd -r pci video-hybrid-intel-nvidia-prime, and then install video-hybrid-intel-nvidia-390xx-bumblebee using sudo mhwd -i pci video-hybrid-intel-nvidia-390xx-bumblebee.

1 Like

So here’s what I have done so far:

  1. Blacklisted nouveau by doing:
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
  1. Checked my device ID of the GPU. It is GeForce GT 720M which is listed as a legacy driver which is supported by the 390.xx drivers. So I removed video-hybrid-intel-nvidia-prime by running:
sudo mhwd -r pci video-hybrid-intel-nvidia-prime
  1. Installed the 390.xx drivers by doing:
sudo mhwd -i pci video-hybrid-intel-nvidia-390xx-bumblebee

But even after that, when i run:

inxi -G

I still get:

Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: N/A 
           Display: x11 server: X.Org 1.20.10 driver: intel resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.3.1 

If I run mhwd -li, I get:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.11.30               false            PCI


Warning: No installed USB configs!
  1. I tried configuring the settings by doing: sudo nvidia-setting and got a message that “You do not appear to be using the NVIDIA X driver. Please edit your X configuration file by running nvidia-xconfig as root, and restart the X servver.”

So I ran:

sudo nvidia-xconfig

which gave me this message:

WARNING: Unable to locate/open X configuration file.

New X configuration file written to '/etc/X11/xorg.conf'

The file looks like this:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 390.138  (buildmeister@swio-display-x64-rhel04-01)  Thu May 14 05:09:33 PDT 2020

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"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
  1. Then I rebooted my system and now when I run sudo nvidia-settings it still displays the same error message that I need to edit my X config. It also displays the following message in the console:
ERROR: NVIDIA driver is not loaded


ERROR: Error querying enabled displays on GPU 0 (Missing Extension).


ERROR: Error querying connected displays on GPU 0 (Missing Extension).


ERROR: nvidia-settings could not find the registry key file. This file should have been installed along with this driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text. Please see the README for possible values and descriptions.

Is there an additional step I’m missing? Does the driver need to be turned on in some way before its useable? Please guide me.

Thanks

This is unnecessary as mhwd already does this. Please undo these modifications.

Do not create any Xorg configuration files unless you need it.


The first thing I’d suggest is removing /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/90-mhwd.conf (if it exists). Then reboot.

This is unnecessary as mhwd already does this. Please undo these modifications.

Okay, I have deleted the /etc/modprobe.d/blacklist-nvidia-nouveau.conf file.

The first thing I’d suggest is removing /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/90-mhwd.conf (if it exists). Then reboot.

Also done. Rebooted. But still the no driver being recognized.
Output of inxi -G is:

Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: N/A 
           Display: x11 server: X.Org 1.20.10 driver: intel unloaded: modesetting resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.3.1 

and output of mhwd -li is:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.11.30               false            PCI

What happens if you run nvidia-modprobe, then inxi -Gazy?

Running nvidia-modprobe gives no visual output.
Running inxi -Gazy gives me this:

Graphics:
  Device-1: Intel Haswell-ULT Integrated Graphics vendor: Dell driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:0a16 
  Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 
  620M/625M/630M/720M] 
  driver: N/A alternate: nouveau, nvidia_drm, nvidia bus ID: 03:00.0 
  chip ID: 10de:1140 
  Display: x11 server: X.Org 1.20.10 compositor: picom v: git-dac85 
  driver: intel unloaded: modesetting alternate: fbdev,vesa display ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
  s-diag: 414mm (16.3") 
  Monitor-1: eDP1 res: 1366x768 hz: 60 dpi: 102 size: 340x190mm (13.4x7.5") 
  diag: 389mm (15.3") 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) 
  v: 4.5 Mesa 20.3.1 compat-v: 3.0 direct render: Yes 

What about lsmod | grep nvidia?

It returns nothing. So that means it doesn’t recognize the drivers…Right?

If you run sudo modprobe nvidia, then lsmod | grep nvidia?

Okay so now it gives me this:

nvidia              15835136  0
ipmi_msghandler        73728  2 ipmi_devintf,nvidia

Output of inxi -G now is:

Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: nvidia v: 390.138 
           Display: x11 server: X.Org 1.20.10 driver: intel unloaded: modesetting resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.3.1 

So the drivers are installed. :star_struck:

Well, Blender still won’t recognize my graphics cards.

And after rebooting the system, the output of inxi -G again shows no drivers installed for the graphics card:

Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: N/A 
           Display: x11 server: X.Org 1.20.10 driver: intel unloaded: modesetting resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.3.1 

I think you need to install CUDA 9.1: cuda-9.1 from the AUR.


The driver is installed on the system, it’s just not loaded for some reason.


What’s the output of sudo dmesg | egrep -i '(nvidia|nouveau)'?

Okay I have installed it. Btw why cuda-9.1 and not some other version?

It doesn’t give any output.

I’m unsure why the driver not loaded automatically. Can you run sudo modprobe nvidia, then sudo modprobe nvidia_uvm?

Running sudo modprobe nvidia gives no output.
Running sudo modprobe nvidia_uvm gives:

modprobe: FATAL: Module nvidia_uvm not found in directory /lib/modules/5.10.2-2-MANJARO

It seems the 5.10 kernel won’t work if you want to use CUDA, so you probably need to switch (e.g.) 5.4.

So I switched to 5.4 and initially it didn’t pickup the driver but then I ran both sudo modprobe nvidia and sudo modprobe nvidia_uvm again. There was no output. But now when i do lsmod | grep nvidia, I get this:

nvidia_uvm            929792  0
nvidia              15835136  1 nvidia_uvm
ipmi_msghandler        69632  2 ipmi_devintf,nvidia

So that means that nvidia_uvm is now also running.

But still, blender does not pick up the graphic card. Could it be that I haven’t installed cuda correctly?

Can you install clinfo and run it to see if at least OpenCL works?