-
Couldn't load subscription status.
- Fork 53
Add comprehensive GPU details using lspci and lshw to configuration report #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added new LshwGPUScriptName script for lshw -class display - Updated GPU struct with additional fields: LogicalName, BusInfo, Version, Width, Clock, Capabilities, Configuration, Resources - Modified gpuInfoFromOutput to parse detailed lshw output - Updated gpuTableValues to display all new GPU fields - Changed GPU table to use new lshw gpu script instead of generic lshw Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
- Changed lshw script to use -numeric flag to get vendor/device IDs - Updated parsing logic to extract PCI ID from product field (e.g., [1414:5353]) - Fixed vendor name extraction to remove brackets with vendor ID - PCI ID now correctly stored in vendor:device format (e.g., 1414:5353) Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
- Added extractPCIIDFromBrackets helper function - Added removeBracketedSuffix helper function - Simplified product and vendor parsing logic - Improved code readability and maintainability Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
- Search for closing bracket after opening bracket - Correctly calculate slice indices to avoid errors - Handle edge cases like backwards brackets and multiple brackets Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
|
@copilot remove gpu_defs.go if it is no longer in use. |
|
@copilot use field names from lshw, e.g., instead of "Manufacturer", use "Vendor" and instead of "Model" use "Product". |
- Removed gpu_defs.go as it's no longer used - Renamed GPU struct fields: Manufacturer -> Vendor, Model -> Product - Updated table field names to match lshw output exactly - Updated parsing logic to use new field names Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
Removed gpu_defs.go in commit c38b635. The file was no longer used after switching to lshw-based GPU detection.
Updated field names to match lshw exactly in commit c38b635. Changed "Manufacturer" to "Vendor" and "Model" to "Product" throughout the GPU struct, table fields, and parsing logic. |
|
@copilot Not all GPUs will be found using lshw -class display. Identify GPUs using lspci then fill in the details using lshw. If no details found, then leave the fields empty. lspci | grep -iE 'vga|3d|display' The goal is to find all GPUs, not only the GPUs used for display. |
- Added LspciGPUScriptName to identify all GPUs (VGA/3D/display) - Modified gpuInfoFromOutput to parse lspci first for complete GPU list - Merge lshw details when available by matching bus address - GPUs not in lshw still appear with PCI ID and Bus Info - Ensures all GPUs are found, not just display GPUs Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com>
Implemented two-step GPU detection in commit a2e3fd5:
This ensures all GPUs are found, not just those used for display. |
Current GPU reporting only shows manufacturer, model, and PCI ID. Extended to detect all GPUs using lspci and enrich with detailed information from lshw, including logical names, bus info, clock speeds, capabilities, configuration, and resource allocations.
Changes
LspciGPUScriptNamerunslspci -nv | grep -iE 'vga|3d|display'to identify all GPUs (VGA controllers, 3D controllers, display controllers)LshwGPUScriptNamerunslshw -class display -numericto retrieve detailed GPU informationgpuInfoFromOutput()to parse lspci output first for complete GPU list, then merge lshw details by matching bus addressesgpu_defs.gowhich is no longer neededKey Benefits
Example Output
lspci detects GPU:
lshw provides details:
Extracts to table with PCI ID
1414:5353, vendorMicrosoft Corporation, bus infopci@0000:00:08.0, and all additional fields. GPUs found only in lspci will show PCI ID and bus address with other fields empty.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.