Installation, uninstallation and troubleshooting for the M50 accelerator driver (Linux / Windows)
| Version | Release Date | Description |
|---|---|---|
| 1.4.0 | July 11, 2026 | None. |
| 1.3.0 | May 22, 2026 |
|
| 1.2.0 | April 15, 2026 |
|
| 1.1.0 | March 12, 2026 |
|
| 1.0.0 | February 6, 2026 | None. |
| 0.7.0 | January 9, 2026 |
|
| 0.6.0 | December 15, 2025 |
|
| 0.5.0 | November 1, 2025 |
|
| 0.4.0 | October 20, 2025 |
|
| 0.3.0 | June 27, 2025 |
|
| 0.2.0 | June 27, 2025 | Initial version. |
This document describes how to install and uninstall the M50 software platform driver package, and provides common FAQs and troubleshooting procedures. It applies to M50-series products.
This document is mainly intended for the following engineers:
Driver installation and maintenance engineers
Marketing and sales personnel
R&D engineers
The system software release package provided by the M50 software platform contains a driver installer used to install the host-side driver.
The system software release package includes:
System driver package (chip driver package), used to install the driver, the SMI tool, and the HmUpdateTool:
Linux (Ubuntu, Kylin V11): drv-<target_hw>_<release>_${distro}_$arch.run
Linux (openEuler, Kylin V10): drv-<target_hw>-<release>-1.$arch.rpm
Windows: drv-<target_hw>_<release>.exe
System software tar package (chip firmware package), which mainly contains firmware images:
M50_<product_name>_fw-<target_hw>_<release>.tar.gz
Package naming conventions:
<target_hw> indicates the chip type:
xh2 stands for M50.
<release> indicates the system software package version.
${distro} indicates linux or windows11.
$arch indicates x86_64 or aarch64.
<product_name> indicates the product name:
M2: LQ50 M.2 card.
DM2: LQ50 Duo M.2 card.
PCIE_F: LM5070 intelligent accelerator card.
PCIE_H: LM5050 intelligent accelerator card.
PCIE_S: LM5030 intelligent accelerator card.
Note: Kylin V11 uses the driver installer for Ubuntu 20.04 AArch64.
The Linux host side supports driver installation in the following environments:
| Operating System | Architecture | Supported Kernel Versions |
|---|---|---|
| Ubuntu 20.04 | x86_64, AArch64 | 5.15.x, 5.10.x, 5.4.x |
| Ubuntu 22.04 | x86_64 | 5.4.0, 5.10.226, 6.8.0, 6.6.10 |
| Ubuntu 24.04 | x86_64 | 6.8.x, 6.17.0, 6.18.0, 6.12.x |
| UOS V20 | x86_64 | 6.6 |
| Kylin V11 | AArch64 | 6.6.x |
| Kylin V10 SP3 | x86_64 | 4.19 |
| openEuler 22.03 LTS openEuler 24.03 LTS | x86_64 | 6.6 |
| openEuler 25.03 LTS | AArch64 | 5.10.0 |
Note: Kylin V11 uses the driver installer for Ubuntu 20.04 AArch64.
This chapter describes the driver installation, uninstallation, and post-installation verification procedures on Ubuntu, Kylin V11, and UOS operating systems.
Complete the following steps before upgrading the driver:
Download the driver installer package.
Please download the driver installer for your operating system and architecture from the driver download page on this site: https://llm.bee-link.cn/drivers.php
Check environment requirements.
If this is not the first installation: uninstall the old driver version.
Python dependencies. Python 3.9+ is supported, and Python 3.9 is recommended.
The installation and configuration steps are as follows:
Run the following command to install Python 3, the development packages, and the pip package manager:
sudo apt-get install python3 python3-dev python3-pip -y
Configure the pip mirror source:
sudo pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
(Optional) Upgrade pip to the latest version.
Run the following command to confirm that the pip mirror source is correctly configured:
sudo pip3 config list
The output should contain global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'.
Run the following command to check the pip version and its associated Python environment:
sudo pip3 --version
Expected output example: pip 25.0.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9). The actual output depends on the Python version installed by the user.
(Optional) If the driver is upgraded through the GUI, install the graphical dependency libraries:
sudo apt install libxcb-util1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcb-cursor0
The driver installation process is as follows:
Figure 3.1Driver installation process
Detailed steps:
Warning
Before installing the driver, make sure the host network connection is normal; otherwise, dependency downloads may fail.
Complete the pre-installation steps.
In the package directory, run the following commands to add the execute permission to the installer and install the driver and dependency libraries:
Warning
Do not reset or power off the host or the device during installation; otherwise, the installation will fail.
Do not press Ctrl+C to interrupt the installation process; otherwise, a subsequent driver installation may fail. If the installation fails for this reason, contact the device vendor engineers.
The driver must be installed with sudo or as the root user.
It is recommended to use the install all option in the installation command to ensure that dependency libraries such as the HmUpdateTool image upgrade tool are installed at the same time; otherwise, later firmware image upgrades may fail.
chmod a+x drv-<target_hw>_<release>_${distro}_$arch.run
sudo bash ./drv-<target_hw>_<release>_${distro}_$arch.run install all --path <PATH>
PATH should be replaced with the driver installation path. If --path <PATH> is not specified, the driver is installed in the /usr/local/-sdk directory by default.
During installation, you may be prompted whether to clear the previous driver directory, for example:
the /usr/local/drv-xh2_<release> directory is not empty, do you want to clean the files in this directory
Enter yes.
During installation, you may be prompted to run a command to set the SDK environment, for example:
please input source /etc/profile.d/-sdk.sh command to enable sdk environment
Run the corresponding command as prompted to make the environment variables take effect:
source /etc/profile.d/-sdk.sh
Check whether the driver was installed successfully. The SMI tool is installed together with the driver.
Run the following SMI command in any directory to check whether the driver was installed successfully:
hm_smi -a
Example output:
-------------------------------------------------------------------------------- sdk build infos -------------------------------------------------------------------------------- Build_Time : 2026-07-15 09:54:29 HMSW_Version : V1.4.0 HM_SMI_Version : V1.0.0 -------------------------------------------------------------------------------- Wed Jul 15 13:58:28 CST 2026 -------------------------------------------------------------------------------- device0 detail infos -------------------------------------------------------------------------------- Driver_Version : V1.4.0 Vendor : BDF : 0000:01:00.0 Dev : 0 Cur_BandWidth : 8.0 GT/s x 4lane Power_Management : DVFS_Mode : performance Cur_Ipu_Freq : 1300.0 Mhz Lock_Ipu_Pll_Rate : 1300.0 Mhz IPU_Load : 0.0 % Firmware_Version : V1.4.0 IPU_Infos : Core_Num : 2 Core_Freq : 1300.0 Mhz Voltage : 750.0 mV Core0_Util : 0.0 % Core1_Util : 0.0 % Average_Util : 0.0 % Group_Id : 0 Chip_Id : 0 SN : 0102020100002025003800000059 PN : 100C2010 Model : LQ50-12GB DDR_Memory_Infos : DDR_Memory_Free : 12160.0MB DDR_Memory_Total : 12160.0MB Temperature : DDR0 : 25.9 C DDR2 : 26.6 C DDR4 : 23.6 C DDR5 : 24.8 C Core0 : 27.2 C Core1 : 26.0 C Board_Power : 5.26 W --------------------------------------------------------------------------------
If no AI device information is returned, restart the AI device and run the command again to check the device status.
If the firmware image version on the AI device is too old, driver installation may fail. Use the HmUpdateTool to flash and upgrade the firmware image before installing the driver (HmUpdateTool is included in the driver package; use the install all option when installing the driver to install it together). For details, see the HmUpdateTool User Guide.
Run the following command on the host to uninstall the driver:
Note
Do not press Ctrl+C to interrupt the uninstallation process; otherwise, a subsequent uninstallation may fail. If the uninstallation fails for this reason, contact the device vendor engineers.
The driver must be uninstalled with sudo or as the root user.
This chapter describes the driver installation, uninstallation, and post-installation verification procedures on openEuler / Kylin V10 operating systems.
Complete the following steps before upgrading the driver:
Download the driver installer package.
Please download the driver installer for your operating system and architecture from the driver download page on this site: https://llm.bee-link.cn/drivers.php
Check environment requirements.
If this is not the first installation: uninstall the old driver version.
On the host, make sure the following dependencies are installed:
Install the dependency tools.
sudo dnf update -y && sudo dnf install -y \ python3 \ python3-libs \ python3-devel \ gcc \ gcc-c++ \ curl
Install and initialize pip.
curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \ && python3 /tmp/get-pip.py -i https://pypi.tuna.tsinghua.edu.cn/simple \ && rm /tmp/get-pip.py
Configure the mirror source and install the core dependencies.
sudo pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \ && sudo pip3 install \ "setuptools>=45.0" \ "cython>=0.29.0" \ pyyaml \ pyserial \ && sudo pip3 install --no-cache-dir PySide6
Detailed steps:
Warning
Before installing the driver, make sure the host network connection is normal; otherwise, dependency downloads may fail.
Complete the pre-installation steps.
In the directory of the driver package, run the following command to install the driver:
Warning
Do not reset or power off the host or the device during installation; otherwise, the installation will fail.
Do not press Ctrl+C to interrupt the installation process; otherwise, a subsequent driver installation may fail. If the installation fails for this reason, contact the device vendor engineers.
The driver must be installed with sudo or as the root user.
sudo yum install drv-<target_hw>-<release>-1.$arch.rpm
(Optional) If the installation reports that kernel headers are missing, install the kernel development package according to the log, for example:
sudo dnf install kernel-devel-6.6.0-72.0.0.76.oe2403sp1.x86_64
Then run the driver installation again:
sudo yum install drv-<target_hw>-<release>-1.$arch.rpm
Check whether the driver was installed successfully. The SMI tool is installed together with the driver.
Run the following SMI command in any directory to check whether the driver was installed successfully:
hm_smi -a
Example output:
-------------------------------------------------------------------------------- sdk build infos -------------------------------------------------------------------------------- Build_Time : 2026-07-15 09:54:29 HMSW_Version : V1.4.0 HM_SMI_Version : V1.0.0 -------------------------------------------------------------------------------- Wed Jul 15 13:58:28 CST 2026 -------------------------------------------------------------------------------- device0 detail infos -------------------------------------------------------------------------------- Driver_Version : V1.4.0 Vendor : BDF : 0000:01:00.0 Dev : 0 Cur_BandWidth : 8.0 GT/s x 4lane Power_Management : DVFS_Mode : performance Cur_Ipu_Freq : 1300.0 Mhz Lock_Ipu_Pll_Rate : 1300.0 Mhz IPU_Load : 0.0 % Firmware_Version : V1.4.0 IPU_Infos : Core_Num : 2 Core_Freq : 1300.0 Mhz Voltage : 750.0 mV Core0_Util : 0.0 % Core1_Util : 0.0 % Average_Util : 0.0 % Group_Id : 0 Chip_Id : 0 SN : 0102020100002025003800000059 PN : 100C2010 Model : LQ50-12GB DDR_Memory_Infos : DDR_Memory_Free : 12160.0MB DDR_Memory_Total : 12160.0MB Temperature : DDR0 : 25.9 C DDR2 : 26.6 C DDR4 : 23.6 C DDR5 : 24.8 C Core0 : 27.2 C Core1 : 26.0 C Board_Power : 5.26 W --------------------------------------------------------------------------------
If no AI device information is returned, restart the AI device and run the command again to check the device status.
Run the following command on the host to uninstall the driver:
Note
Do not press Ctrl+C to interrupt the uninstallation process; otherwise, a subsequent uninstallation may fail. If the uninstallation fails for this reason, contact the device vendor engineers.
The driver must be uninstalled with sudo or as the root user.
The command is as follows:
./drv-<target_hw>_<release>_${distro}_$arch.run [install] [uninstall] [extract] [--path <PATH>] [--help|-h] [--version|-v]
The options are described in the following table:
| Option | Description | Example |
|---|---|---|
| install | Installs the driver installer package.
| Example of installing the driver and dependency libraries:
sudo ./drv-<target_hw>_<release>_${distro}_$arch.run install all |
| uninstall | Uninstalls the driver installer package.
| Example of uninstalling the driver and dependency libraries:
sudo ./drv-<target_hw>_<release>_${distro}_$arch.run uninstall all |
| extract | Extracts all files from the driver installer archive. | Extracts all files to the /root/home_drv directory:
./drv-<target_hw>_<release>_${distro}_$arch.run extract --path /root/home_drv |
| --path <PATH> | Specifies the path used to install, uninstall, or extract the driver installer package. | Installs the driver and dependency libraries to the /root/home_drv directory:
sudo ./drv-<target_hw>_<release>_${distro}_$arch.run install driver --path /root/home_drv |
| --help|-h | Displays help information for the system software installer command. | Example:
./drv-<target_hw>_<release>_${distro}_$arch.run --help
The output is as follows: ./drv-v1.2.0_ubuntu1804_x86_64.run [uninstall] [install] [extract] [--path] [--help|-h] [--version|-v] uninstall [all | lib | driver] clean install package install [all | lib | driver] install package with type extract extract package --path INSTALLPATH install path or extract path --help|-h using document --version|-v show version |
| --version|-v | Displays the version number of the system software installer. | Example: |
This chapter describes the driver installation, uninstallation, and post-installation verification procedures on the Windows operating system.
The Windows host side supports driver installation in the following environment:
Windows 11
Complete the following steps before upgrading the driver:
Download the driver installer package.
Please download the driver installer for your operating system and architecture from the driver download page on this site: https://llm.bee-link.cn/drivers.php
Check environment requirements.
If this is not the first installation: uninstall the old driver version.
MinGW-w64 dependency installation:
Download the MinGW-w64 installer.
Double-click the downloaded w64devkit-x64-2.4.0.7z.exe and choose the extraction path, for example D:.
Configure the system environment variables. Add the bin path extracted from MinGW-w64 to the system Path environment variable, for example: D:\w64devkit\bin.
Python dependency installation:
Python 3.9 to 3.13 are supported; Python 3.12 is recommended (Python 3.12 installer).
Note
Different Windows versions have different Python support ranges. Before installing Python, confirm that the current operating system version meets the official support requirements of the target Python version.
Configure the system environment variables. Add the Python path to the system Path environment variable. The directory structure may differ with different Python versions and installation methods; use the actual installation result. Usually, it is recommended to include at least the following directories (if they exist):
%python_path%\Scripts\
%python_path%\
%python_path% should be replaced with the actual local Python installation path, for example: C:\Program Files\Python312\.
Note:
Not all Python installations create a Scripts directory. For example, slim installations or environments that only run the embedded interpreter may not have this directory.
If Python Launcher (py.exe) is installed, the following directory may also be added (if it exists):
%python_path%\Launcher\
You can also select the Add python.exe to PATH check box during Python installation to set the environment variable automatically, as shown below:
Figure 4.1Setting the Python environment variable on the Windows host
pip source configuration and update:
The following configuration only applies to network environments where the official PyPI cannot be accessed stably.
Open a Command Prompt window as administrator.
Run the following command to install pip. If pip is already installed, skip this step:
python -m ensurepip --upgrade
After installation, run pip --version to check whether pip was installed successfully.
Configure the system environment variables. Add the pip installation path to the system Path environment variable, for example: C:\Program Files\Python312\Scripts\.
Run the following command to configure pip:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Update the local pip to the latest version:
pip install --upgrade pip
One-click driver installation is supported. Currently, only one AI device can be installed on a single host.
Perform the following steps for one-click driver installation:
Warning
Before the host is restarted, shut down, powered off, or put into sleep, make sure the driver version matches the firmware version to prevent the system from failing to boot.
Before installing the driver, make sure the host network connection is normal; otherwise, dependency downloads may fail.
Complete the pre-installation steps.
Right-click drv-<target_hw>_<release>.exe and select Run as administrator (A) in the pop-up menu. The Setup window appears, as shown below:
Figure 4.2Driver installation window
In the Setup window, click Install.
If the driver is installed successfully, a window pops up as shown below. Click OK to restart the host.
Figure 4.3Windows host restart window
Check whether the driver was installed successfully. In the search box on the taskbar, type Device Manager, and then select Device Manager from the menu. The Device Manager window appears.
If the AI Device node exists, the installation was successful, as shown in the example below:
Figure 4.4Driver installation: AI device node in Device Manager
Disable dynamic power management.
To prevent Windows from automatically powering off the AI device when idle or under power management scenarios, disable the dynamic power management feature of the device. Follow these steps:
Press Win + R to open the Run dialog box.
Type regedit and press Enter to open Registry Editor. If the User Account Control (UAC) prompt appears, select Yes.
In Registry Editor, navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\
In the right pane, set the runtimeidle value data to 0.
Restart the host or power off and then power on the AI device.
To uninstall driver v0.6.0 or later, you can uninstall the installed driver package through system settings. The steps are as follows:
Open Settings -> Apps -> Installed apps.
Find drv-xh2 <release> in the application list, as shown below:
Figure 4.5Uninstalling the driver through Windows system settings
Click More options (three dots) on the right of the application, select Uninstall, and follow the prompts to complete the uninstallation.
To uninstall driver v0.5.0 or earlier, run the following command on the host:
Open a Windows Command Prompt window as administrator.
Warning
The Command Prompt window must be run as administrator.
In the Command Prompt window, go to the directory of the driver installer package.
Enter the following command to uninstall the driver:
.\drv-<target_hw>_<release>.exe /SILENT command=uninstall
In the pop-up window, click Yes to uninstall the driver.
In the search box on the taskbar, type Device Manager, and then select Device Manager from the menu. The Device Manager window appears. If the AI Device node no longer exists, the uninstallation was successful.
Ubuntu driver installation fails with a missing DKMS record error
The following error may appear during Ubuntu driver installation:
Error! The module/version combo: xh2_driver-0.3.0:added is not located in the DKMS tree.
Cause:
Old driver remnants or DKMS cache remain on the system, preventing the current driver version from being registered correctly.
Solution:
Uninstall the old driver and clear the DKMS records as follows, then reinstall the driver:
sudo ./drv-<target_hw>_<release>_${distro}_$arch.run uninstall all
sudo dkms remove xh2_driver/<release>
sudo ./drv-<target_hw>_<release>_${distro}_$arch.run install all --path <PATH>
Where:
<target_hw> indicates the chip type.
<release> indicates the system software package version.
${distro} indicates ubuntu2004 or ubuntu2404.
$arch indicates x86_64 or aarch64.
PATH should be replaced with the driver installation path. If --path <PATH> is not specified, the driver is installed in the /usr/local/-sdk directory by default.
Ubuntu driver installation fails with pci_alloc_irq_vectors failed
During Ubuntu driver installation, dmesg reports pci_alloc_irq_vectors failed -28.
Cause 1:
The AI device has been taken offline, but the kernel has not updated the PCI device information in time, causing the driver to fail to allocate interrupt vectors.
How to identify:
Check the AI device status:
lspci -s BB:DD.F -vvv
Where BB:DD.F is the PCIe BDF of the AI device. If the following information is returned, the AI device information has not been updated:
03:00.0 Memory controller: Device 1f6b:0c00 (rev ff) (prog-if ff) !!! Unknown header type 7f Kernel modules: xh2a_drv
Solution:
Uninstall the driver.
Rescan the AI device, for example:
echo 1 | sudo tee /sys/bus/pci/devices/<pcie_bdf>/remove echo 1 | sudo tee /sys/bus/pci/rescan
Where <pcie_bdf> is the BDF of the parent PCI device, for example 0000\:00\:07.0.
Restart the host.
Cause 2:
If the above cause is ruled out but the problem persists, the current host configuration may not support allocating multiple MSI interrupts. Check the host BIOS settings.
Solution:
x86_64 platforms:
Check the BIOS/UEFI configuration and make sure the platform IOMMU feature is enabled. Different vendors may name it VT-d, AMD VT, IO Virtualization, IOMMU, and so on.
Common platform configuration examples:
Some Hygon platform hosts: the IOMMU configuration item is located at Chipset -> NBIO -> IOMMU; enable it.
Other Hygon platform hosts: the IOMMU configuration may be under the Hygon CBS menu; make sure the related options are enabled.
AMD and Hygon processors: you can check whether the ACPI IVRS table exists to help determine whether IOMMU is enabled:
ls /sys/firmware/acpi/tables/IVRS
If the file exists, IOMMU is usually enabled correctly in the BIOS; if it does not exist, IOMMU may not be enabled in the BIOS.
BYOI (BaiAo) generic BIOS: find the IO Virtualization or IOV Support option in the BIOS menu and enable it.
BaiAo Kaitian dedicated BIOS: copy the attachment to the target host, extract it, enter the directory, and run the following command with root privileges:
./mfgdone.sh -clr
Restart the system, press F1 to enter BIOS Setup, go to the Advanced menu, press Ctrl+Z to bring up the CRB menu, and set the IOV Support option to enabled.
ARM platforms:
Confirm that GIC/ITS or interrupt remapping is enabled on the actual platform.
Ubuntu 22.04 driver installation fails with a DKMS compilation error
During driver installation on Ubuntu 22.04 x86_64, the following error may appear:
ERROR (dkms apport): binary package for xh2_driver: v1.1.0 not found Error! Bad return status for module build on kernel: 6.8.0-101-generic (x86_64) Consult /var/lib/dkms/xh2 driver/v1.1.0/build/make.log for more information.
Cause:
The system is missing a GCC compiler that matches the kernel version.
When the driver module is compiled through DKMS, the default GCC version used by the system must match the kernel compiler version; otherwise, compilation fails.
Solution:
Install GCC 12 (make sure it is compatible with the kernel version):
sudo apt update sudo apt install gcc-12 g++-12
Verify the GCC version:
gcc --version
Set GCC 12 as the default compiler:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 sudo update-alternatives --config gcc sudo update-alternatives --config g++
depmod stays stuck for a long time when installing the driver on Linux ARM
When installing the driver on Linux ARM, the driver module may already be compiled and installed to the kernel module directory, but the installation may stay stuck at the depmod stage and cannot continue. Example log:
sudo ./drv-xh2_v1.3.0_linux_aarch64.run install all --build-host false [INFO] 2026-06-03 16:19:35 drv-xh2_v1.3.0_linux_aarch64.run: --------------init release env--------------------- [INFO] 2026-06-03 16:19:35 drv-xh2_v1.3.0_linux_aarch64.run: release user is sky, and user bashrc path is /home/sky [INFO] 2026-06-03 16:19:35 drv-xh2_v1.3.0_linux_aarch64.run: gcc is already installed, version: 11 [INFO] 2026-06-03 16:19:35 drv-xh2_v1.3.0_linux_aarch64.run: dependencies_kernel_module is [INFO] 2026-06-03 16:19:48 drv-xh2_v1.3.0_linux_aarch64.run: extract release path is /usr/local/-sdk [INFO] 2026-06-03 16:19:48 drv-xh2_v1.3.0_linux_aarch64.run: Installing /etc/profile.d/-sdk.sh [INFO] 2026-06-03 16:19:59 drv-xh2_v1.3.0_linux_aarch64.run: installing xh2a driver [INFO] 2026-06-03 16:19:59 drv-xh2_v1.3.0_linux_aarch64.run: No xh2_driver installed. /tmp/drv-xh2_v1.3.0/driver /home/sky/ Creating symlink /var/lib/dkms/xh2_driver/v1.3.0/source -> /usr/src/xh2_driver-v1.3.0 Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area.... make -j8 KERNELRELEASE=5.10.226 -C /lib/modules/5.10.226/build M=/var/lib/dkms/xh2_driver/v1.3.0/build...... cleaning build area.... xh2a_drv.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/5.10.226/updates/dkms/ depmod....................
Cause:
This problem usually occurs when depmod is updating the kernel module dependency information. The driver module may have finished compiling, but the system gets stuck while scanning the kernel module directories and generating module dependency information, so the installation cannot finish.
depmod getting stuck for a long time is usually related to an abnormal kernel module environment or filesystem state. Common causes include:
Kernel module dependency files such as modules.dep are corrupted or abnormally large.
Symbolic link loops exist in the kernel module directory.
Abnormal disk I/O or filesystem errors.
A kernel module file is corrupted, so depmod cannot finish parsing dependencies.
The current system image or kernel module directory is in an abnormal state.
Solution:
Handle the issue as follows:
Terminate the stuck depmod process.
If the installation stays stuck at the depmod stage for a long time, run the following command to terminate the depmod process:
sudo killall -9 depmod
Run the driver installation again.
After terminating depmod, rerun the driver installation command to check whether the installation can complete normally:
sudo ./drv-xh2_<release>_linux_aarch64.run install all --build-host false
Manually load the driver module.
If the installation still gets stuck at the depmod stage after reinstalling, but the xh2a_drv.ko module has already been generated, try loading the module manually:
sudo insmod /var/lib/dkms/xh2_driver/kernel-5.10.226-aarch64/module/xh2a_drv.ko
Note
The above path is only an example. Confirm the actual path of xh2a_drv.ko according to the actual kernel version and DKMS output directory. If the path does not exist, check the module file location generated under /var/lib/dkms/xh2_driver/.
Check the system environment.
If depmod gets stuck repeatedly, check the kernel module directory, disk I/O, and filesystem state to confirm whether there are corrupted files, abnormal symbolic links, or system image problems.
If the system image or kernel module environment is confirmed to be abnormal, reflash the system image and then install the driver.
Windows driver uninstallation fails with remove driver fail
The following error may appear during Windows driver uninstallation:
checking Xh2aHostDriver with class AI Device removing 1/1: oem3.inf remove driver fail, error: 5
Cause:
The command was not run as administrator.
Solution:
Run the Command Prompt window as administrator.
Device recognition is abnormal after installing the driver through Windows Remote Desktop
On Windows, if the driver is installed through a remote desktop connection, for example Windows Remote Desktop or other third-party remote control software, the AI device may still not be recognized normally even if the driver shows as installed successfully, as shown below:
Figure 5.1Abnormal device display on Windows
Solution:
Install the driver and manage the AI device through a local physical login, and avoid performing these operations through a remote desktop connection.
The system freezes when running the SMI tool after Windows driver installation
On Windows, the system may freeze or crash when running the SMI tool after the driver is installed.
Solution:
Do not run the SMI tool immediately after the driver upgrade. First upgrade the firmware to a version consistent with the current driver, and only use the SMI tool after the firmware and driver versions match.
Windows driver fails to load with a signature integrity check error
After the driver is installed on Windows, the operating system cannot recognize the driver. The system log contains the following information:
Error code: 0x27, indicating that the driver failed to load.
Status code: 0xc0e90002 STATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION, indicating that a policy violation was triggered during the Windows driver signature integrity check. The Windows CI mechanism determined that the current driver signature does not meet the integrity requirements and blocked the driver from loading.
Cause:
On some Windows versions, after system patch rollback, the signature verification policy may become abnormal, preventing the system from correctly verifying third-party driver signatures and blocking the driver from loading.
Solution:
Disable Secure Boot and disable the driver forced signature verification during system startup. The steps are as follows:
Note
The following operations only apply to drivers that have passed Microsoft WHQL or Microsoft Attestation signature verification. For drivers without official Microsoft signatures, do not disable Secure Boot or forced signature verification; otherwise, system security risks may be introduced.
Disable Secure Boot.
Restart the system and enter the BIOS/UEFI setup interface.
Find the Secure Boot configuration item. Its location may vary by motherboard or host model, usually under the Security, Boot, or Authentication menu.
Set Secure Boot to Disabled.
Save the configuration and restart the system.
Disable the driver forced signature verification:
Open Settings -> Update & Security -> Recovery.
In the Advanced startup area, click Restart now.
After the system restarts into the advanced startup menu, select Troubleshoot -> Advanced options -> Startup Settings.
Click Restart, and on the Startup Settings screen select 7) Disable driver signature enforcement.
After completing the above configuration, the system can load the driver normally and the device can be used.
insmod fails when loading the driver module during a Kylin V11 driver upgrade
On Kylin V11, insmod fails when the driver is upgraded.
Solution:
Before upgrading the driver, perform the following steps:
Note
The user must have root privileges.
Run the getstatus command to check the security mechanism status.
Run the setstatus disable command to disable the security mechanism.
openEuler driver installation fails because kernel headers are missing
During driver installation on openEuler 22.03 LTS or openEuler 24.03 LTS, the following error may appear:
CRITICAL: Kernel headers for 5.10.0-216.0.0.115.oe2203sp4.x86_64 are missing! The driver cannot be compiled. Please run the provided 'install.sh' script to fix dependencies Or manually run: dnf install kernel-devel-5.10.0-216.0.0.115.oe2203sp4.x86_64
Solution:
Uninstall the driver:
sudo yum remove drv-xh2.x86_64
Install the kernel development package according to the log, for example:
sudo dnf install kernel-devel-6.6.0-72.0.0.76.oe2403sp1.x86_64
Install the driver:
sudo yum install drv-<target_hw>-<release>-1.$arch.rpm
openEuler driver installation fails with a network connection interruption
During driver installation on openEuler 22.03 LTS, the following error may appear:
ConnectionResetError: [Errno 104] Connection reset by peer
Solution:
Configure a domestic PyPI mirror source to speed up and stabilize downloads, for example:
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip3 config set global.trusted-host pypi.tuna.tsinghua.edu.cn pip3 config set global.timeout 600
Install the driver:
sudo yum install drv-<target_hw>-<release>-1.$arch.rpm
Adapted from the official M50 driver documentation for M50 accelerator card users.