驱动安装kernel不匹配,cp: can't stat '/metax/kernel_ module/5.15.0-139-generic'

[复制链接]
15 0

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x

在ubuntu 22.04版本安装驱动后无法使用(例如:metax-driver-mxc500-2.32.0.6-deb-x86_64.run,kenrel版本:Linux ub22-4c16g-zhiyuan 5.15.0-139-generic

但可以用pci查看是由沐曦的设备:
  1. muxiuser@ub22-4c16g-zhiyuan:~$ lspci|grep -i 9999
  2. 00:09.0 Display controller: Device 9999:4001 (rev 01)
复制代码


安装驱动报错信息如下:
  1. root@ub22-4c16g-zhiyuan:~# ./metax-driver-mxc500-2.32.0.6-deb-x86_64.run
  2. Verifying archive integrity...  100%   MD5 checksums are OK. All good.
  3. Uncompressing MetaX driver installer  100%
  4. uninstalling metax-linux
  5. (Reading database ... 110384 files and directories currently installed.)
  6. Removing metax-linux (2.14.6) ...
  7. metax-linux package uninstalled successfully
  8. Purging configuration files for metax-linux (2.14.6) ...
  9. metax-linux package uninstalled successfully
  10. uninstalling mxsmt
  11. (Reading database ... 110334 files and directories currently installed.)
  12. Removing mxsmt (2.32.0.6) ...
  13. mxsmt package uninstalled successfully
  14. Purging configuration files for mxsmt (2.32.0.6) ...
  15. mxsmt package uninstalled successfully
  16. dpkg: warning: while removing mxsmt, directory '/opt/mxdriver' not empty so not removed
  17. uninstalling mxfw
  18. (Reading database ... 110321 files and directories currently installed.)
  19. Removing mxfw (1.24.3.0) ...
  20. mxfw package uninstalled successfully
  21. Purging configuration files for mxfw (1.24.3.0) ...
  22. mxfw package uninstalled successfully
  23. installing packages under /opt/mxdriver
  24. installing deb/mxfw_1.24.3.0-1.all.deb
  25. Selecting previously unselected package mxfw.
  26. (Reading database ... 110289 files and directories currently installed.)
  27. Preparing to unpack deb/mxfw_1.24.3.0-1.all.deb ...
  28. Unpacking mxfw (1.24.3.0) ...
  29. Setting up mxfw (1.24.3.0) ...
  30. mxfw package installed successfully
  31. installing deb/mxsmt_2.32.0.6.amd64.deb
  32. Selecting previously unselected package mxsmt.
  33. (Reading database ... 110321 files and directories currently installed.)
  34. Preparing to unpack deb/mxsmt_2.32.0.6.amd64.deb ...
  35. Unpacking mxsmt (2.32.0.6) ...
  36. Setting up mxsmt (2.32.0.6) ...
  37. mxsmt package installed successfully
  38. Processing triggers for libc-bin (2.35-0ubuntu3.9) ...
  39. installing deb/metax-linux_2.14.6-1_amd64.deb
  40. Selecting previously unselected package metax-linux.
  41. (Reading database ... 110334 files and directories currently installed.)
  42. Preparing to unpack .../metax-linux_2.14.6-1_amd64.deb ...
  43. Unpacking metax-linux (2.14.6) ...
  44. Setting up metax-linux (2.14.6) ...

  45. Notice: The current kernel version (5.15.0-139-generic) is not supported.
  46. Please upgrade your kernel to one of the following versions:
  47. 5.10.0-0.deb10.28-amd64
  48. 5.10.0-29-amd64
  49. 5.15.0-100-generic
复制代码



安装驱动后,无法用命令mx-smi查看卡,如下:
  1. muxiuser@ub22-4c16g-zhiyuan:~$ mx-smi
  2. mx-smi version: 2.2.3
  3. No available devices were discovered
复制代码



问题原因:
1. 驱动不支持现在已安装的kernel版本,需要切换支持的列表。


解决方法:
1) 查看已安装的kernel列表
  1. root@ub22-4c16g-zhiyuan:~# dpkg --list | grep 'linux-image' | grep '^ii'
  2. ii  linux-image-5.15.0-119-generic         5.15.0-119.129                          amd64        Signed kernel image generic
  3. ii  linux-image-5.15.0-139-generic         5.15.0-139.149                          amd64        Signed kernel image generic
  4. ii  linux-image-generic                    5.15.0.139.135                          amd64        Generic Linux kernel image
复制代码
2)编辑 GRUB 配置文件:使用文本编辑器打开 GRUB 的配置文件。你可以使用 sudo 权限编辑 /etc/default/grub 文件:
  1. root@ub22-4c16g-zhiyuan:~# vim /etc/default/grub
复制代码



3)修改 GRUB_DEFAULT:在文件中找到 GRUB_DEFAULT 这一行。你可以设置它为特定的内核版本,例如:
  1. GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-119-generic"
  2. GRUB_TIMEOUT_STYLE=hidden
  3. GRUB_TIMEOUT=0
  4. GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
  5. GRUB_CMDLINE_LINUX_DEFAULT=""
  6. GRUB_CMDLINE_LINUX=""
复制代码
4)更新 GRUB:保存文件并关闭编辑器,然后运行以下命令以更新 GRUB 配置:
  1. sudo update-grub
复制代码


5)确认结果
查看启动kernel版本:
  1. muxiuser@ub22-4c16g-zhiyuan:~$ uname -a
  2. Linux ub22-4c16g-zhiyuan 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
复制代码


查看是否解决,安装驱动metax-driver-mxc500-2.32.0.6-deb-x86_64.run,执行mx-smi命令查看设备。
  1. muxiuser@ub22-4c16g-zhiyuan:~$ mx-smi
  2. mx-smi  version: 2.2.3

  3. =================== MetaX System Management Interface Log ===================
  4. Timestamp                                         : Tue May 13 10:23:12 2025

  5. Attached GPUs                                     : 1
  6. +---------------------------------------------------------------------------------+
  7. | MX-SMI 2.2.3                        Kernel Mode Driver Version: 2.14.6          |
  8. | MACA Version: unknown               BIOS Version: 1.16.2.0                      |
  9. |------------------------------------+---------------------+----------------------+
  10. | GPU         NAME                   | Bus-id              | GPU-Util             |
  11. | Temp        Pwr:Usage/Cap          | Memory-Usage        |                      |
  12. |====================================+=====================+======================|
  13. | 0           MetaX C500             | 0000:00:09.0        | 0%                   |
  14. | 35C         51W / NA               | 858/65536 MiB       |                      |
  15. +------------------------------------+---------------------+----------------------+

  16. +---------------------------------------------------------------------------------+
  17. | Process:                                                                        |
  18. |  GPU                    PID         Process Name                 GPU Memory     |
  19. |                                                                  Usage(MiB)     |
  20. |=================================================================================|
  21. |  no process found                                                               |
  22. +---------------------------------------------------------------------------------+

  23. End of Log
复制代码



















您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

©沐曦 沪ICP备2020031767号-1
快速回复 返回顶部 返回列表