Commit 7dc9530
authored
fix(about): deduplicate OpenGL GPU name variants in About page (#1906)
Fixes #1814
## Problem
When a system has an NVIDIA GPU, wgpu enumerates it twice:
- Via Vulkan backend: `"NVIDIA GeForce RTX 3080 Ti Laptop GPU"`
- Via OpenGL backend: `"NVIDIA GeForce RTX 3080 Ti Laptop
GPU/PCIe/SSE2"`
The OpenGL variant includes a renderer suffix (`/PCIe/SSE2`) which
causes the name-based deduplication to fail, resulting in duplicate GPU
entries in Settings -> System -> About.
## Solution
Add `normalize_gpu_name()` helper that strips OpenGL renderer suffixes
(everything after `/`) before comparing names for deduplication. This
ensures both Vulkan and OpenGL representations of the same GPU are
correctly identified as duplicates.
## Changes
- `cosmic-settings/src/pages/system/info.rs`:
- Added `normalize_gpu_name()` function with doc comment
- Modified `wgpu_graphics()` to use normalized names for `seen_names`
HashSet
## Testing
- [x] `cargo fmt --check` passes
- [x] `cargo clippy --all-features` passes (no new warnings)
- [x] `cargo test --all-features` passes (3/3 tests)
- [x] `just check-features` passes
- [x] Manual testing: Verified on system with NVIDIA GPU that duplicate
entries no longer appear
## Checklist
- [x] I have disclosed use of any AI generated code in my commit
messages.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the Developer Certificate of Origin and certify my
contribution under its conditions.
Signed-off-by: manascb1344 <zephop76593@gmail.com>1 parent 4597822 commit 7dc9530
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
114 | | - | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
0 commit comments