PDA

View Full Version : [TUTORIAL] Installing official NVIDIA driver in Optimus laptop



TiGER511
2017-03-23, 16:28
After spending 4 days in a row,i was finally able to install and run Official NVIDIA driver on my HP Envy 15 laptop.Here is my specs:

CPU: Intel core i7-4510U CPU
GPU #1: Intel HD Graphics 4400
GPU #2: NVIDIA GeForce GTX 850M

My system:

root@linux:~# uname -a
Linux linux 4.9.0-kali3-amd64 #1 SMP Debian 4.9.13-1kali3 (2017-03-13) x86_64 GNU/Linux

root@linux:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2016.2"
VERSION_ID="2016.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"


Before we begin,couple of notes:

***USE AT YOUR OWN RISK***
*This tutorial is for official NVIDIA Driver not Bumblebee
*Tutorial found on official Kali website is BROKEN! It never works for optimus/hybrid Graphics enabled laptop

1. Verify you have hybrid graphics


lspci | grep -E "VGA|3D"

00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
0a:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)

2.Disable nouveau

echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf

update-initramfs -u && reboot


3.system will reboot and nouveau should be disabled.verify if nouveau is disabled:

lsmod |grep -i nouveau
If shows nothing,means nouveau successfully disabled.

4.Install nvidia driver from kali repo:


apt-get install nvidia-driver nvidia-xconfig

You can also download latest .run file from nvidia website.execute and procceed with installation.whether its from kali repo or nvidia website,procedure is same.

5.Now we have to find bus id of our nvidia card:

nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
it should show something like this:
PCI:10:0:0
This is our Bus ID.
6.Now we generate /etc/X11/xorg.conf file with this bus ID according to nvidia guide http://us.download.nvidia.com/XFree86/Linux-x86/375.39/README/randr14.html:

Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:10:0:0"
EndSection

Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection

Section "Screen"
Identifier "intel"
Device "intel"
EndSection


Replace the bold string with your Bus ID and save it to /etc/X11/xorg.conf

7.Now we have to create some scripts according to our display manager https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Display_Managers.Since im using default Kali linux which is GDM,i created two files:
/usr/share/gdm/greeter/autostart/optimus.desktop
/etc/xdg/autostart/optimus.desktop
with the following content:

[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer


8. Now reboot and you should be using Nvidia Driver.Verify if everything is ok:

root@kali:~# glxinfo | grep -i "direct rendering"

direct rendering: Yes

Optional: you can now install your cuda toolkits:

apt-get install ocl-icd-libopencl1 nvidia-cuda-toolkit

FIXING SCREEN TEARING ISSUE:
After you successfully boot up with Nvidia Driver, you most probably experiencing screen tearing issue eg: playing videos in VLC,youtube video on Chrome/Firefox etc.Luckily,we can fix this by enabling PRIME Sync.

1.Verify if PRIME is disabled

xrandr --verbose|grep PRIME
it should output something like this:
PRIME Synchronization: 0
PRIME Synchronization: 1

First one is our connected display.So PRIME sync is disabled.
2. Edit /etc/default/grub and append nvidia-drm.modeset=1 in GRUB_CMDLINE_LINUX_DEFAULT after quiet.Like the following:


....
GRUB_CMDLINE_LINUX_DEFAULT="quiet nvidia-drm.modeset=1"
...

3.Save the changes.Update grub


update-grub


4.Reboot your system.
5.Verify if PRIME is enabled:


xrandr --verbose|grep PRIME


Now it should output:
PRIME Synchronization: 1
PRIME Synchronization: 1

If it still shows 0 for you,then there is probably something wrong with your system config/kernel.Since this is still an experimental feature from Nvidia,you are out of luck.

***IF YOU STUCK IN BOOT SCREEN***
Revert what we have done so far:
Press CTRL+ALT+F2 or CTRL+ALT+F3 ,login with your password.

apt-get remove --purge nvidia*
rm -rf /etc/X11/xorg.conf

Remove those display manager files we created earlier (for GDM):

rm -rf /usr/share/gdm/greeter/autostart/optimus.desktop
rm -rf /etc/xdg/autostart/optimus.desktop

Now reboot.you should be able get back to your old system.

_defalt
2017-03-26, 09:47
Thanks for this info. Installing Nvidia drivers is a big overhead for most of the users. The kali-linux documentation has broken tutorial for this. They only tell you how to install it if you have only dedicated Nvidia graphic card. Today's PC comes with both integrated and dedicated Intel HD graphics and Nvidia GEforce. How did you find out that following all those commands would work? There must be something you were able to figure out.

TiGER511
2017-03-26, 11:30
Thanks for this info. Installing Nvidia drivers is a big overhead for most of the users. The kali-linux documentation has broken tutorial for this. They only tell you how to install it if you have only dedicated Nvidia graphic card. Today's PC comes with both integrated and dedicated Intel HD graphics and Nvidia GEforce. How did you find out that following all those commands would work? There must be something you were able to figure out.

I had to spend a lot of time figuring it out.most of the infromations i got was from nvidia dev forum,Nvidia installation guide and the archlinux wiki.I just put togther all the information.

ignispider
2017-04-01, 23:52
Hi there.
I want to thank you for this excelente tuto. This was THE ONLY ONE that worked for me.
I've been searching for the solution for many days, removing and reinstalling nvidia with a low bandwitdth connection. I think the point is the xorg.conf and display manager configuration you found on offical docs.
Now I have nvidia running on my kali thanks to you.
Spread the word and make this possible for others.
Very nice, man. Good job.

Homi576
2017-04-04, 14:38
Mate you are an absolute F**kin legend, this has been giving me endless problems and at the end of last year I decided to give up then today I thought I would look to see if anyone had managed to do it and this worked perfectly, thanks for sharing this info THIS needs to be in the documentation!

TiGER511
2017-04-04, 17:56
You are welcome mate.Really appreciate it.I've updated the article with screen tearing fix.

darthsoul
2017-04-07, 22:44
Man you really saved me from lots of trouble. but i need to switch between nvidia and intel boards for reasons of battery saving. i cant see PRIME tab on xServer settings how can i switch ?

TiGER511
2017-04-08, 17:57
Man you really saved me from lots of trouble. but i need to switch between nvidia and intel boards for reasons of battery saving. i cant see PRIME tab on xServer settings how can i switch ?

You can not switch gpu with official nvidia driver on linux.If you wanna switch between gpus,you have to use bumble bee which is unofficial.Nvidia Linux drivers only supports nvidia card to be operated.

_defalt
2017-04-09, 13:19
What if I blacklist Nvidia driver? Will kali switch to Intel HD graphics?

TiGER511
2017-04-09, 14:38
Maybe you have to use different xorg.conf file. even if you blacklist Nvidia driver, you can not switch graphics card on demand like in windows with this procedure. you have to restart and change xorg.conf everytime you want to change GPU.why would anyone wanna do that?
If you really want power saving, try bumble bee.There is very good tutorials regarding bumble bee in this forum.

darthsoul
2017-04-10, 06:30
Maybe you have to use different xorg.conf file. even if you blacklist Nvidia driver, you can not switch graphics card on demand like in windows with this procedure. you have to restart and change xorg.conf everytime you want to change GPU.why would anyone wanna do that?
If you really want power saving, try bumble bee.There is very good tutorials regarding bumble bee in this forum.

Thanks for the reply. i saw it on ubuntu forums that it can be switched withing nvidia x server software but its not the case with kali it seems. are they any disadvantages using bumblebee instead of this method ?

TiGER511
2017-04-10, 20:42
Thanks for the reply. i saw it on ubuntu forums that it can be switched withing nvidia x server software but its not the case with kali it seems. are they any disadvantages using bumblebee instead of this method ?

well i haven't really heard anything like that.as far as i know,nvidia driver starts up with xorg server,if you wanna switch then xorg.conf has to be changed and then the xorg server has to be restarted so it uses new config file.

I haven't used bumblebee,so i don't really know. but bumblebee should be power effeicient since you can turn on/off dGPU like in Windows.

abhijeet
2017-05-05, 21:48
Hello mates, after struggling a lot installing many times kali ,following many guides none work except this . I was also decided to give up on this and all those feelings of other users who struggled a lot like me and then you have found easter egg. thanks a lot bro @TIGER511. As other mentioned this tutorial should be on kali linux official site .

Can u post the link or if u don't mind tutorial on installing bumblebee?please.thanks

TiGER511
2017-05-05, 22:00
Hello mates, after struggling a lot installing many times kali ,following many guides none work except this . I was also decided to give up on this and all those feelings of other users who struggled a lot like me and then you have found easter egg. thanks a lot bro @TIGER511. As other mentioned this tutorial should be on kali linux official site .

Can u post the link or if u don't mind tutorial on installing bumblebee?please.thanks

I know your feelings.I was one of them as well.spent months figuring it out,several attempt was made without any success.

Anyway here is your link to bumblebee tutorial: https://forums.kali.org/showthread.php?21956-(Guide)-Installing-Nvidia-Bumblebee-CUDA-for-Optimus-enabled-Laptops

danielmai
2017-05-08, 07:49
Dude, this is absolutely the best guide on the internet.
But in step 7, what if I want to use LXDE or other DM which are not in your list?

MatLab
2017-05-15, 22:10
@TiGER511 you are the greatest!

I do have 2 questions (and these maybe either my lack of understanding or being very sleep deprived)

But I am completely lost on steps 6 & 7. Do I click the links and follow those instructions?

I did "glxinfo | grep -i "direct rendering"" and it returned with a yes so idk if I am good to go or not b/c when I did the "xrandr --verbose|grep PRIME" it doesn't return with any responses.


On 4k screen everything was working perfectly but once I installed nvidia drivers the tool bars on programs became huge and so did the buttons. But the taskbar is at it's original size. idk why this is...been through the settings and all

NErau
2017-05-18, 13:29
Good Job !!!!!!!!!!!1

TiGER511
2017-05-20, 05:52
Dude, this is absolutely the best guide on the internet.
But in step 7, what if I want to use LXDE or other DM which are not in your list?

You can try with "~/.xinitrc" ,it may work.

TiGER511
2017-05-20, 05:56
@TiGER511 you are the greatest!

I do have 2 questions (and these maybe either my lack of understanding or being very sleep deprived)

But I am completely lost on steps 6 & 7. Do I click the links and follow those instructions?

I did "glxinfo | grep -i "direct rendering"" and it returned with a yes so idk if I am good to go or not b/c when I did the "xrandr --verbose|grep PRIME" it doesn't return with any responses.


On 4k screen everything was working perfectly but once I installed nvidia drivers the tool bars on programs became huge and so did the buttons. But the taskbar is at it's original size. idk why this is...been through the settings and all

You don't have to follow instruction on these link if you are using GDM and not having trouble.I've mentioned those source articles just in case anyone need any explanation or have different setups.Just follow these steps as it is,should work fine.

do you have xrandr installed? what is the output of "xrandr --verbose"

hydn
2017-05-24, 21:20
After spending 4 days in a row,i was finally able to install and run Official NVIDIA driver...

Signed up to say THANK YOU! This was day 3. I can be productive again lol AND get some sleep.

starsin
2017-06-09, 05:49
Does this still work with the 2017.1 version?

TiGER511
2017-06-13, 21:50
Does this still work with the 2017.1 version?

yes it works on 2017.1 version.

chaopac
2017-06-14, 03:51
Does anyone know what the stuck at boot occurs? I have a system with a Nvidia 960M and a Intel HD 530, but after I followed the guide I got stuck at boot with the line part where there are a bunch of green [OK] check with information next to them. I got stuck at different lines with different reboot.

Also at the very top I got a


[FAILED] Failed to start Load Kernel Modules

tmoran1116
2017-06-14, 14:34
I'm having some difficulty installing the driver and wonder if anybody could help me.
I've got an ASUS Q551LN.
It has a hybrid video setup with Intel 4400 combined with NVidia GT 840M graphics cards.


For the life of me I can't get the NVidia driver working.
Following the steps listed here:
1) I've verified that both cards are seen by running lspci ....
2) I've blackisted nouveau and updated initramfs and verified that the module is not loaded.
4) I've tried installing the driver via apt get and running the installed downloader from NVidia (fresh separate installs).
5) Running: nvidia-xconfig --query-gpu-info
I get an error stating that it cannot query the gpu--it is present in lspci
6) There is also no xorg.conf file

When I reboot the laptop it starts with some text (something about mount, not video related) on top of the screen and the text will change color.
I could open another terminal by using alt-ctrl-f2.

My other info:
Kali 2017 was up to date in all attempts to get this working.
The laptop is touch screen, but that doesn't seem to be an issue.
The laptop is UEFI, and I have to use UEFI as the BIOS has almost no options that could be changed by the user.
As an aside note, the laptop boots very quickly.
I can't change any graphics options in the BIOS other than memory allocation.

Does anybody have any suggestions?

Thanks in advance.

TiGER511
2017-06-17, 08:05
Does anyone know what the stuck at boot occurs? I have a system with a Nvidia 960M and a Intel HD 530, but after I followed the guide I got stuck at boot with the line part where there are a bunch of green [OK] check with information next to them. I got stuck at different lines with different reboot.

Also at the very top I got a


[FAILED] Failed to start Load Kernel Modules

which nvidia driver you tried to install? was it from nvidia.com or apt-get? also does uninstalling remove the error?

TiGER511
2017-06-17, 08:10
I'm having some difficulty installing the driver and wonder if anybody could help me.
I've got an ASUS Q551LN.
It has a hybrid video setup with Intel 4400 combined with NVidia GT 840M graphics cards.


For the life of me I can't get the NVidia driver working.
Following the steps listed here:
1) I've verified that both cards are seen by running lspci ....
2) I've blackisted nouveau and updated initramfs and verified that the module is not loaded.
4) I've tried installing the driver via apt get and running the installed downloader from NVidia (fresh separate installs).
5) Running: nvidia-xconfig --query-gpu-info
I get an error stating that it cannot query the gpu--it is present in lspci
6) There is also no xorg.conf file

When I reboot the laptop it starts with some text (something about mount, not video related) on top of the screen and the text will change color.
I could open another terminal by using alt-ctrl-f2.

My other info:
Kali 2017 was up to date in all attempts to get this working.
The laptop is touch screen, but that doesn't seem to be an issue.
The laptop is UEFI, and I have to use UEFI as the BIOS has almost no options that could be changed by the user.
As an aside note, the laptop boots very quickly.
I can't change any graphics options in the BIOS other than memory allocation.

Does anybody have any suggestions?

Thanks in advance.

You can always change your UEFI boot to legacy boot from bios.You should have something called "Enable CSM" in your bios which enables legacy boot.The error seems like your GPU is not powered on for some reason as it can not query the gpu.Try reinstalling kali in legacy bios mode.

There will not be any xorg.conf file by default.you have to create it as i've stated in my post.

stephen5512
2017-07-03, 14:32
hey i follow your guide step by step but it doesnt work with me, i stuck at bootloop but after i remove the nvidia it return like it used to. how im going to install nvidia driver
00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
01:00.0 3D controller: NVIDIA Corporation Device 179c (rev a2)
that is my hybrid gpu

stephen5512
2017-07-04, 11:22
hi it work for me im not stuck at boot loop but when i check the screen tearing xrandr --verbose|grep prime
PRIME Synchronization: 0
PRIME Synchronization: 1
PRIME Synchronization: 1
there is 3 prime synchronization

TiGER511
2017-07-09, 13:20
there is 3 prime synchronization

I think you have external monitor connected? just apply my fix and see what happens.

abhijeet
2017-07-10, 16:55
Hello TIGER511 ,
I had kept automatic update off after installing nvidia but two days back I put it on and updates were downloaded automatically after which i was installing them and it got stuck on tor browser, after than i aborted the process which results in booting problem. Than i ran "dpkg --configure -a" from recovery mode to bring it back in previous state . So my question is whether should i keep my automatic updates on because at the starting i was getting update and my os was also running smooth?
AND have you use bumblebee?
Sorry for my English if i am wrong somewhere.
Thank You

anguilla1980
2017-07-21, 17:43
On step 7, I'm using the Kali build with KDE, I don't see KDE mentioned in the link. Any idea how I should go about step 7?

Thanks! I have an Acer with an Intel HD 520 and an nVidiaGeForce 940mx, this is gonna be a life saver!

nonkronk
2017-08-14, 10:28
Everyone has his own heroes.
My heroes?
You're one of them.
Just created this account to say HUGE THANKS!

Kali Linux 2017.1

Muqeeth786
2017-08-19, 16:56
Hi mate i had problem in installing the drivers
i followed every tutorials in internet and at last tried you tutorial but no result of fking nvidia drivers
My laptop specs are:
1.Intel® Core™ i7-7700HQ CPU @ 2.80GHz × 8
2intel graphics=Intel® Kabylake GT2
3.Nvidia=geforce gtx 1050M
4.8 gigs of ram
5.128 gb nvme ssd

My system


root@kali-Killer:~# uname -a
Linux kali-Killer 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux


root@kali-Killer:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.1"
VERSION_ID="2017.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"

Started steps of nvidia drivers


root@kali-Killer:~# lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

I sucessfully disabled nouveau


echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf
update-initramfs -u && rebootr

From this step I install nvidia drivers


apt-get install nvidia-driver nvidia-xconfig

after installing the drivers i restarted my laptop and shows me sad emoji symbol of crash
and i went into recovery mode uninstall nvidia drivers to back to old intel graphics

first i thought that nvidia didn't made CUDA toolkit for gtx 1050M
so i went into some forums and searched cuda toolkit for my gpu
some members said me that cuda toolkit support every gpu
but why my gpu sucks

so i hope you can fix this problem and sorry for my bad English

hydn
2017-08-23, 13:54
Optional: you can now install your cuda toolkits:

Dumb question. I Google that CUDA is for equations. What could I use CUDA for? Will is help with the GPUs regular desktop and gaming performance?

Thanks?

izen
2017-08-23, 19:47
Hi guys, im needing help!

this command didn't work

nvidia-xconfig --query-gpu-info

so i uninstall the nvidia driver and now i cant log in gdm, the login screen appears but dont go to desktop.

i see this error after run journalctl

kali /usr/lib/gdm3/gdm-x-session: unable to run X server

someone know how can i fix this?
thanks!

doron11
2017-08-24, 13:37
thanks for the toturial!! i would update that the latest .run file from nvidia webside does not work with this guide at the moment.

question: if i want to install nvidia drivers and cuda support on my desktop with nvidia card (gtx 970) , can i skip steps 5-6-7 or i have to follow?

izen
2017-08-25, 20:25
Hi guys, im needing help!

this command didn't work

nvidia-xconfig --query-gpu-info

so i uninstall the nvidia driver and now i cant log in gdm, the login screen appears but dont go to desktop.

i see this error after run journalctl

kali /usr/lib/gdm3/gdm-x-session: unable to run X server

someone know how can i fix this?
thanks!

i saw the log of nvidia-uninstall and nvidia-installer


/var/log/nvidia-uninstall.log
/var/log/nvidia-installer.log


And i found out that the nvidia removed the xserver-xorg in the installation and when i uninstalled an error happened when they try to back to original

ERROR: Failed to run '/usr/bin/nvidia-xconfig --restore-original-backup'

so to fix my problem i had to reinstall the xserver-xorg

krooked1
2017-08-30, 21:32
I am using Kali 2017.1 with an ASUS ROG G771JM laptop containing Intel 4th Gen Integrated Graphics and an nVidia GM107M GeForce GTX 860M. As of August 30, 2017 this tutorial worked wonders for me.
Thank you so very much OP! I, like many others users, stumbled upon several other tutorials before finding yours. It should be no surprise to you that none of them worked. I appreciate you taking the time and energy to create this tutorial that, once completed, had me grinning ear to ear! Once again, thank you VERY much bro!!

GiammyA7X
2017-09-12, 08:14
I'm trying to install Nvidia driver on my custom Desktop PC, i followed the tutorial, disabled nouveau and installed nvidia drivers with

apt-get install nvidia-driver nvidia-xconfig
at the step 5 when I type

nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6


i have
ERROR: Unable to query GPU Information

Can someone help me please? There is one week I'm trying to fix this and I dont want to give up.
I've a MSI Z97 gaming 5 as mobo with Intel HD Graphics 4600 and GTX970 as GPU
My system:

root@KaliThresh:~# uname -a
Linux KaliThresh 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux


root@KaliThresh:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.2"
VERSION_ID="2017.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"

aciang
2017-09-18, 18:53
Optional: you can now install your cuda toolkits:

apt-get install ocl-icd-libopencl1 nvidia-cuda-toolkit

after this step , i managed to install it and i can boot until desktop but all my menu is blank / missing , i only can right-clicks and open terminal
any solution?

TiGER511
2017-10-19, 14:07
Hello TIGER511 ,
I had kept automatic update off after installing nvidia but two days back I put it on and updates were downloaded automatically after which i was installing them and it got stuck on tor browser, after than i aborted the process which results in booting problem. Than i ran "dpkg --configure -a" from recovery mode to bring it back in previous state . So my question is whether should i keep my automatic updates on because at the starting i was getting update and my os was also running smooth?
AND have you use bumblebee?
Sorry for my English if i am wrong somewhere.
Thank You

There is no such problem for me with automated updates.i always keep my machine up to date and didn't had anything broken so far.If something breaks,you can always repeat the process again and it should be fixed.

And no,i didn't use bumblebee. I want to use my Nvidia GPU all the time since i paid for it.


On step 7, I'm using the Kali build with KDE, I don't see KDE mentioned in the link. Any idea how I should go about step 7?

Thanks! I have an Acer with an Intel HD 520 and an nVidiaGeForce 940mx, this is gonna be a life saver!

For KDE,follow the link on step 7 and use LightDM configs.


Optional: you can now install your cuda toolkits:

apt-get install ocl-icd-libopencl1 nvidia-cuda-toolkit

after this step , i managed to install it and i can boot until desktop but all my menu is blank / missing , i only can right-clicks and open terminal
any solution?

This happens if you mess up on step 7.Can you provide screenshot of your problem?


I'm trying to install Nvidia driver on my custom Desktop PC, i followed the tutorial, disabled nouveau and installed nvidia drivers with

apt-get install nvidia-driver nvidia-xconfig
at the step 5 when I type

nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6


i have
ERROR: Unable to query GPU Information

Can someone help me please? There is one week I'm trying to fix this and I dont want to give up.
I've a MSI Z97 gaming 5 as mobo with Intel HD Graphics 4600 and GTX970 as GPU
My system:

root@KaliThresh:~# uname -a
Linux KaliThresh 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux


root@KaliThresh:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.2"
VERSION_ID="2017.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"


This guide is for Muxless Laptop GPU only.For desktop you can just install nvidia driver regularly and connect your monitor to Nvidia HDMI port.Or maybe you can disable intel GPU from bios?


thanks for the toturial!! i would update that the latest .run file from nvidia webside does not work with this guide at the moment.

question: if i want to install nvidia drivers and cuda support on my desktop with nvidia card (gtx 970) , can i skip steps 5-6-7 or i have to follow?

I think so.


Hi mate i had problem in installing the drivers
i followed every tutorials in internet and at last tried you tutorial but no result of fking nvidia drivers
My laptop specs are:
1.Intel® Core™ i7-7700HQ CPU @ 2.80GHz × 8
2intel graphics=Intel® Kabylake GT2
3.Nvidia=geforce gtx 1050M
4.8 gigs of ram
5.128 gb nvme ssd

My system


root@kali-Killer:~# uname -a
Linux kali-Killer 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux


root@kali-Killer:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.1"
VERSION_ID="2017.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"

Started steps of nvidia drivers


root@kali-Killer:~# lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

I sucessfully disabled nouveau


echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf
update-initramfs -u && rebootr

From this step I install nvidia drivers


apt-get install nvidia-driver nvidia-xconfig

after installing the drivers i restarted my laptop and shows me sad emoji symbol of crash
and i went into recovery mode uninstall nvidia drivers to back to old intel graphics

first i thought that nvidia didn't made CUDA toolkit for gtx 1050M
so i went into some forums and searched cuda toolkit for my gpu
some members said me that cuda toolkit support every gpu
but why my gpu sucks

so i hope you can fix this problem and sorry for my bad English
Follow all the steps properly.You can not reboot right after installing driver.you have to follow the steps accordingly then reboot.

abhijeet
2017-10-22, 16:09
There is no such problem for me with automated updates.i always keep my machine up to date and didn't had anything broken so far.If something breaks,you can always repeat the process again and it should be fixed.

And no,i didn't use bumblebee. I want to use my Nvidia GPU all the time since i paid for it.


Thanks for the reply. Looks like you were busy.:) I figured out after that and i too do regular updates without any problem now.;)

carloxrojo
2017-11-06, 04:59
Hey dude, can you pls help me? I did every step successfully but after i write the optimus.desktop files i get stuck at boot screen, and I am forced to revert the changes, and i cant install the drivers...., is there a way to work around this issue?
my system is:
"Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.4-2kali1 (2017-10-16) x86_64 GNU/Linux"
"00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)"

2nd_Shot
2017-11-09, 00:14
Total noob here. Just wanted to say 'THANK YOU!!!' I'm about 2 days into figuring this out. Finally have a boot without the bumz.

hassoun
2017-11-11, 18:57
Every step went perfect till this point:

xrandr --verbose|grep PRIME
I always get:

PRIME Synchronization: 0

And also updating grub


update-grub
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: nvidia-drm.modeset=1: not found


I use KDE desktop. So I assumed my display manager is SDDM

So I have this file with the following content



cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


What could be wrong?

TiGER511
2017-11-30, 15:37
Hey dude, can you pls help me? I did every step successfully but after i write the optimus.desktop files i get stuck at boot screen, and I am forced to revert the changes, and i cant install the drivers...., is there a way to work around this issue?
my system is:
"Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.4-2kali1 (2017-10-16) x86_64 GNU/Linux"
"00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)"

Which display manager you are using?

TiGER511
2017-11-30, 15:39
Every step went perfect till this point:

xrandr --verbose|grep PRIME
I always get:

PRIME Synchronization: 0

And also updating grub


update-grub
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: nvidia-drm.modeset=1: not found


I use KDE desktop. So I assumed my display manager is SDDM

So I have this file with the following content



cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


What could be wrong?

Setting drm.modeset is not mandatory and it has no relation with display manager.this options is for getting rid of screen tearing.Did you get the driver wroking first?

itzo
2017-12-11, 12:38
Hi,
I just installed the NVIDIA-Driver on my Notebook. All is working okay but i tryed to install Steam and now i am becoming the error: You are missing the following 32 bit libraries, and Steam may not run:libgl.so.1. Any Ideas ?

TiGER511
2017-12-11, 16:00
Hi,
I just installed the NVIDIA-Driver on my Notebook. All is working okay but i tryed to install Steam and now i am becoming the error: You are missing the following 32 bit libraries, and Steam may not run:libgl.so.1. Any Ideas ?

see here : https://ubuntuforums.org/showthread.php?t=2233005

xperiago
2017-12-12, 21:30
Thanks for your effort, to take the time to prepare and share to others.

100% Working.

System info:


Linux admin 4.14.0-kali1-amd64 #1 SMP Debian 4.14.2-1kali1 (2017-12-04) x86_64 GNU/Linux

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.3"
VERSION_ID="2017.3"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"


Commands output:


glxinfo | grep -i "direct rendering"
direct rendering: Yes

xrandr --verbose|grep PRIME
PRIME Synchronization: 1
PRIME Synchronization: 1
PRIME Synchronization: 1
PRIME Synchronization: 1

Hardware info:


system ASUS N550JK (ASUS-NotebookSKU)
processor Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
display GM107M [GeForce GTX 850M]
display 4th Gen Core Processor Integrated Graphics Controller

itzo
2017-12-12, 22:31
Hi,
I just installed the NVIDIA-Driver on my Notebook. All is working okay but i tryed to install Steam and now i am becoming the error: You are missing the following 32 bit libraries, and Steam may not run:libgl.so.1. Any Ideas ?

For all the users with the same problem, this helped me: apt install nvidia-driver-libs:i386

fnails
2017-12-13, 17:47
Hello,

First thank you for your tutorial, it lightens a lot of the obscure procedure for installing Kali!
However...but unfortunately it seems it doesn't work on my macbook (MacBook Pro 6,2).

From one side it seems that the integrated Intel graphics doesn't work well

[] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled
[] intel ips 0000:00:1f.6: request ire failed, aborted

on the other hand it seems that the NVIDIA GT330M discrete graphic card doesn't work too. I followed your procedure and at the second step by blacklisting nouveau drivers, Kali cannot arrive until the login page (while before it freeze after the login).
By installing legacy drivers (the newest don't support GT330M) Kali blocks as well...

If I list the available devices however I can see both the GPU, Intel and Nvidia.

I am running out of ideas, do you have any?

TiGER511
2017-12-14, 10:19
Hello,

First thank you for your tutorial, it lightens a lot of the obscure procedure for installing Kali!
However...but unfortunately it seems it doesn't work on my macbook (MacBook Pro 6,2).

From one side it seems that the integrated Intel graphics doesn't work well

[] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled
[] intel ips 0000:00:1f.6: request ire failed, aborted

on the other hand it seems that the NVIDIA GT330M discrete graphic card doesn't work too. I followed your procedure and at the second step by blacklisting nouveau drivers, Kali cannot arrive until the login page (while before it freeze after the login).
By installing legacy drivers (the newest don't support GT330M) Kali blocks as well...

If I list the available devices however I can see both the GPU, Intel and Nvidia.

I am running out of ideas, do you have any?

I have no idea about Macbook ecosystem.I've tried it on regular laptops only.Are you sure your GPU is supported by the Nvidia drvier?Because it seems very old card.Optmius was very different back then.My Guide is for muxless system only.Since your laptop is old,i think its muxed.

eliasps
2017-12-31, 17:33
Hello Forum,

Just registered to send my regards to the OP for this tutorial.
I've been trying to activate my nVidia graphics without any results, but it finally works following the steps of this tutorial.
Thank you OP!
And thanks to the forum in general for your contribution.

Best regards,
Elias

AlphaXMagnus
2018-01-04, 09:19
Just registered to say this.. I've got a Dell Inspiron 15 gaming laptop GTX 1050 i5-7300HQ. I did all the steps got to step 5 and nothing worked. The PCI wouldn't show. sat on it for 30 mins... ran back through the suggestions. I figured well wipe it and start again. Upon purge nvidia** i booted back into the login screen logged in had a hunch.. and bam it worked.. lol i literally really dont know what i did besides just wipe the apt-get install nvidia-driver nvidia-xconfig install and reboot into the login. I hope that helps anyone. If you've got questions I can try to help trace my steps and hope they help you. Thanks for the info OP'er.

DoctorSpace
2018-01-04, 16:04
So, I ran through all the steps on the tutorial, but looks like I'm still having an issue.

As it starts to boot, I get [FAILED] Failed to start Load Kernel Modules, and then it runs through some other checks and stops on [OK] Started Update UTMP about System Runlevel Changes.

Can't get into a terminal from here. Thoughts on what to do?

EDIT: Post finally got approved, so let me give you some more info.
I was able to purge the Nvidia drivers and get back to where I started, and here's everything I noticed.

First off it's an MSI GS63VR Stealth Pro Laptop
Nvidia GTX 1060 Geforce graphics
i7-7700HQ Processor
16GB RAM

Whenever I use
update-initramfs -u
or
apt-get install nvidia-driver nvidia-xconfig

At the end I get hit with
"WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead."

And upon using
nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
I get an error stating it can't query the GPU, but it shows up in lspci

And then if I run through the whole tutorial I'm hit with the error I mentioned at the top of the post. Does Kali just not like to place nice with the 1060? I've looked around the forums and it seems the people having the same issue all have the same graphics card as I.

TiGER511
2018-01-06, 03:20
Just registered to say this.. I've got a Dell Inspiron 15 gaming laptop GTX 1050 i5-7300HQ. I did all the steps got to step 5 and nothing worked. The PCI wouldn't show. sat on it for 30 mins... ran back through the suggestions. I figured well wipe it and start again. Upon purge nvidia** i booted back into the login screen logged in had a hunch.. and bam it worked.. lol i literally really dont know what i did besides just wipe the apt-get install nvidia-driver nvidia-xconfig install and reboot into the login. I hope that helps anyone. If you've got questions I can try to help trace my steps and hope they help you. Thanks for the info OP'er.


So, I ran through all the steps on the tutorial, but looks like I'm still having an issue.

As it starts to boot, I get [FAILED] Failed to start Load Kernel Modules, and then it runs through some other checks and stops on [OK] Started Update UTMP about System Runlevel Changes.

Can't get into a terminal from here. Thoughts on what to do?

EDIT: Post finally got approved, so let me give you some more info.
I was able to purge the Nvidia drivers and get back to where I started, and here's everything I noticed.

First off it's an MSI GS63VR Stealth Pro Laptop
Nvidia GTX 1060 Geforce graphics
i7-7700HQ Processor
16GB RAM

Whenever I use
update-initramfs -u
or
apt-get install nvidia-driver nvidia-xconfig

At the end I get hit with
"WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead."

And upon using
nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
I get an error stating it can't query the GPU, but it shows up in lspci

And then if I run through the whole tutorial I'm hit with the error I mentioned at the top of the post. Does Kali just not like to place nice with the 1060? I've looked around the forums and it seems the people having the same issue all have the same graphics card as I.

I think there is a problem with Pascal GPUs in Linux.Try the latest 390 Driver and let me know how it goes:
http://www.nvidia.com/download/driverResults.aspx/128743/en-us

Please attach screenshot/picture/logs if you are having problems.

d4ma7or
2018-01-08, 03:17
To the OP i just wanted to say THANK YOU so mch for sharing. i probably reinstalled kali 10 times in the process of getting the nvidia drivers working before i stumbled upon this page.

Ekynox360
2018-01-27, 21:06
1. Why four processes are shown with the command nvidia-smi ?

two /usr/lib/xorg/Xorg and two /usr/bin/gnome-shell ?

2. Is there a way to switch from the Intel chip to the Nvidia chip (not necessarily dynamically)? I personally tried bumblebee but I couldn't get the Nvidia module unloaded.

3. Are there any configurations to apply to reduce GPU power consumption in portable mode?

Thx :)

TiGER511
2018-01-27, 22:41
1. Why four processes are shown with the command nvidia-smi ?

two /usr/lib/xorg/Xorg and two /usr/bin/gnome-shell ?

2. Is there a way to switch from the Intel chip to the Nvidia chip (not necessarily dynamically)? I personally tried bumblebee but I couldn't get the Nvidia module unloaded.

3. Are there any configurations to apply to reduce GPU power consumption in portable mode?

Thx :)

1) There is always duplicate xorg adn gnome-shell process in nvidia-smi .I myself is looking for an explanation of this.

2) If you install nvidia driver driver by this tutorial,it wil always use nvidia chip.If you want to use intel chip later on without uninstalling nvidia,i think it is possible,but it will be a lot of hassle.

3) To reduce power consumption ,you can turn off Nvidia GPU altogther with ACPI.

Ekynox360
2018-02-03, 17:10
3) To reduce power consumption ,you can turn off Nvidia GPU altogther with ACPI.

I didn't find the way to blacklist nvidia drivers.

bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

I run 384.111.

TiGER511
2018-02-04, 01:15
I didn't find the way to blacklist nvidia drivers.

bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

I run 384.111.

You need to uninstall all drivers for nvidia,blacklist nouveau, and make sure you are currently on intel driver only.then you can run acpi command to switch it off completely.there are lots of tutorial on the internet on how to switch of gpu with acpi.

dorianpro
2018-02-10, 15:28
Hi guys,

This is my first post and just tried the solution on the below configuration without having any issues. I normally used another solution but TiGER511's one is better and takes less time which I thank him for and give him the credit for being useful. I mention that I did most part from the terminal, NO GUI. I personally thought it was safer.

Anyway, good luck with everything and have a marvelous weekend!

HARDWARE
Laptop ACER Predator Helio 300 17inch / Series PH317-51-78R9
Intel® Core™ i7-7700HQ CPU @ 2.80GHz

SYSTEM
Linux 4.14.0-kali3-amd64 #1 SMP Debian 4.14.13-1kali1 (2018-01-25) x86_64 GNU/Linux

VERSION


DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.1"
VERSION_ID="2018.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"

HYBRID GRAPHICS


00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060] (rev a1)

RESULT

All working fine, no tearing, no lags, smooth, fonts are better displayed/rendered, you just have to play a bit with your display's refresh rate if it's the case, that's all folks

https://preview.ibb.co/kyHat7/details.png

SeVaS
2018-02-26, 04:14
You have a good tek here and I commend your effort. I successfully installed the nvidia proprietary driver on my system.

I would like to make a few suggestions on edits to your tek that I think are absolutely necessary.

1) You need to tell people that the Proprietary NVIDIA driver ( the .run file) isnt fully compatible with Kali and is not recommended.

When
apt-get system returns "Nvidia.run conflicts with Kali. Please uninstall. Would you like to do that now?" Tell it 'No' and it hangs.

2) You need to change the part about removing NVIDIA* >>
apt-get remove --purge nvidia*

Tell people this is potentially dangerous, as it could break graphics ability and aptitude.


https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631938

see glx-diversions

occurs when attempting to reinstall Nvidia drivers/ system crash/ ill configured xorg.conf



Recommend instead to remove packages individually and make notes of installed pkgs.
apt-get remove --purge nvidia-xconfig nvidia-driver ocl-icd-libopencl1 nvidia-cuda-toolkit


Im not really sure what I did to cause my issue, but I **** sure tried everything that I could find, so many thats the problem. But either way, I think you should warn people about the possibility of a Black Hole through GLX. This bug has been going on since 2011 and still hasnt been fixed.

But again. Thank you for the tutorial! I gave up and tried things on google and came back here only to find that this was it. My experiments with google are what really got me stuck. This worked, but then I tried to update the xorg.conf on my own and do some other silly **** and ended up in a Black Hole.

mkd98
2018-02-28, 20:32
Thank you so much for posting guide!

TheDutch1
2018-03-02, 20:19
Wanted to say thank you as well! Really appreciate the time and effort into figuring this out.

Karado
2018-03-21, 17:56
First, BIG thanks to @TiGER511

I can confirm it works beautifully with Kali 2018.1

One slight issue in my case:

Step #8:

glxinfo | grep -i "direct rendering"

gave me the following:

bash: glxinfo: command not found

Fix:

apt-get install mesa-utils

WORKING beautifully!!!

manaratz
2018-04-11, 14:15
Hi,

I used this tutorial a few weeks ago and it worked perfectly on my laptop with a 960M.
But I had to redo a fresh install, and since, when I get to this step :

nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
I get this error :

ERROR: Unable to query GPU Information

Do you have any idea ?

slimou
2018-05-05, 20:01
Hello Tiger!

Ok first thak you this tutorial, I followed all the steps, got the same results and everything seems to work. But when I need to use hashcat here's what I get :

# hashcat -I
hashcat (v4.1.0) starting...
No devices found/left.

And when I use --force it uses the intel GPU :(

# hashcat -m 2500 -a 3 Desktop/Slimos/slimos.hccapx 69696969 --force
hashcat (v4.1.0) starting...

OpenCL Platform #1: The pocl project
====================================
* Device #1: pthread-Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz, 4096/13816 MB allocatable, 8MCU


I don't understand why it's not working, do you have any clues ? please help!

Thanks,

Ekynox360
2018-05-07, 17:44
Hi,

Any possibility to switch between Nvidia GPU and Intel onboard GPU without having to remove the Nvidia stack ?

I would like to be able to use my graphics card only when I need it and therefore disable it when I don't need it.

Thx

ismail.shiwani
2018-05-14, 03:49
Work perfect,
Really appropriate time you spent on this tutorial.

nord
2018-05-28, 20:24
Fore those needs you can use bumblebee "https://wiki.archlinux.org/index.php/bumblebee"

nord
2018-05-28, 20:48
Hello

I am also stucked on boot.

I tried use this tutorial on clean Kali 2018.2

Here is my info:

uname -a

Linux home 4.15.0-kali3-amd64 #1 SMP Debian 4.15.17-1kali1 (2018-04-25) x86_64 GNU/Linux


cat /etc/*release*

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.2"
VERSION_ID="2018.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"



lspci | grep -E "VGA|3D"

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev a2)


I am not sure about step 6 "generating /etc/X11/xorg.conf". I used nvidia-xconfig for generating /etc/X11/xorg.conf and injected my BusID there.

Maybe somebody have the same issue and know what to do.

Thank you.

snehith
2018-05-30, 20:23
hello,

I am trying to install the GPU driver on my pc(Kali Linux) following the procedure you have explained.

I was struck in the middle.ERROR: Unable to query GPU information
It was installed the Nvidia-drivers using the command you mentioned in the 4th step.
Then when I am trying to find the bus ID of the GPU, it's giving an error

when i ran
nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6

The output i got was

ERROR: Unable to query GPU information

Please help me find the solution

sebas
2018-05-30, 23:23
Hey,
This issue has been haunting me for while now and its **** frustrating trying to solve it. i got my hopes up when i found this post :) but after step 7 i restarted and got stuck on the boot screen like many users and a complete freeze. i used the gdm display script like the orginal post assuming that would be also my display manager. however i do not know if that is the issue and if i’m suppose to use another script or how to know what display manager to use. Appreciate all the help that is possible, i’m pretty close breaking the laptop in pieces🤬

lorkes
2018-06-04, 20:04
A few months ago i tried this tutorial on kali 2017.x (don't remember which one) and everything worked. Now doing the same on 2018.1 but I'm getting an

libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/blacklist-libnfc.conf line 2: ignoring bad line starting with 'options'
error after step 2. Can anybody help me to fix it? My system:

root@kali:~# uname -a
Linux kali 4.14.0-kali3-amd64 #1 SMP Debian 4.14.12-2kali1 (2018-01-08) x86_64 GNU/Linux

root@kali:~# cat /etc/*release*
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.1"
VERSION_ID="2018.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"
BUG_REPORT_URL="http://bugs.kali.org/"
Laptop Acer Aspire with:
Intel Pentium N3710
Intel HD Graphics 405
NVIDIA GeGorce 920MX

Kshitij Mishra
2018-06-05, 05:52
Hey man , i m seeing everyone getting successful with your tutorial,but i find my self uncluky ,after completing step 7 i have rebooted my laptop and it got stucked at the login in screen which turned out black.
now i hav reverted the steps .i have used apt get for installing the drivers .
1. I m using nvidia Geforce 630m
2. Asus K55v series (laptop)
3.using kali rolling .
hoing a reply soon :).

CandiedPixel
2018-07-07, 02:17
Alright so after I run update-initramfs -u , I get that same feedback of WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead. I get this feedback message both running that previous command as well as at the end of the NVidia driver install. I have tried MANY different techniques to make this NVidia Card work and I am just having the hardest time. I have, however, become incredibly proficient at getting nouveau back up and running without rebooting after the nvidia driver doesnt allow my gui to initialize.

Linux CandiedPixel 4.16.0-kali2-amd64 #1 SMP Debian 4.16.16-2kali1 (2018-06-25) x86_64 GNU/Linux
Im running an Alienware 17R3
i7 Skylake
GPU: Nvidia GTX 970M

joyc3
2018-07-08, 16:36
Thanks for this, I lost a lot of time trying to install and NVDIA good thing I found this thread very helpful I just wish a found it sooner :)

TiGER511
2018-07-12, 00:14
Hey man , i m seeing everyone getting successful with your tutorial,but i find my self uncluky ,after completing step 7 i have rebooted my laptop and it got stucked at the login in screen which turned out black.
now i hav reverted the steps .i have used apt get for installing the drivers .
1. I m using nvidia Geforce 630m
2. Asus K55v series (laptop)
3.using kali rolling .
hoing a reply soon :).

Where did you download NVIDIA drivers from? did you install it from NVIDIA website or via apt-get?
Also try removing nvidia driver with the last step and reinstalling again from scratch.


Alright so after I run update-initramfs -u , I get that same feedback of WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead. I get this feedback message both running that previous command as well as at the end of the NVidia driver install. I have tried MANY different techniques to make this NVidia Card work and I am just having the hardest time. I have, however, become incredibly proficient at getting nouveau back up and running without rebooting after the nvidia driver doesnt allow my gui to initialize.

Linux CandiedPixel 4.16.0-kali2-amd64 #1 SMP Debian 4.16.16-2kali1 (2018-06-25) x86_64 GNU/Linux
Im running an Alienware 17R3
i7 Skylake
GPU: Nvidia GTX 970M


You can ignore that warning.After installation,what symptoms do you get?

spidersec
2018-07-15, 10:54
you saved my neck bro <3 thank you

CandiedPixel
2018-07-15, 16:38
So once the installation is complete and I update everything and reboot, I quite literally get nothing, it gets to a certain point in the boot sequence and just stops. Ive checked around to see if others have had this issue and it seems rather prominent, unfortunately I cant seem to find any 100 percent fixes to the issue!

vel
2018-07-19, 23:02
So, I ran through all the steps on the tutorial, but looks like I'm still having an issue.

As it starts to boot, I get [FAILED] Failed to start Load Kernel Modules, and then it runs through some other checks and stops on [OK] Started Update UTMP about System Runlevel Changes.

Can't get into a terminal from here. Thoughts on what to do?

EDIT: Post finally got approved, so let me give you some more info.
I was able to purge the Nvidia drivers and get back to where I started, and here's everything I noticed.

First off it's an MSI GS63VR Stealth Pro Laptop
Nvidia GTX 1060 Geforce graphics
i7-7700HQ Processor
16GB RAM

Whenever I use
update-initramfs -u
or
apt-get install nvidia-driver nvidia-xconfig

At the end I get hit with
"WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead."

And upon using
nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
I get an error stating it can't query the GPU, but it shows up in lspci

And then if I run through the whole tutorial I'm hit with the error I mentioned at the top of the post. Does Kali just not like to place nice with the 1060? I've looked around the forums and it seems the people having the same issue all have the same graphics card as I.

I have the same laptop as you and it works using Tiger's tutorial.

With a fresh install, immediately blacklist nouveau with this step:


echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf

Make sure to do an update and upgrade, reboot. After rebooting get the header files for your kernel


apt-get install -y linux-headers-$(uname -r)

Then continue to install as per Tiger's tutorial.

Note that lspci will give you output like this: 01:00.0

Running the query to get the bus ID will give you this output: 1:0:0

The second query is the proper format for the xorg.conf file.


TiGER511 thanks for a great tutorial!! I do have one question though.. after installing the kernel, nvidia creates a nvidia-blacklists-nouveau.conf just blacklisting nouveau.. Does this conf file replace the one we created with the echo statement? If so, can we delete the manually created conf file since nvidia has created its own?

Also, I am not sure I totally understand how this conf file is invoked? we created it, put the code in, then ran the sed command.. How is the sed command tied to the conf file?

Again thanks it is working for me !

abhijeet
2018-08-05, 07:36
Hi there i have NVIDIA GTX 860M and i was using nvidia smoothly until and unless i updated it last week. Usually i always update it but never got any problem but this time it got stuck after rebooting.
So after that i finally decided to uninstall the driver and then to start installing it with scratch. Everything was going smooth and then i got stuck at 5th step as i can see other people are also having the same problem.
when i ran this command it throws this error:


nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
ERROR: Unable to query GPU information

i was installing nvidia via apt-get. Any solution for this please?

bjo1112
2018-08-16, 10:16
Hi there i have NVIDIA GTX 860M and i was using nvidia smoothly until and unless i updated it last week. Usually i always update it but never got any problem but this time it got stuck after rebooting.
So after that i finally decided to uninstall the driver and then to start installing it with scratch. Everything was going smooth and then i got stuck at 5th step as i can see other people are also having the same problem.
when i ran this command it throws this error:

i was installing nvidia via apt-get. Any solution for this please?


For those having same problem try to do what vel suggested.

Tried it and it worked for me

abhijeet
2018-08-18, 19:11
For those having same problem try to do what vel suggested.

Tried it and it worked for me

Thanks for the reply but i forgot to mention that this command is not working for me throwing some error:

apt-get install -y linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.15.0-kali2-amd64
E: Couldn't find any package by glob 'linux-headers-4.15.0-kali2-amd64'
E: Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'

So i already tried that solution but no luck:(

bjo1112
2018-08-19, 04:19
Thanks for the reply but i forgot to mention that this command is not working for me throwing some error:


So i already tried that solution but no luck:(

put this in your sources.list (etc/apt/sources.list)

deb http://http.kali.org/kali kali-rolling main contrib non-free

deb http://old.kali.org/kali moto main non-free contrib

deb http://old.kali.org/kali sana main non-free contrib

deb https://dl.winehq.org/wine-builds/debian/ jessie main


then update (apt-get update) and try again

infernoshatt
2018-08-20, 03:34
My System Spec: Asus ROG Strix GL503GE
Core i5 8300H, Nvidia GTX 1050Ti Mobile.
OS: Kali Linux 2018.2

Thanks! my Nvidia driver is working now but I had to follow you and a other guide Kali Linux (https://hackersterminal.com)