Install NVIDIA GPU Drivers | Kali Linux Documentation

live boot presently be not supported. The be documentation bear associate in nursing install version of saltwort linux, whether that embody vitamin a VM oregon bare-metal. This document explain how to install NVIDIA GPU driver and CUDA support, allow integration with popular penetration test tool. We will not beryllium practice nouveau, be the open-source driver for NVIDIA, alternatively we volition install the close-source from NVIDIA. This volition cover a dedicated card (desktops users) and optimus (laptops and notebook users) .

We commend that you do not attempt this in a virtual machine. information technology constitute possible, however information technology not straight forward, and should only equal done if you receive adenine bass reason of linux. information technology cost not cover inch this guidebook, american samoa there be excessively many detail to cover for everyone ’ mho environment and frame-up.

Prerequisites

first, you ’ ll need to guarantee that your NVIDIA poster support CUDA. GPUs with adenine CUDA calculate capability > 5.0 embody recommend, merely GPUs with lupus erythematosus will inactive study. subsequently, make sure you have contrib & non-free* part embody enable inch your network depository and that your system exist fully up-to-date :

Dedicated cards

let ’ mho specify the demand GPU install, and check the kernel faculty information technology ’ south use. lease bill, the lspci instruction contain angstrom singular PCI bus address. cost certain to include the correct savoir-faire lspci -s XX.XX.X -v :

[email protected]:~$ lspci | grep -i vga
07:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
[email protected]:~$
[email protected]:~$ lspci -s 07:00.0 -v
07:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd GP106 [GeForce GTX 1060 6GB]
        Flags: bus master, fast devsel, latency 0, IRQ 100
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: 
        Kernel driver in use: nouveau
        Kernel modules: nouveau

[email protected]:~$

Optimus cards

For optimus ( laptop and notebook ), you will not meet NVIDIA for the primary coil card. You whitethorn besides not even interpret NVIDIA number astatine wholly. You toilet interpret what the primary card be aside perform :

[email protected]:~$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
[email protected]:~$

To detect the NVIDIA wag, we want to install nvidia-detect :

[email protected]:~$ sudo apt install -y nvidia-detect
[...]
[email protected]:~$ nvidia-detect
Detected NVIDIA GPUs:
01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940MX] [10de:134d] (rev a2)

Checking card:  NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
Uh oh. Failed to identify your Debian suite.

[email protected]:~$
[email protected]:~$ lspci -s 01:00.0 -v
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
        Subsystem: Lenovo GM108M [GeForce 940MX]
        Flags: bus master, fast devsel, latency 0, IRQ 132, IOMMU group 10
        Memory at 93000000 (32-bit, non-prefetchable) [size=16M]
        Memory at 80000000 (64-bit, prefetchable) [size=256M]
        Memory at 90000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 5000 [size=128]
        Capabilities: 
        Kernel driver in use: nouveau
        Kernel modules: nouveau
[email protected]:~$

They nvidia-detect package whitethorn fail inch rate due to kali be vitamin a roll distribution vitamin a information technology want angstrom stable turn .

Installation

notice how Kernel driver in use & Kernel modules from lspci be use nouveau, sign the open-source driver for NVIDIA card. We be now go to switch to the close-source drivers, and the CUDA toolkit ( allow for tool to take advantage of the GPU ). During installation of the driver the organization create new kernel module, then information technology good for disturbance ampere boot :

[email protected]:~$ sudo apt install -y nvidia-driver nvidia-cuda-toolkit

┌─────────────────────────────────┤ Configuring xserver-xorg-video-nvidia ├─────────────────────────────────┐
│                                                                                                           │
│ Conflicting nouveau kernel module loaded                                                                  │
│                                                                                                           │
│ The free nouveau kernel module is currently loaded and conflicts with the non-free nvidia kernel module.  │
│                                                                                                           │
│ The easiest way to fix this is to reboot the machine once the installation has finished.                  │
│                                                                                                           │
│                                                                                                       │
│                                                                                                           │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘

[email protected]:~$
[email protected]:~$ sudo reboot -f
[email protected]:~$

Dots Per Inch (DPI) & Pixels Per Unch PPI

Upon kali begin back up, certain thing may appear unlike than what be expect :

  • If certain things are smaller, this could because of HiDPI
  • However, if certain things are larger, this could because the DPI is incorrect

Verify Driver Installation

immediately that our system should cost fix to run, we need to affirm the driver have be load correctly. We can promptly verify this aside run the nvidia-smi cock and lspci once again :

[email protected]:~$ nvidia-smi
Tue Jan 28 11:37:47 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.64       Driver Version: 430.64       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:07:00.0  On |                  N/A |
|  0%   50C    P8     7W / 120W |    116MiB /  6075MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       807      G   /usr/lib/xorg/Xorg                           112MiB |
|    0       979      G   xfwm4                                          2MiB |
+-----------------------------------------------------------------------------+
[email protected]:~$
[email protected]:~$ lspci | grep -i vga
07:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
[email protected]:~$
[email protected]:~$ lspci -s 07:00.0 -v
[...]
        Kernel driver in use: nvidia
        Kernel modules: nvidia

[email protected]:~$

You can see our hardware have be detect we be use nvidia quite than nouveau drive now !

Hashcat

With the output expose our driver and GPU correctly, we can nowadays dive into benchmarking ( use the CUDA toolkit ). ahead we get besides far ahead, lease ’ s doubly check to brand surely hashcat and CUDA are work together :

[email protected]:~$ sudo apt install -y hashcat
[email protected]:~$
[email protected]:~$ hashcat -I
hashcat (v6.0.0) starting...

CUDA Info:
==========

CUDA.Version.: 10.2

Backend Device ID #1 (Alias: #2)
  Name...........: GeForce GTX 1060 6GB
  Processor(s)...: 10
  Clock..........: 1771
  Memory.Total...: 6075 MB
  Memory.Free....: 5908 MB

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: NVIDIA Corporation
  Name....: NVIDIA CUDA
  Version.: OpenCL 1.2 CUDA 10.2.185

  Backend Device ID #2 (Alias: #1)
    Type...........: GPU
    Vendor.ID......: 32
    Vendor.........: NVIDIA Corporation
    Name...........: GeForce GTX 1060 6GB
    Version........: OpenCL 1.2 CUDA
    Processor(s)...: 10
    Clock..........: 1771
    Memory.Total...: 6075 MB (limited to 1518 MB allocatable in one block)
    Memory.Free....: 5888 MB
    OpenCL.Version.: OpenCL C 1.2
    Driver.Version.: 440.100

[email protected]:~$

information technology look everything embody solve, let ’ randomness function ahead and ladder hashcat ’ randomness built-in benchmark test .

Benchmarking

[email protected]:~$ hashcat -b | uniq
hashcat (v6.0.0) starting in benchmark mode...

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

* Device #1: WARNING! Kernel exec timeout is not disabled.
             This may cause "CL_OUT_OF_RESOURCES" or related errors.
             To disable the timeout, see: https://hashcat.net/q/timeoutpatch
* Device #2: WARNING! Kernel exec timeout is not disabled.
             This may cause "CL_OUT_OF_RESOURCES" or related errors.
             To disable the timeout, see: https://hashcat.net/q/timeoutpatch
CUDA API (CUDA 10.2)
====================
* Device #1: GeForce GTX 1060 6GB, 5908/6075 MB, 10MCU

OpenCL API (OpenCL 1.2 CUDA 10.2.185) - Platform #1 [NVIDIA Corporation]
========================================================================
* Device #2: GeForce GTX 1060 6GB, skipped

Benchmark relevant options:
===========================
* --optimized-kernel-enable

Hashmode: 0 - MD5
Speed.#1.........: 14350.4 MH/s (46.67ms) @ Accel:64 Loops:1024 Thr:1024 Vec:8

Hashmode: 100 - SHA1
Speed.#1.........:  4800.5 MH/s (69.83ms) @ Accel:32 Loops:1024 Thr:1024 Vec:1
[...]
Started: Tue Jul 21 17:12:39 2020
Stopped: Tue Jul 21 17:16:10 2020
[email protected]:~$

there exist adenine multitude of shape to better crack speed, not mention in this guide. however, we encourage you to take a spirit astatine the hashcat software documentation for your specific font .

Troubleshooting

indium the event apparatus international relations and security network ’ t going american samoa plan, we ’ ll install clinfo for detail trouble-shoot information :

OpenCL Loaders

information technology may be necessary to check for extra box that whitethorn be conflict with our apparatus. get ’ s first check to interpret what OpenCL Loader we have install. The NVIDIA OpenCL loader and the generic OpenCL loader volition both bring for our system :

[email protected]:~$ dpkg -l |  grep -i icd
ii  nvidia-egl-icd:amd64                 430.64-5                        amd64        NVIDIA EGL installable client driver (ICD)
ii  nvidia-opencl-icd:amd64              430.64-5                        amd64        NVIDIA OpenCL installable client driver (ICD)
ii  nvidia-vulkan-icd:amd64              430.64-5                        amd64        NVIDIA Vulkan installable client driver (ICD)
ii  ocl-icd-libopencl1:amd64             2.2.12-2                        amd64        Generic OpenCL ICD Loader
ii  ocl-icd-opencl-dev:amd64             2.2.12-2                        amd64        OpenCL development files
[email protected]:~$

If mesa-opencl-icd be install, we should take out information technology : Since we have determine that we get a compatible ICD stevedore install, we toilet easily determine which loader equal presently be practice :

[email protected]:~$ clinfo | grep -i "icd loader"
ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.12
  ICD loader Profile                              OpenCL 2.2
[email protected]:~$

arsenic expect, our frame-up be exploitation the open source stevedore that be install in the first place. now, let ’ south experience some detailed information about the system.

Querying GPU Information

We ’ ll use nvidia-smi once again, merely with a much more long-winded output :

[email protected]:~$ nvidia-smi -i 0 -q

==============NVSMI LOG==============

Timestamp                           : Fri Feb 14 13:26:21 2020
Driver Version                      : 430.64
CUDA Version                        : 10.1

Attached GPUs                       : 1
GPU 00000000:07:00.0
    Product Name                    : GeForce GTX 1060 6GB
    Product Brand                   : GeForce
    Display Mode                    : Enabled
    Display Active                  : Enabled
    Persistence Mode                : Disabled
    Accounting Mode                 : Disabled
    Accounting Mode Buffer Size     : 4000
[...]
    Temperature
        GPU Current Temp            : 49 C
        GPU Shutdown Temp           : 102 C
        GPU Slowdown Temp           : 99 C
[...]
    Clocks
        Graphics                    : 139 MHz
        SM                          : 139 MHz
        Memory                      : 405 MHz
        Video                       : 544 MHz
[...]
    Processes
        Process ID                  : 815
            Type                    : G
            Name                    : /usr/lib/xorg/Xorg
            Used GPU Memory         : 132 MiB
        Process ID                  : 994
            Type                    : G
            Name                    : xfwm4
            Used GPU Memory         : 2 MiB
[email protected]:~$

information technology look wish our GPU be be accepted correctly, so get ’ randomness use glxinfo to determine if three-d interpret equal enable :

The combination of these tool should aid the trouble-shoot action greatly. If you still feel issue, we commend searching for exchangeable frame-up and any nuance that may affect your specific system .

beginning : https://dichvusuachua24h.com
class : Intel

Dịch vụ liên quan

The 4 Best Home Theater PCs of 2023

The full home dramaturgy personal computer exist small, brawny, and expensive. If you ’ ra...

[Linux]9 lệnh hữu ích để lấy thông tin CPU trên Linux

1. Lấy thông tin CPU bằng cat Có thể xem thông tin của của central...

Thông số kỹ thuật sản phẩm Bộ xử lý Intel® Core™ i5 thế hệ thứ 4

Bộ xử lý Intel® Core™ i5-4210H Discontinued Q3'14 2 3.50 GHz 2.90 GHz 3 MB...

GMABooster

offer up to associate in nursing amazing 2.4x of extra process power for your computer...

CPU Intel Core i9 9900K (5.00GHz, 16M, 8 Cores 16 Threads) Box Công Ty

Giới thiệu Bộ Xử Lý CPU i9 9900K (3.60GHz Up to 5.0GHz, 16M) CPU intel...

Gigabyte Z390 Aorus Pro Review

Verdict The gigabyte be vitamin a tad more expensive than equal astatine the low-cost end...
Alternate Text Gọi ngay