Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Vulkan: driver name of a previous device is concatenated on multi-GPU systems

Đã đóng Phù hợp với người mới
#2,619 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu trong src/detection/vulkan/vulkan.c, đọc detectVulkan và applyDriverName cùng với chú thích hiện có về việc ghi đè. Tái hiện vấn đề bằng fastfetch -s vulkan --pipe -l none trên hệ thống có nhiều GPU, sau đó xác minh rằng tên driver được hiển thị chỉ là tên của thiết bị có phiên bản API cao nhất và không bị nối với tên của thiết bị trước đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

  • I have checked the FAQ but the issue is not covered
Description

On a system with two Vulkan devices, the Vulkan module prints the driver names of both devices glued together:

$ fastfetch -s vulkan --pipe -l none
Vulkan  1.4.354 - NVIDIA [615.71.09]radv [Mesa 26.2.2-arch1.1]

Expected: radv [Mesa 26.2.2-arch1.1], the driver of the device with the highest API version.

In detectVulkan (src/detection/vulkan/vulkan.c), the comment says the driver name should be overwritten whenever a device with a higher API version is found:

// If the device api version is higher than the current highest device api version, overwrite it
// In this case, also use the current device driver name as the shown driver name

However, applyDriverName only appends to result with ffStrbufAppendS and never clears it first. The NVIDIA device is enumerated first and sets the name. The RADV device comes second with a higher API version, and its name is appended to the NVIDIA one instead of replacing it.

As far as I can tell this has been the case since the Vulkan module was added. It only shows up when the device with the highest API version is not the first one enumerated.

A PR with the fix follows: it clears the buffer at the start of applyDriverName.

Version used: fastfetch 2.68.1 (Arch package); also reproduced on dev @ 9801d89 built from source
Bug prevalence: Always
Regression: No
Installation: Package manager
Package manager: pacman

System information
OS      Arch Linux (rolling), kernel 6.18.52-1-lts, x86_64
GPU 1   AMD Raphael [Integrated]   (Vulkan driver: radv, Mesa 26.2.2)
GPU 2   NVIDIA GeForce RTX 5060 [Discrete]   (Vulkan driver: NVIDIA 615.71.09, nvidia-open)
Ngôn ngữ chính
C
Star
24.7k
Fork
895
Merge trung bình
22 giờ 43 phút
Pull request đã merge (30 ngày)
20

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fastfetch-cli/fastfetch

Tất cả issue của fastfetch-cli/fastfetch

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.