0007 Kali Linux installation Nvida graphics driver

Source: Internet
Author: User
Tags kali linux

0007 Kali Linux installation Nvida graphics driver

Now on the internet a bunch of Kali Linux installed on the Nvdia graphics driver tutorial, but a lot of you copy me, I copied you, did not go to the actual verification, resulting in a lot of small partners follow these tutorials installed either did not succeed, or Kali Linux directly can not start. And I'm starting to wonder who wrote these blogs or tutorials, have they personally verified the usability of the tutorials?

I myself was a similar tutorial pit, so in the installation of Nvdia graphics card This thing took a lot of effort, light heavy installation system is not less than 20 times. Fortunately I finally summed up in addition to the inevitable success of the method, through the test of the method of everyone. If you follow my method to successfully install the Nvdia graphics driver, your concern is my biggest motivation, I will continue to experiment, write a better tutorial oh. OK, let's get down to the chase.

Physical machine installed Kali Linux after a very important thing is to install Nvida graphics driver, of course, your computer hardware is to have Nvida graphics card to install, other graphics card I do not have the environment, do not study.

Why install video drivers? If our Kali Linux is a physical machine installation, then the graphical interface is to use the graphics card, if only the use of open-source graphics drivers, your graphics card is completely useless. And in some password cracking or calculation of a large number of operations are required to use the graphics card driver, so on the Kali Linux operating system to install their own physical hardware graphics corresponding driver is necessary.

Because the Kali Linux installation by default installs the open source graphics driver Nouveau, and this is causes our reference network The tutorial installation often is unsuccessful or after installs the Kali Linux the reason which does not boot. So the installation step of the positive fetch should be this:

1. Install the Linux kernel header

My Kali Linux version is 2018.1, different versions of the kernel header, to install the kernel header according to the actual version of your installation, you can use UNAME-A to see what your kernel version is. The installation commands are as follows:

apt install linux-headers-4.14.0-kali3-amd64 linux-headers-4.14.0-kali3-common linux-headers-4.14.0-kali3-all
2. Disable open source graphics driver Nouveau

The commands that are disabled are as follows:

[email protected]:~$ echo -e “blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off” > /etc/modprobe.d/blacklist-nouveau.conf[email protected]:~$ update-initramfs -u && reboot

After the above operation, the open source graphics driver is disabled, in order to be safe, after the boot or to confirm whether the following is disabled success. You can use the following command to view:

[email protected]:~$ lsmod |grep -i nouveau

If the execution of the above command does not have any output, it proves that the open source graphics driver Nouveau has been successfully disabled.

3. Download Nvida official Driver

To Nvida's official website to download the corresponding model of the driver http://www.nvidia.com/Download/index.aspx?lang=en-us, note, here to choose and your graphics card hardware model corresponding version, otherwise must fail. For example, my is gtx860m's graphics card, so my choice is as follows:

Click on the SEARCH to see the DOWNLOAD button, click to download it.

4. Installation

After downloading the Nvida graphics driver file, use the chmod a+x nvidia-linux-x86_64-384.98.run command to give the driver executable permission. Then use the./nvidia-linux-x86_64-384.98.run command to install. During the installation, a warning is prompted, all select Yes.

5. Configuration

The most important part after installation comes, it must be configured so that Kali Linux knows what graphics driver you are using, otherwise the boot will fail. Executive Nvidia-xconfig--query-gpu-info | grep ' Busid: ' | Cut-d '-f6 view Busid, my display is as follows: pci:1:0:0, this information is used to configure the following files, the configuration steps are as follows:

5.1./etc/x11/xorg.conf

Vi/etc/x11/xorg.conf fill in the following information:

Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "intel"EndSectionSection "Device" Identifier "nvidia" Driver "nvidia" BusID "PCI:1:0:0"EndSectionSection "Screen" Identifier "nvidia" Device "nvidia" Option "AllowEmptyInitialConfiguration"EndSectionSection "Device" Identifier "intel" Driver "modesetting"EndSectionSection "Screen" Identifier "intel" Device "intel"EndSection
5.2./usr/share/gdm/greeter/autostart/optimus.desktop and/etc/xdg/autostart/optimus.desktop

Vi/usr/share/gdm/greeter/autostart/optimus.desktop fill in the following information:

[Desktop Entry]Type=ApplicationName=OptimusExec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"NoDisplay=trueX-GNOME-Autostart-Phase=DisplayServer

Vi/etc/xdg/autostart/optimus.desktop fill in the following information:

[Desktop Entry]Type=ApplicationName=OptimusExec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"NoDisplay=trueX-GNOME-Autostart-Phase=DisplayServer
6. Restart

Here, the graphics driver is installed and configured, boot enjoy it! Good luck!
Stick to my QR code and the latest article will start here.

0007 Kali Linux installation Nvida graphics driver

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.