Can't find the name of Intel ICD OpenGL driver

本文介绍了解决OpenGL ES开发中DLL库加载错误的方法。当遇到显卡驱动正常但DLL库加载失败的问题时,通常是因为使用的DLL库与lib库不匹配。解决此问题只需确保加载的是正确的DLL库。

使用opengles开发时,出现


如果显卡驱动各个都是正常的,那就是因为你的dll 库跟使用lib 库不匹配导致的


加载的不是工程目录下的dll 库,所以,只需要把这个替换掉即可


haoran215 opened on Mar 15 Windows build number: 10.0.26100.3476 Your Distribution version: 24.04 Your WSL versions: 1.When I try to use hardware acceleration, my WSL can't find file libnvidia-gl.so ~$ ls /usr/lib/wsl/lib | grep nvidia libnvidia-encode.so libnvidia-encode.so.1 libnvidia-ml.so.1 libnvidia-opticalflow.so libnvidia-opticalflow.so.1 nvidia-smi 2.WSL is not using your NVIDIA GPU for OpenGL/Vulkan. glxinfo | grep "OpenGL renderer" → Shows D3D12 (Intel UHD Graphics) instead of RTX 4060 and I can't change it manuly. vulkaninfo | grep "GPU id" → Shows LLVM software renderer, meaning hardware acceleration is missing. 3.WSL does not have full NVIDIA library support: nvidia-smi works, but only sees CUDA, not OpenGL. 4.Segmentation fault (core dumped) when running OpenGL apps: glxgears crashes, meaning MESA+NVIDIA are not working together. 5.WSL may be using an outdated or incompatible driver: WSL reports NVIDIA-SMI 570.124.03, but Windows reports 572.60. Possible mismatch between Windows and WSL driver versions. 6.Vulkan driver is broken: vulkaninfo | grep "GPU id" → "ERROR_INCOMPATIBLE_DRIVER" Likely due to missing /usr/share/vulkan/icd.d/nvidia_icd.json. Steps to reproduce: nvidia-smi in WSL WSL logs: wlog.log WSL dumps: No response Expected behavior: No response Actual behavior: WSL installation does not have the full NVIDIA driver stack for OpenGL and Vulkan. missing libnvidia-gl.so, which is needed for OpenGL rendering. NVIDIA GPU is detected (nvidia-smi works), but OpenGL is still using Intel GPU (D3D12). Vulkan also fails with ERROR_INCOMPATIBLE_DRIVER, meaning WSL is not correctly using the NVIDIA driver. Activity haoran215 added bug Something isn't working on Mar 15 lzlrd lzlrd commented on Mar 21 lzlrd on Mar 21 · edited by lzlrd EDIT: See https://gist.github.com/lzlrd/0d9b757d2122f551794fd00c7f0752d6 as there are a few updates there (inc. fixing Wayland). I won't be updating the message below going forward. So I got this working on both Ubuntu, and Arch. First, start with a fresh install (of archlinux from https://gitlab.archlinux.org/archlinux/archlinux-wsl or Ubuntu from wsl --install Ubuntu or https://apps.microsoft.com/detail/9pdxgncfsczv). For Arch: Clone https://aur.archlinux.org/packages/directx-headers-git and https://aur.archlinux.org/packages/mesa-wsl2-git. Build directx-headers-git using makepkg -rsi. You may need to set up as per https://wiki.archlinux.org/title/Makepkg. cd into mesa-wsl2-git. Edit PKGBUILD to remove all instances of =18.1.8. Build mesa-wsl2-git using makepkg -rsi. Run echo "export GALLIUM_DRIVER=d3d12" | sudo tee /etc/profile.d/wslg.sh. Run echo "L+ /tmp/.X11-unix - - - - /mnt/wslg/.X11-unix" | sudo tee /etc/tmpfiles.d/wslg.conf. (Thanks to Init /tmp/.X11-unix is overwritten by mounts #43 (comment) for this.) Restart WSL with wsl --shutdown from CMD/PowerShell and you should see the following (given you install the relevant packages): $ glxinfo | grep Device Device: D3D12 (NVIDIA GeForce RTX 4080 SUPER) (0xffffffff) $ vulkaninfo | grep "GPU id" WARNING: dzn is not a conformant Vulkan implementation, testing use only. GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id : 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)): GPU id : 1 (llvmpipe (LLVM 19.1.7, 256 bits)): For Ubuntu: OpenGL should already be working. We'll add Vulkan support. Go to https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/. Look for mesa-vulkan-drivers_*.deb. You'll see ...<LETTER>_<ARCH>.deb. The letter corresponds to your Ubuntu version codename. In your case, "n" for Noble. Copy the link for the right package, https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.deb in your case. Run wget https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.deb anywhere you have write access to on the Ubuntu WSL instance. Run sudo apt install <PACKAGE> (in your case, sudo apt install mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.deb. You should see the following (given you install mesa-utils and vulkan-tools): $ glxinfo | grep Device WARNING: dzn is not a conformant Vulkan implementation, testing use only. WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization Device: D3D12 (NVIDIA GeForce RTX 4080 SUPER) (0xffffffff) $ vulkaninfo | grep "GPU id" WARNING: dzn is not a conformant Vulkan implementation, testing use only. GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits)) GPU id : 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)): GPU id : 1 (llvmpipe (LLVM 19.1.7, 256 bits)): The reason we're using just the Vulkan driver from Kisak's repo. is that the mesa package causes llvmpipe to be used instead of D3D12. Maybe overring GALLIUM_DRIVER would work - I didn't try. Update: Documented at https://gist.github.com/lzlrd/0d9b757d2122f551794fd00c7f0752d6, as well.详细解释一下并说明能否解决上个问题
最新发布
10-10
<think>好的,我现在需要帮助用户解决在Windows 7 64位系统上运行hashcat64.exe时遇到的OpenCL错误,尤其是无法找到OpenCL ICD Loader库的问题。首先,我应该回顾之前的对话,确保不重复信息,但可能需要更深入地探讨这个问题。 用户提到“无法找到OpenCL ICD Loader库”,这可能与系统缺少必要的OpenCL文件或路径配置有关。根据之前的回答,我已经提到了更新驱动、安装运行时和配置环境变量。现在需要更具体地针对ICD Loader的问题。 首先,ICD(Installable Client Driver)Loader是OpenCL的一部分,允许系统管理多个厂商的OpenCL实现。如果系统找不到这个库,可能是因为相关DLL文件缺失或路径不正确。常见的DLL文件是OpenCL.dll,可能位于系统目录或显卡驱动的安装路径中。 接下来,我需要考虑用户可能没有正确安装OpenCL运行时。例如,AMD和NVIDIA的驱动通常包含这些文件,但用户可能安装了不完整的驱动,或者文件被安全软件误删。此外,Windows 7本身可能缺少某些更新,导致支持不足。 用户可能需要手动安装OpenCL ICD Loader。微软官方可能不提供单独的安装包,但可以从第三方或显卡厂商获取。例如,Intel提供了OpenCL运行时,用户可能需要安装这个,即使他们没有Intel显卡,但不确定是否适用。 另一个可能性是环境变量中的路径没有包含OpenCL的DLL位置。用户可能需要手动添加路径或复制DLL文件到系统目录。但需要注意,不同显卡厂商的DLL路径不同,需要根据用户的硬件进行指导。 此外,用户可能需要检查系统是否安装了Visual C++ Redistributable,因为某些运行时依赖这些组件。尤其是旧版本的软件可能需要特定版本的VC++运行时。 还可能存在权限问题,例如DLL文件被拒绝访问,或者系统文件损坏。建议用户运行系统文件检查器(sfc /scannow)来修复系统文件。 总结可能的解决步骤: 1. 确认显卡驱动已正确安装,包含OpenCL组件。 2. 安装或修复OpenCL ICD Loader,可能需要手动下载DLL。 3. 检查系统路径是否正确配置,包含OpenCL库的路径。 4. 安装必要的系统更新和运行时库,如VC++ Redistributable。 5. 使用诊断工具如GPU Caps Viewer或clinfo验证OpenCL是否正确安装。 6. 处理可能的文件缺失或损坏,如复制DLL到系统目录。 需要确保步骤清晰,适合Windows 7用户操作,并考虑到用户可能的技术水平,提供具体的下载链接和命令行示例。同时,提醒用户注意驱动兼容性,特别是Windows 7的支持可能有限,可能需要旧版驱动或补丁。</think>### Hashcat64.exe在Win7 64位系统下OpenCL错误与ICD Loader缺失解决方案 --- #### 一、**核心问题定位:OpenCL ICD Loader缺失** 错误提示“**无法找到OpenCL ICD Loader库**”表明系统缺失或未正确注册OpenCL的动态链接库(如`OpenCL.dll`),或显卡驱动未提供完整的OpenCL支持。以下是针对性解决方案: --- #### 二、**关键修复步骤** 1. **手动安装OpenCL ICD Loader** - **Intel官方方案**(通用性强): 1. 下载 [Intel® OpenCL™ Runtime for Legacy GPUs](https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html) 2. 安装时勾选 **"OpenCL ICD"** 组件(即使无Intel显卡,此操作可修复系统级ICD注册)[^1] - **AMD/NVIDIA替代方案**: - 从显卡驱动包提取`OpenCL.dll`: ```bash # 路径示例(NVIDIA默认安装路径): C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll # AMD路径: C:\Windows\System32\amdvlk64.dll # 可能需要重命名为OpenCL.dll ``` - 将文件复制到以下目录: ``` C:\Windows\System32 C:\Windows\SysWOW64 # 确保覆盖32位和64位环境 ``` 2. **修复系统依赖项** - 安装 **Visual C++ 2010 Redistributable**(x86+x64): - [Microsoft官方下载](https://learn.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist?view=msvc-170) - 运行系统文件检查: ```cmd sfc /scannow ``` 3. **注册表修复(高危操作需谨慎)** - 创建注册表项(若缺失): ```reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors] "C:\\Windows\\System32\\OpenCL.dll"=dword:00000000 ``` - 保存为`.reg`文件并双击导入[^2] --- #### 三、**驱动与运行环境配置** 1. **强制指定OpenCL实现** - 通过环境变量强制使用显卡厂商的ICD: ```cmd set OPENICD_LOADER_DEBUG=1 # 启用调试日志 set OPENCL_VENDOR_PATH=C:\Program Files\NVIDIA Corporation\OpenCL ``` - 运行Hashcat时附加平台参数: ```bash hashcat64.exe --opencl-platforms 1 --force -m 0 example.hash ``` 2. **驱动降级方案(针对老旧显卡)** - **NVIDIA**:安装 **R390分支驱动**(支持GeForce 400/500系列) - [驱动下载页面](https://www.nvidia.cn/Download/index.aspx) → 选择 **Windows 7 64位** → 版本 **391.35** - **AMD**:使用 **Crimson ReLive 17.7.1**(支持HD 7000及更早型号) - [AMD旧驱动库](https://www.amd.com/zh-hans/support/previous-drivers) --- #### 四、**验证与调试** 1. **诊断工具检查** - 运行 **clinfo.exe**: ```cmd clinfo.exe > output.txt ``` - 检查输出中是否包含 `ICD Loader` 版本及设备信息 - 使用 **GPU-Z** → 查看 **OpenCL** 支持状态是否激活 2. **Hashcat专用调试命令** ```bash hashcat64.exe -I # 显示可用OpenCL设备列表 hashcat64.exe -b # 运行基准测试,观察错误细节 ``` --- #### 五、**终极解决方案(如仍失败)** 1. **使用Hashcat Legacy版本** 下载兼容旧版OpenCL的Hashcat v5.x: ```bash https://hashcat.net/forum/thread-9210.html # 官方旧版存档 ``` 2. **虚拟机或Linux子系统** - 在Windows 7内通过 **VirtualBox** 安装 **Kali Linux** → 直接使用Linux版Hashcat(规避Win7兼容性问题) --- ### 相关问题 1. 如何判断OpenCL.dll文件是否被系统正确加载? 2. Hashcat报错"ERROR: clGetDeviceIDs() -1"该如何处理? 3. 在Windows 7中如何彻底清除残留的OpenCL注册表项? --- **引用说明** [^1]: Intel OpenCL运行时包含通用ICD Loader,可修复多厂商兼容性问题 [^2]: 注册表操作需备份系统,错误修改可能导致OpenCL功能完全失效
评论 9
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值