mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
nvidia-drivers: Improve match for NVIDIA GPUs
The logic for checking if we need to probe depends on the device showing up with the product type in lspci output, which doesn't hold for all sorts of GPUs. The NVIDIA_PRODUCT_TYPE is used for fetching the drivers and is "tesla" across datacenter GPUs. Switch to matching on vendor id and device class. The values are the same ones that the nvidia driver binds to. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
bf4b088cb8
commit
2cbd78091e
@ -136,10 +136,15 @@ function verify_installation() {
|
||||
}
|
||||
|
||||
function is_nvidia_probe_required() {
|
||||
if [[ -z "$(lspci | grep -i "${NVIDIA_PRODUCT_TYPE}")" ]]; then
|
||||
return 1
|
||||
# Vendor: NVIDIA, Class: VGA compatible controller
|
||||
if [[ -n "$(lspci -d 10de:*:0300)" ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 0
|
||||
# Vendor: NVIDIA, Class: 3D controller
|
||||
if [[ -n "$(lspci -d 10de:*:0302)" ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
function is_nvidia_installation_required() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user