hashcat Forum
Linux Error cuInit(): unknown error - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Linux Error cuInit(): unknown error (/thread-9625.html)



Linux Error cuInit(): unknown error - l_kareem_l - 11-10-2020

Hi,

My PC Specification : GPU: 1660Super, CPU:Ryzen 5 3600,

I want to use this machine for cracking with hashcat

I installed The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) Linux and updated / upgraded everything

then installed NVIDIA Drivers and CUDA Toolkit, then Hashcat



The problem is when I run hashcat It can't see the Cuda toolkit or the GPU

I searched for the error and any solutions but no luck.

I tried https://hashcat.net/faq/wrongdriver

I Read all FAQ section, Tried every solution there, Uninstall install drivers cuda ... etc



In the home Page it is said Required "NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or later)"



By running

Code:
root@KPC:/# nvcc --version



##Result is :


Code:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89




By running

Code:
root@KPC:/# nvidia-smi

##Result is :


Code:
Tue Nov 10 06:51:51 2020     
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|        Memory-Usage | GPU-Util  Compute M. |
|                              |                      |              MIG M. |
|===============================+======================+======================|
|  0  GeForce GTX 166...  Off  | 00000000:07:00.0  On |                  N/A |
|  0%  38C    P8    13W / 125W |    195MiB /  5944MiB |      4%      Default |
|                              |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                             
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU  GI  CI   PID  Type  Process name  GPU Memory ID  ID   Usage      |
|=======================================================|
|    0  N/A  N/A      765      G  /usr/lib/xorg/Xorg                190MiB |
|    0  N/A  N/A      1043      G  xfwm4                              3MiB |
+-----------------------------------------------------------------------------+


I am sorry for bad format



but It now show that I am in the requirements!

Code:
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0    |



The problem is when I run

Code:
root@KPC:/# hashcat -I



##Result:


Code:
hashcat (v6.1.1) starting...

cuInit(): unknown error

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

OpenCL Platform ID #1
  Vendor..: The pocl project
  Name....: Portable Computing Language
  Version.: OpenCL 1.2 pocl 1.5, None+Asserts, LLVM 9.0.1, RELOC, SLEEF, DISTRO, POCL_DEBUG

  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 1
    Vendor.........: AuthenticAMD
    Name...........: pthread-AMD Ryzen 5 3600 6-Core Processor
    Version........: OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-znver1
    Processor(s)...: 12
    Clock..........: 3600
    Memory.Total...: 13976 MB (limited to 4096 MB allocatable in one block)
    Memory.Free....: 13912 MB
    OpenCL.Version.: OpenCL C 1.2 pocl
    Driver.Version.: 1.5

cuInit(): unknown error

I hope anyone can help cause I did every solution on internet to solve but no luck


RE: Linux Error cuInit(): unknown error - undeath - 11-11-2020

uninstall pocl


RE: Linux Error cuInit(): unknown error - l_kareem_l - 11-11-2020

(11-11-2020, 12:43 PM)undeath Wrote: uninstall pocl
Thank you for replying
do you mean pocl-opencl-icd or other pocl?
I may try
sudo apt-get remove pocl-opencl-icd
I will try and show results


RE: Linux Error cuInit(): unknown error - l_kareem_l - 11-11-2020

I uninstalled By ## sudo apt-get remove pocl-opencl-icd 
and then auto remove by ## sudo apt-get autoremove

it done successfully but initiated more problems
Runnung hashcat result is :

Code:
$ hashcat -I
hashcat (v6.1.1) starting...

cuInit(): unknown error

clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR

ATTENTION! No OpenCL-compatible or CUDA-compatible platform found.

You are probably missing the OpenCL or CUDA runtime installation.

* AMD GPUs on Linux require this driver:
  "RadeonOpenCompute (ROCm)" Software Platform (3.1 or later)
* Intel CPUs require this runtime:
  "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
* NVIDIA GPUs require this runtime and/or driver (both):
  "NVIDIA Driver" (440.64 or later)
  "CUDA Toolkit" (9.0 or later)



RE: Linux Error cuInit(): unknown error - undeath - 11-11-2020

You still need a opencl-icd. I don't know which packages your system has available. Just make sure you don't have the pocl opencl library installed.


RE: Linux Error cuInit(): unknown error - grok - 11-15-2020

(11-11-2020, 01:00 PM)l_kareem_l Wrote: I uninstalled By ## sudo apt-get remove pocl-opencl-icd 
and then auto remove by ## sudo apt-get autoremove

it done successfully but initiated more problems
Runnung hashcat result is :

Code:
$ hashcat -I
hashcat (v6.1.1) starting...

cuInit(): unknown error

clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR

ATTENTION! No OpenCL-compatible or CUDA-compatible platform found.

You are probably missing the OpenCL or CUDA runtime installation.

* AMD GPUs on Linux require this driver:
  "RadeonOpenCompute (ROCm)" Software Platform (3.1 or later)
* Intel CPUs require this runtime:
  "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
* NVIDIA GPUs require this runtime and/or driver (both):
  "NVIDIA Driver" (440.64 or later)
  "CUDA Toolkit" (9.0 or later)


I am in exactly the same boat running a 3950x processor with a rtx 2080 super gpu.
Dual boot, same exact errors as yours on The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali). I have also installed and uninstalled everything suggested with no luck.

This is a bit frustrating as Hashcat used to work on other computers.


RE: Linux Error cuInit(): unknown error - grok - 11-15-2020

(11-15-2020, 03:17 AM)grok Wrote:
(11-11-2020, 01:00 PM)l_kareem_l Wrote: I uninstalled By ## sudo apt-get remove pocl-opencl-icd 
and then auto remove by ## sudo apt-get autoremove

it done successfully but initiated more problems
Runnung hashcat result is :

Code:
$ hashcat -I
hashcat (v6.1.1) starting...

cuInit(): unknown error

clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR

ATTENTION! No OpenCL-compatible or CUDA-compatible platform found.

You are probably missing the OpenCL or CUDA runtime installation.

* AMD GPUs on Linux require this driver:
  "RadeonOpenCompute (ROCm)" Software Platform (3.1 or later)
* Intel CPUs require this runtime:
  "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
* NVIDIA GPUs require this runtime and/or driver (both):
  "NVIDIA Driver" (440.64 or later)
  "CUDA Toolkit" (9.0 or later)


I am in exactly the same boat running a 3950x processor with a rtx 2080 super gpu.
Dual boot, same exact errors as yours on The-Distribution-Which-Does-Not-Handle-OpenCL-Well (The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali)). I have also installed and uninstalled everything suggested with no luck.

This is a bit frustrating as Hashcat used to work on other computers.
JTR wont even see the gpu either.


RE: Linux Error cuInit(): unknown error - n0ss - 11-15-2020

Hello friends,

I've had the same issue as you two for the past week actually. The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali), is just not that great handling updates with drivers I guess. I've tried everything I could for 3 days, including 2 fresh install, thinking I was the problem. But no, the distro is...

Install Parrot Security OS !

Driver for AWUS1900 works OOB, CUDA works OOB, Intel Neo (OpenCL) is provided in the package manager.

One thing you need to know though, update using, "sudo parrot-upgrade" not "apt upgrade" this will ensure system stability.

So here are the steps :
- Install OS.

- "apt update" followed by "parrot-upgrade"
- reboot

- "sudo nano /etc/modprobe.d/blacklist-nouveau.conf"
Add this in the file :
"blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off"

- Install "nvidia-driver"
- reboot

- Install CUDA : "sudo apt install -y ocl-icd-libopencl1 nvidia-cuda-toolkit"
- reboot

- Install clinfo : "sudo apt install clinfo"
- use clinfo : "clinfo"
- Enjoy
- Try "hashcat -I"... Enjoy !

For more info :
https://docs.parrotlinux.org/info/gpu-drivers/
https://www.reddit.com/r/ParrotOS/comments/bzv9ua/sticky_me_how_to_make_your_nvidia_gpu_properly/

I do not recommend you follow every step in the official docs. Follow just this, and tell me if it fixed your problems.

Also, know that Parrot Security has more tools than The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali), uses Mate instead of XFCE (good old Gnome 2) and is very stable and lightweight.