[F] Fix intel OEM iGPU name (Fix #230)

This commit is contained in:
Azalea
2026-06-03 04:45:25 +00:00
parent 209e2ec315
commit d248e768ea

View File

@@ -3614,7 +3614,7 @@ get_gpu() {
gpu_cmd="$(lspci -mm |
awk -F '\"|\" \"|\\(' \
'/"Display|"3D|"VGA/ {
a[$0] = $1 " " $3 " " ($(NF-1) ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $(NF-1))
a[$0] = $1 " " $3 " " ($3 ~ /Intel/ || $(NF-1) ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $(NF-1))
}
END { for (i in a) {
if (!seen[a[i]]++) {
@@ -3662,6 +3662,7 @@ get_gpu() {
gpu="${gpu/*Intel/Intel}"
gpu="${gpu/\(R\)}"
gpu="${gpu/Corporation}"
[[ "$gpu" == *"["*"]"* ]] && gpu="Intel ${gpu/*\[}" && gpu="${gpu/\]*}"
gpu="${gpu/ \(*}"
gpu="${gpu/Integrated Graphics Controller}"
gpu="${gpu/*Xeon*/Intel HD Graphics}"