ERROR: clGetDeviceIDs() -1 on Ubuntu server 12.04
#1
I'm trying to install oclHashcat on Ubuntu server 12.04 X64. I installed ATI drivers by following instruction on https://help.ubuntu.com/community/BinaryDriverHowto/ATI --> 2.1. Installing via the command line.

Then installed amd-app_2.4_amd64.deb. When I try to start oclHashcat I get:

Code:
$ ./oclHashcat-lite64.bin -m1400 test
ERROR: clGetDeviceIDs() -1

Drivers seem to be working:

Code:
$ sudo aticonfig --list-adapters
* 0. 01:00.0 ATI Mobility Radeon HD 5800 Series

* - Default adapter

Note that I also tried to manually install latest/older drivers and SDK directly from ATI website on Ubuntu desktop 12.10 X64 but failed with same error message.

Thanks for your help!
#2
Uninstall AMD APP SDK, you do not need it and should not have it installed.

This is not a hashcat issue, but rather an issue with your OpenCL runtime environment. Make sure that:

1. You are using Catalyst 12.8
2. You removed any previous xorg.conf* files
3. You generated a proper xorg.conf using 'amdconfig --adapter=all --initial'
4. X11 is running
5. You have the DISPLAY environment variable properly set to your display (commonly ":0")
6. You are running hashcat as the user that is logged into X11 -or- you have disabled X11 ACLs.

You can debug your OpenCL environment through the use of the 'clinfo' command. If clinfo cannot see your GPUs, then hashcat can't see your GPUs.
#3
Just realized you said you're running Ubuntu Server. This is fine, but I suspect your issue is that you did not manually install X11. Unfortunately X11 is required for fglrx to actually communicate with your GPUs (this has actually changed in Catalyst 12.10+, X-less setups are now possible but X is still required to use ADL commands to get/set fanspeed, etc.)

Install a minimal X11 environment:

Code:
aptitude install xserver-xorg xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-video-ati lightdm unity-greeter openbox

Then, edit /etc/lightdm/lightdm.conf and add the following (replacing YOUR_USER_NAME with the user you will be running hashcat as):

Code:
[SeatDefaults]
greeter-session=unity-greeter
user-session=openbox
autologin-user=YOUR_USER_NAME
autologin-user-timeout=0

Then add your username to the nopasswdlogin group:

Code:
usermod -a -G nopasswdlogin $USERNAME

Get build dependencies for Catalyst:

Code:
aptitude build-dep fglrx

Download and install Catalyst 12.8:

Code:
wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-8-x86.x86_64.zip
unzip amd-driver-installer-12-8-x86.x86_64.zip
sh amd-driver-installer-8.982-x86.x86_64.run --uninstall=force
sh amd-driver-installer-8.982-x86.x86_64.run

Generate a new xorg.conf:

Code:
rm -f /etc/X11/xorg.conf*
amdconfig --adapter=all --initial

Make sure the DISPLAY env var is set:

Code:
echo 'export DISPLAY=:0' >>~/.bashrc

Reboot, and you should be all set.
#4
Thank you very much. Made it work just before seeing your second post. I needed to install X11 with OpenBox and Catalyst 12.8.