Help with hashcat on Debian: "Unstable OpenCL driver detected!"
#1
I'm trying to get my AMD card working with hashcat on Debian. I've installed the latest version of hashcat 7.1.2. When I try a benchmark, I get the warning "Unstable OpenCL driver detected!", and a segfault when trying to --force it.

Code:
█[asrock][hashcat][255]$ sudo sudo hashcat -b -d1 --force hashcat (v7.1.2-65-g5e615188b) 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. You have enabled --force to bypass dangerous warnings and errors! This can hide serious problems and should only be done when debugging. Do not report hashcat issues encountered when using --force. OpenCL API (OpenCL 1.1 Mesa 22.3.6) - Platform #1 [Mesa] ======================================================== * Device #01: PITCAIRN (, LLVM 15.0.6, DRM 2.50, 6.1.0-38-amd64), 2048/2048 MB (512 MB allocatable), 20MCU OpenCL API (OpenCL 3.0 PoCL 3.1+debian  Linux, None+Asserts, RELOC, SPIR, LLVM 15.0.6, SLEEF, DISTRO, POCL_DEBUG) - Platform #2 [The pocl project] ================================================================================================================================================== * Device #02: pthread-haswell-Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, skipped Benchmark relevant options: =========================== * --force * --backend-devices=1 * --backend-devices-virtmulti=1 * --backend-devices-virthost=1 * --optimized-kernel-enable --------------------- * Hash-Mode 900 (MD4) --------------------- Segmentation fault █[asrock][hashcat][139]$

I'm willing to install whatever proprietary driver is needed. I tried installing these nonfree packages, but nothing seems to change. 

Code:
sudo apt-get install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu

What change should I expect to see after installing these non-free drivers? How do I verify that the new driver is being used, or how do I tell the OS to use the newly installed driver? Do I need to reboot?

My inxi -G output appears unchanged:


Code:
█[asrock][hashcat][0]$ inxi -G Graphics:  Device-1: AMD Curacao PRO [Radeon R7 370 / R9 270/370 OEM] driver: radeon v: kernel  Display: server: X.org v: 1.21.1.7 driver: X: loaded: amdgpu unloaded: fbdev,modesetting,vesa    dri: radeonsi gpu: radeon tty: 112x25  API: OpenGL Message: GL data unavailable in console. Try -G --display █[asrock][hashcat][0]$


And most importantly, hashcat still complains about "unstable opengl" driver and still segfaults.

I went to the official AMD website to try to download drivers, but they only appear to support RHEL, Ubuntu. Should I try the Ubuntu drivers? Or should the debian firmware-nonfree drivers work with hashcat?

[Image: PaQ7jkafKLzO.png?o=1]
Reply
#2
AMD GPUs on Linux require "AMD Radeon Software for Linux" with "ROCm". Not sure if ROCm drivers support your hardware.
Reply
#3
I followed the instructions in https://wiki.debian.org/ROCm, but I ran into several errors:

Code:
CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineHIPCompiler.cmake:106 (message): The ROCm root directory: /usr does not contain the HIP runtime CMake package, expected at: /usr/lib/cmake/hip-lang/hip-lang-config.cmake

I noticed the file is provided by libamdhip64-dev and located at a different path:

Code:
libamdhip64-dev: /usr/lib/x86_64-linux-gnu/cmake/hip-lang/hip-lang-config.cmake

I saw this issue being referenced here: https://gitlab.kitware.com/cmake/cmake/-...uests/8534, I guess in a newer version of cmake than the default in my system.

I tried to work around the issue by creating a symlink:

Code:
sudo ln -s /usr/lib/x86_64-linux-gnu/cmake/hip-lang /usr/lib/cmake/

But obviously this only resulted in another error down the line:

Code:
CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineHIPCompiler.cmake:183 (message): Failed to find a default HIP architecture. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred! See also "/home/ealfonso/git/dotfiles/installs/rocm/build/CMakeFiles/CMakeOutput.log". See also "/home/ealfonso/git/dotfiles/installs/rocm/build/CMakeFiles/CMakeError.log".

I guess I'm going to have to try building the latest cmake, and trying the build again, maybe only to find that ROCm drivers don't support my hardware after all.
Reply
#4
I manually built the latest cmake 4.1.* and re-ran the build script, it still failed at the "HIP compiler identification" step, but I guess at least it found the ROCm root directory:

Code:
+ rm -rf ./build + cmake -version cmake version 4.1.20250901-gbc0774c CMake suite maintained and supported by Kitware (kitware.com/cmake). + CXX=hipcc + cmake -S. -Bbuild -- The HIP compiler identification is unknown CMake Error at /usr/local/share/cmake-4.1/Modules/CMakeDetermineHIPCompiler.cmake:348 (message): Failed to find a default HIP architecture. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred!

I imagine I'll need to try building the latest rocm instead of copy-pasting some code from a debian wiki page.
Reply
#5
I tried following the ROCm installation instructions from AMD for Debian:

https://rocm.docs.amd.com/projects/insta...start.html

This failed at the step:

Code:
sudo apt install -y rocm

There appear to be some package dependency/version issues.

Code:
-*- mode: compilation; default-directory: "~/git/dotfiles/installs/rocm/" -*- Compilation started at Mon Sep 1 21:03:52 ./adm-rocm.sh + set -euo pipefail + wget https://repo.radeon.com/amdgpu-install/6.4.3/ubuntu/jammy/amdgpu-install_6.4.60403-1_all.deb --2025-09-01 21:03:52-- https://repo.radeon.com/amdgpu-install/6.4.3/ubuntu/jammy/amdgpu-install_6.4.60403-1_all.deb Resolving repo.radeon.com (repo.radeon.com)... 92.123.236.96, 92.123.236.57, 2a02:26f0:9500:27::17d7:2de, ... Connecting to repo.radeon.com (repo.radeon.com)|92.123.236.96|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 17060 (17K) [application/octet-stream] Saving to: ‘amdgpu-install_6.4.60403-1_all.deb.3’ amdgpu-install_6.4.60403-1_all.d 100%[========================================================>] 16.66K --.-KB/s in 0.007s 2025-09-01 21:03:56 (2.18 MB/s) - ‘amdgpu-install_6.4.60403-1_all.deb.3’ saved [17060/17060] + sudo apt install -y ./amdgpu-install_6.4.60403-1_all.deb Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'amdgpu-install' instead of './amdgpu-install_6.4.60403-1_all.deb' amdgpu-install is already the newest version (6.4.60403-2194681.22.04). The following packages were automatically installed and are no longer required: libpulsedsp pulseaudio-utils Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. + sudo apt update Hit:1 https://deb.debian.org/debian bookworm InRelease Hit:2 https://repo.radeon.com/amdgpu/6.4.3/ubuntu jammy InRelease Hit:3 https://download.docker.com/linux/debian bookworm InRelease Hit:4 https://deb.debian.org/debian-security bookworm-security InRelease Hit:5 https://deb.debian.org/debian bookworm-updates InRelease Hit:6 https://repo.radeon.com/rocm/apt/6.4.3 jammy InRelease Hit:7 https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64 InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 19 packages can be upgraded. Run 'apt list --upgradable' to see them. + sudo apt install -y python3-setuptools python3-wheel Reading package lists... Done Building dependency tree... Done Reading state information... Done python3-setuptools is already the newest version (66.1.1-1+deb12u1). python3-wheel is already the newest version (0.38.4-2). The following packages were automatically installed and are no longer required: libpulsedsp pulseaudio-utils Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. + sudo usermod -a -G render,video ealfonso + sudo apt install -y rocm Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: rocm-hip-runtime : Depends: rocminfo (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed rocm-hip-runtime-dev : Depends: rocm-device-libs (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed Depends: hipcc (= 1.1.1.60403-128~22.04) but 5.2.3-8 is to be installed rocm-openmp-sdk : Depends: rocm-device-libs (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed rocm-utils : Depends: rocminfo (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed E: Unable to correct problems, you have held broken packages. Compilation exited abnormally with code 100 at Mon Sep 1 21:04:07

I'm not sure if it's worth fighting what seems like an uphill battle. Do I try to manually install the expected versions for each of those dependencies? Or just give up on Debian and install Ubuntu, which AMD appears to support better?

These are the 3 packages that appear to have the wrong versions:

Code:
Depends: rocminfo (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed Depends: rocm-device-libs (= 1.0.0.60403-128~22.04) but 5.2.3-2 is to be installed Depends: hipcc (= 1.1.1.60403-128~22.04) but 5.2.3-8 is to be installed

How should I go about fixing the dependency issues, where should I get the latest versions of these pacakges?
Has anyone on debian gotten hashcat to work with AMD hardware? Help.
Reply
#6
Yes, my AMD hardware works fine. I just followed the official instructions. It even works under Docker:

https://github.com/hashcat/hashcat/blob/...24.release

You might want to have a look into the docker base image rocm/rocm-terminal
Reply