X Error of failed request: BadValue (integer parameter out of range for operation)
#1
I installed Bumblebee so I could manage the power conspumtion of my NVidia GT650M.
Hashcat was running fine before, but after that I keep getting the following error:

Code:
hashcat (v3.00-1-g67a8d97) starting...

OpenCL Platform #1: NVIDIA Corporation  
======================================
- Device #1: GeForce GT 650M, 511/2047 MB allocatable, 2MCU
- Device #1: WARNING! Kernel exec timeout is not disabled, it might cause you errors of code 702
            See the wiki on how to disable it: https://hashcat.net/wiki/doku.php?id=timeout_patch

WARN: nvmlDeviceGetFanSpeed() 3 Not Supported

X Error of failed request:  BadValue (integer parameter out of range for operation)
 Major opcode of failed request:  156 (NV-CONTROL)
 Minor opcode of failed request:  2 ()
 Value in failed request:  0x17
 Serial number of failed request:  11
 Current serial number in output stream:  11

clinfo gives me this:

Code:
bernardo@bernardo-UX51VZA:~/hashcat-3.00$ clinfo
Number of platforms                               1
 Platform Name                                   NVIDIA CUDA
 Platform Vendor                                 NVIDIA Corporation
 Platform Version                                OpenCL 1.2 CUDA 8.0.20
 Platform Profile                                FULL_PROFILE
 Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts
 Platform Extensions function suffix             NV

 Platform Name                                   NVIDIA CUDA
Number of devices                                 1
 Device Name                                     GeForce GT 650M
 Device Vendor                                   NVIDIA Corporation
 Device Vendor ID                                0x10de
 Device Version                                  OpenCL 1.2 CUDA
 Driver Version                                  361.42
 Device OpenCL C Version                         OpenCL C 1.2
 Device Type                                     GPU
 Device Profile                                  FULL_PROFILE
 Device Topology (NV)                            PCI-E, 01:00.0
 Max compute units                               2
 Max clock frequency                             835MHz
 Compute Capability (NV)                         3.0
 Device Partition                                (core)
   Max number of sub-devices                     1
   Supported partition types                     None
 Max work item dimensions                        3
 Max work item sizes                             1024x1024x64
 Max work group size                             1024
 Preferred work group size multiple              32
 Warp size (NV)                                  32
 Preferred / native vector sizes                
   char                                                 1 / 1      
   short                                                1 / 1      
   int                                                  1 / 1      
   long                                                 1 / 1      
   half                                                 0 / 0        (n/a)
   float                                                1 / 1      
   double                                               1 / 1        (cl_khr_fp64)
 Half-precision Floating-point support           (n/a)
 Single-precision Floating-point support         (core)
   Denormals                                     Yes
   Infinity and NANs                             Yes
   Round to nearest                              Yes
   Round to zero                                 Yes
   Round to infinity                             Yes
   IEEE754-2008 fused multiply-add               Yes
   Support is emulated in software               No
   Correctly-rounded divide and sqrt operations  Yes
 Double-precision Floating-point support         (cl_khr_fp64)
   Denormals                                     Yes
   Infinity and NANs                             Yes
   Round to nearest                              Yes
   Round to zero                                 Yes
   Round to infinity                             Yes
   IEEE754-2008 fused multiply-add               Yes
   Support is emulated in software               No
   Correctly-rounded divide and sqrt operations  No
 Address bits                                    64, Little-Endian
 Global memory size                              2147287040 (2GiB)
 Error Correction support                        No
 Max memory allocation                           536821760 (512MiB)
 Unified memory for Host and Device              No
 Integrated memory (NV)                          No
 Minimum alignment for any data type             128 bytes
 Alignment of base address                       4096 bits (512 bytes)
 Global Memory cache type                        Read/Write
 Global Memory cache size                        32768
 Global Memory cache line                        128 bytes
 Image support                                   Yes
   Max number of samplers per kernel             32
   Max size for 1D images from buffer            134217728 pixels
   Max 1D or 2D image array size                 2048 images
   Max 2D image size                             16384x16384 pixels
   Max 3D image size                             4096x4096x4096 pixels
   Max number of read image args                 256
   Max number of write image args                16
 Local memory type                               Local
 Local memory size                               49152 (48KiB)
 Registers per block (NV)                        65536
 Max constant buffer size                        65536 (64KiB)
 Max number of constant args                     9
 Max size of kernel argument                     4352 (4.25KiB)
 Queue properties                                
   Out-of-order execution                        Yes
   Profiling                                     Yes
 Prefer user sync for interop                    No
 Profiling timer resolution                      1000ns
 Execution capabilities                          
   Run OpenCL kernels                            Yes
   Run native kernels                            No
   Kernel execution timeout (NV)                 Yes
 Concurrent copy and kernel execution (NV)       Yes
   Number of async copy engines                  1
 printf() buffer size                            1048576 (1024KiB)
 Built-in kernels                                
 Device Available                                Yes
 Compiler Available                              Yes
 Linker Available                                Yes
 Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts

NULL platform behavior
 clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  NVIDIA CUDA
 clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [NV]
 clCreateContext(NULL, ...) [default]            Success [NV]
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

ICD loader properties
 ICD loader Name                                 OpenCL ICD Loader
 ICD loader Vendor                               OCL Icd free software
 ICD loader Version                              2.2.8
 ICD loader Profile                              OpenCL 1.2
NOTE: your OpenCL library declares to support OpenCL 1.2,
but it seems to support up to OpenCL 2.1 too.
#2
Try with --gpu-temp-disable
#3
(08-14-2016, 09:03 PM)atom Wrote: Try with --gpu-temp-disable

it worked.. thanks a lot!!!
could you explain why do I need to use this option now?
#4
You don't need to if you installation is clean. It's just a workaround.
#5
Hello.

I'm having the same issue on GTX 1080.

I'm running latest hashcat (v3.00-97-g57ce1fd) freshly compiled from git with DEBUG=1 on Debian Jessie 8 (x64) with all latest updates with NVIDIA 367.35 drivers from nvidia.com website.

I'm running xdm in headless mode just fine, because I can control the fan manually via:

Code:
sudo nvidia-settings -a "[gpu:0]/GPUPowerMizerMode=1" \
    -a "[gpu:0]/GPULogoBrightness=0" \
    -a "[gpu:0]/GPUFanControlState=1" \
    -a "[fan:0]/GPUTargetFanSpeed=100"

Code:
$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.35                 Driver Version: 367.35                    |
|-------------------------------+----------------------+----------------------+
| 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 1080    Off  | 0000:01:00.0     Off |                  N/A |
|100%   80C    P2   188W / 217W |    973MiB /  8113MiB |    100%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0     13768    G   /usr/bin/X                                       8MiB |
|    0     31344    C   hashcat                                        963MiB |
+-----------------------------------------------------------------------------+

/etc/X11/xorg.conf:
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 367.35  (buildmeister@swio-display-x64-rhel04-01)  Mon Jul 11 23:51:45 PDT 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Interactive" "False"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "Interactive" "False"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
#    VendorName     "Unknown"
#    ModelName      "Unknown"
#    HorizSync       28.0 - 33.0
#    VertRefresh     43.0 - 72.0
#    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "Interactive" "False"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "12"
#    Option         "ConnectedMonitor" "Monitor0"
#    Option         "RegistryDwords" "PerfLevelSrc=0x2222"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


/etc/X11/xdm/Xsetup:
Code:
#!/bin/sh
export PATH=/bin:/usr/bin:/sbin
export HOME=/root
export DISPLAY=:0
xset -dpms
xset s off
xhost +


but If I install libxnvctrl0 hashcat stops working, gives me this error:

Code:
OpenCL Platform #2: NVIDIA Corporation
======================================
- Device #2: GeForce GTX 1080, 2028/8113 MB allocatable, 20MCU

X Error of failed request:  BadValue (integer parameter out of range for operation)
 Major opcode of failed request:  157 (NV-CONTROL)
 Minor opcode of failed request:  2 ()
 Value in failed request:  0x17
 Serial number of failed request:  11
 Current serial number in output stream:  11


I've tried different versions of libxnvctrl0 (also tried specifically 367.35 which matches the driver) but still no luck.

I know it's recommended to use Ubuntu 14.04 LTS on the wiki, but I don't like Ubuntu much because it's not stable enough for me for server usage, so I stick with Debian.

The only workaround I've found so far is to force manually fan to 100% (otherwise fan stays at 30-50% max and card is throttled once reaches 82, with fan 100% - card is at 80 degrees under max load) and use nvidia-smi as well to raise power to 217W as was suggested in forums to get maximum of the card. Simply removing libxnvctrl0 from the system makes hashcat work again and you can see in the status temperature and that fan is running at 100%. I don't want to run hashcat with --gpu-temp-disable because I'd like to see the actual temp/fan in the hashcat's status.

Any ideas why it might be not working and how to debug the actual cause?
#6
Try running hashcat as root
#7
(08-20-2016, 09:13 PM)atom Wrote: Try running hashcat as root

I've tried -- didn't help. I'm running a session now.

But I will try bit later and report back.
#8
I've tried again - no luck.

Once I install the library it stops working, also tried different versions of the library - doesn't work.

My XSetup is correct though - because I was able to manipulate fan speed manually.
#9
Then maybe the mapping is not (NVML to OpenCL). Does the fanspeed reading work correctly?
#10
(08-27-2016, 10:43 PM)atom Wrote: Then maybe the mapping is not (NVML to OpenCL). Does the fanspeed reading work correctly?

Fanspeed reading works correctly, it displays the same value as nvidia-smi.