fix(cli): also consider 3D controller when detecting GPU by lspci (#1360)

This commit is contained in:
dkeven 2025-05-29 20:07:39 +08:00 committed by GitHub
parent 37e37a814d
commit d5673b81e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ func (p *NvidiaGraphicsCard) PreCheck(runtime connector.Runtime) (found bool, er
}
}()
output, err := runtime.GetRunner().SudoCmd(
"lspci | grep -i vga | grep -i nvidia", false, false)
"lspci | grep -i -e vga -e 3d | grep -i nvidia", false, false)
// an empty grep also results in the exit code to be 1
// and thus a non-nil err
if err != nil {