detect.py: Fix Nvidia Web Drivers logic

This commit is contained in:
Mykola Grymalyuk
2024-09-16 09:06:15 -06:00
parent 2ce1f1c7f9
commit 429c213f79
2 changed files with 10 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
## 2.1.0 ## 2.1.0
- Fix MacBookPro13,3 listing 'Available patches' after having installed all applicable patches - Fix MacBookPro13,3 listing 'Available patches' after having installed all applicable patches
- Fix Nvidia Tesla and Kepler patches not installing on Monterey (and older if applicable) - Fix Nvidia Tesla and Kepler patches not installing on Monterey (and older if applicable)
- Fix Nvidia Web Drivers incorrectly listing 'OpenGL', 'compat' and 'nvda_drv(_vrl)' missing
## 2.0.0 ## 2.0.0
- Set `AssociatedBundleIdentifiers` property in launch services as an array - Set `AssociatedBundleIdentifiers` property in launch services as an array

View File

@@ -219,12 +219,12 @@ class HardwarePatchsetDetection:
nv_on = utilities.get_nvram("boot-args", decode=True) nv_on = utilities.get_nvram("boot-args", decode=True)
if nv_on: if nv_on:
if "ngfxgl=" in nv_on: if "ngfxgl=" in nv_on:
return True return False
for gpu in self._constants.computer.gpus: for gpu in self._constants.computer.gpus:
if isinstance(gpu, device_probe.NVIDIA): if isinstance(gpu, device_probe.NVIDIA):
if gpu.disable_metal is True: if gpu.disable_metal is True:
return True
return False return False
return True
def _validation_check_force_compat_missing(self) -> bool: def _validation_check_force_compat_missing(self) -> bool:
@@ -234,12 +234,12 @@ class HardwarePatchsetDetection:
nv_on = utilities.get_nvram("boot-args", decode=True) nv_on = utilities.get_nvram("boot-args", decode=True)
if nv_on: if nv_on:
if "ngfxcompat=" in nv_on: if "ngfxcompat=" in nv_on:
return True return False
for gpu in self._constants.computer.gpus: for gpu in self._constants.computer.gpus:
if isinstance(gpu, device_probe.NVIDIA): if isinstance(gpu, device_probe.NVIDIA):
if gpu.force_compatible is True: if gpu.force_compatible is True:
return True
return False return False
return True
def _validation_check_nvda_drv_missing(self) -> bool: def _validation_check_nvda_drv_missing(self) -> bool:
@@ -249,11 +249,11 @@ class HardwarePatchsetDetection:
nv_on = utilities.get_nvram("boot-args", decode=True) nv_on = utilities.get_nvram("boot-args", decode=True)
if nv_on: if nv_on:
if "nvda_drv_vrl=" in nv_on: if "nvda_drv_vrl=" in nv_on:
return True return False
nv_on = utilities.get_nvram("nvda_drv") nv_on = utilities.get_nvram("nvda_drv")
if nv_on: if nv_on:
return True
return False return False
return True
@cache @cache