Problem installing nvidia drivers

New to Debian (Or Linux in general)? Ask your questions here!

Problem installing nvidia drivers

Postby phaedo7 » 2018-11-04 19:44

I am trying to install nvidia drivers for my debian 9 stretch. I have followed the instructions on debian wiki. I have also tried couple of youtube tutorials. I dont get any problems during installation. Its only after reboot. On rebooting I am stuck with error which says:
Code: Select all
[FAILED] Failed to start Load Kernel Modules
See 'systemctl status systemd-modules-load.service' for details


I have tried following a lot of tutorials for nvidia drivers including debian wiki. But regardless what I do, I always get this error and I, without any choice, have to reinstall debian. Also, when this error occurs, I try doing stuff in recovery mode. But I cannot do much since I dont have internet access in recovery mode.
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby Head_on_a_Stick » 2018-11-04 19:54

phaedo7 wrote:the instructions on debian wiki

^ This should work, please post the *exact* method that you used so that we can see where you went wrong (we're not psychic).

Also, have you actually tried nouveau? I hear it is very good these days :)

EDIT: don't follow YouTube videos, they are made by idiots for idiots (generally speaking).
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8167
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-04 20:19

I tried lots of different things but ended up with same problem. But here are the general steps I followed after installing debian:

1. Edited sources.list using
Code: Select all
nano /etc/apt/sources.list
by adding contrib non-free after every "main"

2.
Code: Select all
sudo apt-get update
and
Code: Select all
sudo apt-get upgrade


3.
Code: Select all
apt-get install nvidia-detect
and detected my graphics card

4.
Code: Select all
dpkg --add-architecture i386
and
Code: Select all
apt-get install libavcodec-extra
(from youtube tutorial)

5.
Code: Select all
apt-get install firmware-linux-nonfree
and
Code: Select all
apt-get install firmware-linux


6. Step 5 gave me warnings that I miss some firmware, so I googled it and found a solution. I used:
Code: Select all
sudo apt install firmware-misc-nonfree firmware-netxen firmware-realtek
sudo update-initramfs -u
sudo apt-cache policy firmware-linux-nonfree
sudo apt-get install firmware-linux-nonfree
sudo apt-get update


7.
Code: Select all
sudo apt-get install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//')


8.
Code: Select all
sudo apt-get install nvidia-settings nvidia-driver nvidia-opencl-common

I have also tried
Code: Select all
apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-driver
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby stevepusser » 2018-11-04 20:33

Code: Select all
apt-get install libavcodec-extra

(from youtube tutorial)


Yeah...libavcodec has zip, nada, nothing at all to do with Nvidia drivers. That only reinforces HOAS's comment about the YT videos. Even funnier/sadder are the Kali videos.

Maybe it's something to do with your hardware setup. Can you install inxi and report the output of (as a standard user, NOT with sudo or as root)

Code: Select all
inxi -G
?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10122
Joined: 2009-10-06 05:53

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-04 20:37

This is output I get after
Code: Select all
inxi -G


Code: Select all
Graphics:  Card-1: Intel HD Graphics 5500
           Card-2: NVIDIA GM108M [GeForce 940M]
           Display Server: X.Org 1.19.2 drivers: modesetting,nouveau (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.05hz
           GLX Renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2)
           GLX Version: 3.0 Mesa 13.0.6
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby piper » 2018-11-04 22:01

Enable [non-free] in sources if you haven't already, since you tried installing nvidia-driver already, your better off starting from scratch

You can skip this if already done

Code: Select all
dpkg --add-architecture i386


Code: Select all
apt update


make sure you include the period
Code: Select all
apt purge nvidia.


Code: Select all
apt update; apt install nvidia-driver nvidia-driver-libs nvidia-settings nvidia-kernel-dkms


Reboot

Edit:: You have an Intel video card also, so the above won't work, I will leave the post for others to benefit, I don't know what shape bumblebee is in nowadays or even if it still works
User avatar
piper
 
Posts: 62
Joined: 2005-07-03 08:29

Re: Problem installing nvidia drivers

Postby stevepusser » 2018-11-04 23:29

OK, your Intel card is handling the display, so when you told the system to use the Nvidia card for display--black screen. Just to make sure, is this a laptop you're using?
If it's a desktop, can you disable the integrated Intel GPU in the UEFI/BIOS setup?

Another, easier to remember way to make sure your system is prepared to build kernel modules (like Nvidia) is to install module-assistant and run as root or with sudo:
Code: Select all
m-a prepare


and I didn't even have to make a video about that tip. :roll:
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10122
Joined: 2009-10-06 05:53

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-05 15:14

I installed module assistant and did m-a prepare. After that I installed the headers and Nvidia drivers as instructed in Debian wiki. After reboot, finally, didn't get the error of Failed to start Load Kernel Module. However this time I ran into another problem. Now the system doesn't boot and it gets stuck on a message which looks like

Code: Select all
/dev/sda2: clean ...... files, .......blocks


sda2 is where my ext4 file system is loaded.
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby stevepusser » 2018-11-05 17:41

Is this a laptop (second try)?

Better yet, give us the result of
Code: Select all
inxi -Fxz
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10122
Joined: 2009-10-06 05:53

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-05 18:02

It is a laptop(my bad). Here is the output: https://imgur.com/a/Nt5Ljwm
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby stevepusser » 2018-11-05 19:08

OK, that's what I thought. You have Optimus, and you must follow the procedure in the wiki for setting up Bumblee instead of just installing the Nvidia drivers if you want to keep the power savings this affords.

https://wiki.debian.org/NvidiaGraphicsDrivers/Optimus
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10122
Joined: 2009-10-06 05:53

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-05 20:42

Just to be sure. Do I still need module assistant for setting Nvidia drivers via bumblebee ?

Thanks advance
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby Head_on_a_Stick » 2018-11-05 20:44

phaedo7 wrote:Do I still need module assistant for setting Nvidia drivers via bumblebee ?

Only if you want to use the proprietary drivers, nouveau doesn't need the headers and will work with Bumblebee.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8167
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem installing nvidia drivers

Postby phaedo7 » 2018-11-05 20:55

Basically, let me boil down to this. I want to use my GPU for using tensorflow and other deep learning stuff that uses GPU. Given this you can suggest me the best thing for it.

Thank you again
phaedo7
 
Posts: 7
Joined: 2018-11-04 19:36

Re: Problem installing nvidia drivers

Postby Head_on_a_Stick » 2018-11-05 21:02

CUDA needs the blob, if that's what you mean.

If you need to run non-free software then Debian probably isn't the best choice, IMO.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8167
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable