[Bug] Environment check: Intel GPU detection fails — xpu-smi JSON unmarshal error (memory_physical_size_byte type mismatch)
维护者通常 1 天内回复
@wanghe-fit2cloud 已经在做这个了。
开始于 2026年11月16日。
评估
这个 Issue 还没有评估数据。
描述
Contact Information
No response
Product
1Panel
Version
v2.5.1
Problem Description
Intel GPU 环境检测失败。xpu-smi 已正确安装且 CLI 可正常输出设备信息,但 1Panel 环境检查(Environment Check)解析 xpu-smi --output json 输出时,discoveryDevice struct 中 memory_physical_size_byte 字段定义为 string 类型,而 xpu-smi 实际输出为 JSON number,导致 unmarshal 失败,检测状态显示为"检测失败"(红色)。
Steps to Reproduce
-
在装有 Intel iGPU(Intel Core Ultra 7 265K / Arrow Lake-S)的机器上安装 xpu-smi:
sudo add-apt-repository ppa:kobuk-team/intel-graphics sudo apt install xpu-smi -
确认 xpu-smi CLI 正常:
$ xpu-smi | 0 Intel(R) Graphics Off | 0000:00:02.0 Off | Disabled | | N/A N/A N/A | 26242MiB / 7797MiB | 0% Default | -
打开 1Panel → 环境检查 → 点击"重新检测"
-
"Intel · 驱动与设备管理工具" 显示 检测失败(红色标记)
The expected correct result
环境检查应正确解析 xpu-smi JSON 输出,Intel GPU 显示为"正常"状态(类似 NVIDIA 的展示方式:驱动版本 + 显存信息)。
Related log output
Intel · 驱动与设备管理工具: 无法通过 xpu-smi 读取设备信息,请检查驱动状态。
xpu-smi device 0 output: json: cannot unmarshal number into Go struct field discoveryDevice.memory_physical_size_byte of type string
Additional Information
- 1Panel 版本:v2.5.1(最新)
- OS:Ubuntu 26.04
- CPU:Intel Core Ultra 7 265K(Arrow Lake-S,含 Arc iGPU)
- xpu-smi 版本:v2.3.0(Intel 官方 PPA 安装)
- NVIDIA 部分:正常(驱动 595.99.02,RTX 5090)
- 根因:xpu-smi JSON 输出中
memory_physical_size_byte为整数(如7990848512),1PaneldiscoveryDevicestruct 定义为string,类型不匹配 - 修复建议:将该字段类型从
string改为uint64/int64,或做兼容处理(同时接受 string 和 number)
- 主要语言
- Go
- 星标
- 37.4k
- 派生
- 3.4k
- 平均合并
- 8 小时 53 分钟
- 30 天内合并 PR
- 179
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
1Panel-dev/1Panel 的其他 Issue
-
type: optimization
难度 2/5 1-3 小时 新手友好度 76/100
1Panel-dev/1Panel#14456 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] GPU Monitoring Not Detected可能已有人在做 @wanghe-fit2cloud 今天认领。 未关闭type: question
1Panel-dev/1Panel#14454 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug] Requests beyond the concurrency limit fail immediately instead of entering the queue (concurrency: 1, queue size: 50)可能已有人在做 @wanghe-fit2cloud 于 1 天前认领。 未关闭type: ai-gateway
1Panel-dev/1Panel#14452 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] Optimize Network and Disk Configuration When Creating a Virtual Machine可能已有人在做 @wanghe-fit2cloud 于 4 天前认领。 未关闭type: optimization
1Panel-dev/1Panel#14439 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug] In the toolbox's disk management, disks in exFAT format cannot be mounted.可能已有人在做 @wanghe-fit2cloud 于 4 天前认领。 未关闭type: to-be-verified
1Panel-dev/1Panel#14438 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 1Panel-dev/1Panel 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
trufflesecurity/trufflehog#5573 ·
维护者通常 1 天内回复
-
Type/Improvement
难度 2/5 1-3 小时 新手友好度 67/100
OpenNSW/nsw-srilanka#1259 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
katzenpost/katzenpost#1287 ·
维护者通常 2 天内回复
-
C-bug O-community X-blathers-untriaged
难度 2/5 1-3 小时 新手友好度 76/100
cockroachdb/cockroach#176245 · 1 条评论 ·