SEE BOTTOM FOR SOLUTION
I have a very bad situation that makes working with Kali 2.0 a huge headache.
My laptop will shutdown [seemingly unexpectedly] when performing certain tasks.
More info on the shutdown here: https://forums.kali.org/showthread.p...nagement-issue
But please, do not get stuck on that. This thread is about NVIDIA drivers.
Specs:
Mobo: HP ENVY dv7-7212nr Notebook PC
CPU: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz/HM77
Display: 1920x1080
!!!!//VERY IMPORTANT:
GPU:
NVIDIA GeForce GT 650M[DiscreteGPU]
Intel(R) HD Graphics 4000 [Integrated]
//
After lots of troubleshooting, I have confirmed it is an issue with the nouveau drivers(or some other issue with GPU on linux). How do I know this?
1) Only happens on Kali [and probably other Linux distros, havent tried others yet] (OSX and Windows are fine)
2) If I run airodump-ng while terminal is MINIMIZED I can run it for hours. If however, the terminal is visable (and thus actively updating, the shutdown will happen).
3) This happens even on a LiveUSB Kali (verified checksum)
4) I can run airodump-ng while in failsafe (aka no GUI) for hours with no issue at all.
So, now that I have isolated the issue- I can just install the NVIDIA Driver and be on with life right?
WRONG. That is why I am posting this- I am having no luck getting the NVIDIA Drivers to "work."
================================================== ================================================== ========
Keep in mind with each attempt I just flat out clean-installed Kali. So no, the methods did not conflict because they were attempted on separate installs.
================================================== ================================================== ========
Method one (what I first tried):
- Install kernel headers, and dkms
Code:
apt-get update
apt-get dist-upgrade
apt-get install -y linux-headers-$(uname -r) dkms
- Download Nvidia driver installation, and change its permissions to executable
Code:
wget http://us.download.nvidia.com/XFree8..._64-352.55.run
chmod +x NVIDIA-Linux-x86_64-352.55.run
- Prevent nouveau from loading
Code:
sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
update-grub
reboot
- Once rebooted, switch to a virtual console (ctrl+alt+f1 for instance) and stop the gdm3 service
Code:
service gdm3 stop
- Run the nvidia driver installation
Code:
./NVIDIA-Linux-x86_64-352.55.run
- During the installation, choose yes to register the kernel module with DKMS, and no to install 32-bit compatibility libraries
---------------
This worked- but unfortunately I get the dreaded blinking cursor. I can still access the virtual console with CTRL+ALT+F1. I tried some other things to try to get it working such as deleting xconfig, rebuilding it, modifying it- no dice. Same result or I ended up with the "Oh no" screen. For all intents and purposes, the above failed.
================================================== ================================================== ==========
Method two (what I recorded [see video])
// Keep in mind this was method was originally for KALI LINUX 1.1.0 - Kernel 3.18- however the owner of blackmoreops.com claimed he had recieved feedback stating his guide worked on Kali 2.0, so I gave this method a try.
// The full guide is here, but I just made a text-only version for easier following along.
// http://www.blackmoreops.com/2015/02/...nvidia-driver/
// Source for claim that it works on 2.0: http://www.blackmoreops.com/2015/08/...tion-feedback/
[Note that the kali repo has version 352.21 opposed to the latest 352.55.run file [released only a few days ago, so that is expected]
[Ironically the shutdown crash happens at 0:21! - I almost opened terminal (not sure if I did sadly) this was a rare example of an instant-failure!]
Note, this was only after running updates, not any modifications yet- which is why nouveau is likely culprit.
Video:
https://vimeo.com/143578560
- PRE-CHECK
//
lsmod | grep nouveau
uname -a
lsb_release-a
lspci | grep VGA
//
- PRE-Update
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
reboot
//
- Driver PART 1
-- Headers:
aptitude -r install linux-headers-$(uname -r)
-- NVIDIA Kernel:
apt-get install nvidia-kernel-$(uname -r)
-- DRIVER KERNEL DKMS
aptitude install nvidia-kernel-dkms
-- INSTALL XCONFIG
aptitude install nvidia-xconfig
-- GENERATE XCONFIG
nvidia-xconfig
reboot
//
- Driver PART 2
-- Adding PCI Bus to xorg.conf
lspci | grep VGA
cp /etc/X11/xorg.conf (SPACE)/etc/X11/old-xorg.conf.prechangeofBUSID
nano /etc/X11/xorg.conf
Identifier "DiscreteNvidia"
BusID "PCI:01:00.0" - '.' Or ':'? - tried both ways
reboot
//
-- CHECK STATUS // I forgot to do this in the video, I took a picture of the output see after steps
glxinfo | grep -i "direct rendering"
lsmod | grep nvidia
lsmod | grep nouveau
||| glxinfo | grep -i outputs "No display"
||| lsmod | grep nvidia
||| lsmod | grep nouveau does not output anything (which is good)
//
-- Troubleshooting A
nvidia-xconfig
reboot
-- Troubleshoot B
rm /etc/X11/xorg.conf
reboot
-- Troubleshoot C
apt-get remove nvidia-kernel-dkms
reboot
-- Troubleshoot D - what a joke !
apt-get remove --purge nouveau
================================================== ================================================== ========================
Okay! So these are two methods I tried, and it results in a blinking cursor.
Important! After following this (and before doing the troubleshooting)
The --CHECK STATUS section outputs:
Error: unable to open display.
Image of checks:
Hmm, suspicious.
So, here are all the outputs (uploaded to pastebin) of all the installation commands.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
http://pastebin.com/rJvnwZP5
aptitude -r install linux-headers-$(uname -r)
http://pastebin.com/U2NK5JdV
apt-get install nvidia-kernel-$(uname -r)
http://pastebin.com/LQst8cs1
aptitude install nvidia-kernel-dkms
http://pastebin.com/M0P2cdhA
aptitude install nvidia-xconfig
http://pastebin.com/uudLPjAX
Something I noticed:
Possible pinpoint of the issue:
Code:
{COMMAND:}apt-get install nvidia-kernel-$(uname -r)
{OUTPUT:}
...
Get:5 http://http.kali.org/kali sana/contrib nvidia-modprobe amd64 340.46-1 [14.5kB]
Get:6 http://http.kali.org/kali sana/non-free nvidia-alternative amd64 352.21-1~kali2 [144kB]
Get:8 http://http.kali.org/kali sana/non-free nvidia-kernel-4.0.0-kali1-amd64 amd64 352.21+1kali1+1~kali1+4.0.4-1+kali2 [5,011 kB]
Removing diverted 'libGL.so' symlink with unexpected target 'libGL.so.1.2.0'.
Restoring diverted 'libGL.so' symlink
//
{COMMAND:}aptitude install nvidia-kernel-dkms
{OUTPUT:}
nvidia-current:
Running module version sanity check.
Error! Module version 352.21 for nvidia-current.ko
is not newer than what is already found in kernel 4.0.0-kali1-amd64 (352.21)
You may override by specifying --force.
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- Found /lib/modules/4.0.0-kali1-amd64/nvidia/nvidia-uvm.ko
- Storing in /var/lib/dkms/nvidia-current/original_module/4.0.0-kali1-amd64/x86_64/
//
Could this be the conflict?
I am unsure.
Any advice of what to do would be GREATLY appreciated as I am at a dead end!
Edit:
youtube
Edit:
vimeo
Edit 11/27/2015
SOLUTION: Install any other Linux Distro, install tools Kali 2.0 has: profit$$
Now I can run cudahashcat, I have no crashing, no shutdown issues, and can do everything Kali could do...
Why is Kali considered a useful OS for pen testing? The answer: It just has most pen-testing tools preinstalled.
Trust me, its not worth running this buggy OS; Install the tools on a better distro.