Skip to content

Commit

Permalink
Merge pull request #993 from dortania/web-driver-alpha
Browse files Browse the repository at this point in the history
Implement Alpha Support for Nvidia Web Drivers
  • Loading branch information
khronokernel committed May 30, 2022
2 parents 3e568ca + 4fe9679 commit 6826b54
Show file tree
Hide file tree
Showing 16 changed files with 609 additions and 162 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Downgrade AppleFSCompressionTypeZlib to 12.3.1 on pre-Sandy Bridge Macs
- Resolves ZLib decompression kernel panics on 12.4 and newer
- Resolve AppleGVACore crashing on MacBookPro11,3 in Monterey 12.4+
- Add Nvidia Web Driver support for Maxwell and Pascal
- Currently running in OpenGL mode, [non-Metal issues](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) applicable

## 0.4.5
- Fix AutoPatcher.pkg download on releases
Expand Down
230 changes: 169 additions & 61 deletions data/pci_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ class nvidia_ids:
# Courteous of envytools as well as Macrumors:
# https://envytools.readthedocs.io/en/latest/hw/pciid.html
# https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
# https://pci-ids.ucw.cz/read/PC/10de
curie_ids = [
0x0040, # NV40 [GeForce 6800 Ultra]
0x0040, # NV40 [GeForce 6800 Ultra]
0x00f0, # BR02
0x0220, # NV44A
0x0140, # NV43 [GeForce 6600 GT]
Expand Down Expand Up @@ -525,76 +526,183 @@ class nvidia_ids:


maxwell_ids = [
0x1381, # GM107 [GeForce GTX 750]
0x1392, # GM107 [GeForce GTX 860M]
0x139a, # GM107 [GeForce GTX 950M]
0x139b, # GM107 [GeForce GTX 960M]
0x13b0, # GM107 [Quadro M2000M]
0x13BB, # GM107 [Quadro K620]
0x1340, # GM108M [GeForce 830M]
0x1341, # GM108M [GeForce 840M]
0x1344, # GM108M [GeForce 845M]
0x1346, # GM108M [GeForce 930M]
0x1347, # GM108M [GeForce 940M]
0x1348, # GM108M [GeForce 945M / 945A]
0x1349, # GM108M [GeForce 930M]
0x134b, # GM108M [GeForce 940MX]
0x134d, # GM108M [GeForce 940MX]
0x134e, # GM108M [GeForce 930MX]
0x134f, # GM108M [GeForce 920MX]
0x137a, # GM108GLM [Quadro K620M / Quadro M500M]
0x137b, # GM108GLM [Quadro M520 Mobile]
0x137d, # GM108M [GeForce 940A]

0x1340, # GM108
0x1341, # GM108 [GeForce 840M]
0x1346, # GM108 [GeForce 930M]
0x1347, # GM108 [GeForce 940M]
0x134d, # GM108 [GeForce 940MX]
0x1380, # GM107 [GeForce GTX 750 Ti]
0x1381, # GM107 [GeForce GTX 750]
0x1382, # GM107 [GeForce GTX 745]
0x1389, # GM107GL [GRID M30]
0x1390, # GM107M [GeForce 845M]
0x1391, # GM107M [GeForce GTX 850M]
0x1392, # GM107M [GeForce GTX 860M]
0x1393, # GM107M [GeForce 840M]
0x1398, # GM107M [GeForce 845M]
0x1399, # GM107M [GeForce 945M]
0x139a, # GM107M [GeForce GTX 950M]
0x139b, # GM107M [GeForce GTX 960M]
0x139c, # GM107M [GeForce 940M]
0x139d, # GM107M [GeForce GTX 750 Ti]
0x13b0, # GM107GLM [Quadro M2000M]
0x13b1, # GM107GLM [Quadro M1000M]
0x13b2, # GM107GLM [Quadro M600M]
0x13b3, # GM107GLM [Quadro K2200M]
0x13b4, # GM107GLM [Quadro M620 Mobile]
0x13b6, # GM107GLM [Quadro M1200 Mobile]
0x13b9, # GM107GL [NVS 810]
0x13ba, # GM107GL [Quadro K2200]
0x13bb, # GM107GL [Quadro K620]
0x13bc, # GM107GL [Quadro K1200]
0x13bd, # GM107GL [Tesla M10]

0x13c0, # GM204 [GeForce GTX 980]
0x13c2, # GM204 [GeForce GTX 970]
0x13d7, # GM204 [GeForce GTX 980M]
0x13d8, # GM204 [GeForce GTX 970M]
0x13d9, # GM204 [GeForce GTX 965M]
0x13c0, # GM204 [GeForce GTX 980]
0x13c1, # GM204
0x13c2, # GM204 [GeForce GTX 970]
0x13c3, # GM204
0x13d7, # GM204M [GeForce GTX 980M]
0x13d8, # GM204M [GeForce GTX 970M]
0x13d9, # GM204M [GeForce GTX 965M]
0x13da, # GM204M [GeForce GTX 980 Mobile]
0x13e7, # GM204GL [GeForce GTX 980 Engineering Sample]
0x13f0, # GM204GL [Quadro M5000]
0x13f1, # GM204GL [Quadro M4000]
0x13f2, # GM204GL [Tesla M60]
0x13f3, # GM204GL [Tesla M6]
0x13f8, # GM204GLM [Quadro M5000M / M5000 SE]
0x13f9, # GM204GLM [Quadro M4000M]
0x13fa, # GM204GLM [Quadro M3000M]
0x13fb, # GM204GLM [Quadro M5500]

0x1401, # GM206 [GeForce GTX 960]
0x1407, # GM206 [GeForce GTX 750 v2]
0x1427, # GM206 [GeForce GTX 965M v2]
0x1401, # GM206 [GeForce GTX 960]
0x1402, # GM206 [GeForce GTX 950]
0x1404, # GM206 [GeForce GTX 960 FAKE]
0x1406, # GM206 [GeForce GTX 960 OEM]
0x1407, # GM206 [GeForce GTX 750 v2]
0x1427, # GM206M [GeForce GTX 965M]
0x1430, # GM206GL [Quadro M2000]
0x1431, # GM206GL [Tesla M4]
0x1436, # GM206GLM [Quadro M2200 Mobile]
]

pascal_ids = [
0x15f7, # GP100 [Tesla P100 PCIe 12GB]
0x15f8, # GP100 [Tesla P100 PCIe 16GB]
0x15f9, # GP100 [Tesla P100 SXM2 16GB]
0x15f0, # GP100GL [Quadro GP100]
0x15f1, # GP100GL
0x15f7, # GP100GL [Tesla P100 PCIe 12GB]
0x15f8, # GP100GL [Tesla P100 PCIe 16GB]
0x15f9, # GP100GL [Tesla P100 SXM2 16GB]

0x1b00, # GP102 [GeForce TITAN X]
0x1b02, # GP102 [GeForce TITAN Xp]
0x1b06, # GP102 [GeForce GTX 1080 Ti]
0x1b30, # GP102 [Quadro P6000]
0x1b38, # GP102 [Tesla P40]
0x1b00, # GP102 [TITAN X]
0x1b01, # GP102 [GeForce GTX 1080 Ti 10GB]
0x1b02, # GP102 [TITAN Xp]
0x1b04, # GP102
0x1b06, # GP102 [GeForce GTX 1080 Ti]
0x1b07, # GP102 [P102-100]
0x1b30, # GP102GL [Quadro P6000]
0x1b38, # GP102GL [Tesla P40]
0x1b39, # GP102GL [Tesla P10]
0x1b70, # GP102GL
0x1b78, # GP102GL

0x1b80, # GP104 [GeForce GTX 1080]
0x1b81, # GP104 [GeForce GTX 1070]
0x1b82, # GP104 [GeForce GTX 1070 Ti]
0x1b83, # GP104 [GeForce GTX 1060 6GB]
0x1b84, # GP104 [GeForce GTX 1060 3GB]
0x1ba0, # GP104 [GeForce GTX 1080 Mobile]
0x1ba1, # GP104 [GeForce GTX 1070 Mobile]
0x1ba2, # GP104 [GeForce GTX 1070 Mobile]
0x1bb0, # GP104 [Quadro P5000]
0x1bb3, # GP104 [Tesla P4]
0x1bb6, # GP104 [Quadro P5000 Mobile]
0x1bb7, # GP104 [Quadro P4000 Mobile]
0x1bb8, # GP104 [Quadro P3000 Mobile]
0x1be0, # GP104 [GeForce GTX 1080 Mobile]
0x1be1, # GP104 [GeForce GTX 1070 Mobile]
0x1b80, # GP104 [GeForce GTX 1080]
0x1b81, # GP104 [GeForce GTX 1070]
0x1b82, # GP104 [GeForce GTX 1070 Ti]
0x1b83, # GP104 [GeForce GTX 1060 6GB]
0x1b84, # GP104 [GeForce GTX 1060 3GB]
0x1b87, # GP104 [P104-100]
0x1ba0, # GP104M [GeForce GTX 1080 Mobile]
0x1ba1, # GP104M [GeForce GTX 1070 Mobile]
0x1ba2, # GP104M [GeForce GTX 1070 Mobile]
0x1ba9, # GP104M
0x1baa, # GP104M
0x1bad, # GP104 [GeForce GTX 1070 Engineering Sample]
0x1bb0, # GP104GL [Quadro P5000]
0x1bb1, # GP104GL [Quadro P4000]
0x1bb3, # GP104GL [Tesla P4]
0x1bb4, # GP104GL [Tesla P6]
0x1bb5, # GP104GLM [Quadro P5200 Mobile]
0x1bb6, # GP104GLM [Quadro P5000 Mobile]
0x1bb7, # GP104GLM [Quadro P4000 Mobile]
0x1bb8, # GP104GLM [Quadro P3000 Mobile]
0x1bb9, # GP104GLM [Quadro P4200 Mobile]
0x1bbb, # GP104GLM [Quadro P3200 Mobile]
0x1bc7, # GP104 [P104-101]
0x1be0, # GP104BM [GeForce GTX 1080 Mobile]
0x1be1, # GP104BM [GeForce GTX 1070 Mobile]

0x1c02, # GP106 [GeForce GTX 1060 3GB]
0x1c03, # GP106 [GeForce GTX 1060 6GB]
0x1c20, # GP106 [GeForce GTX 1060 Mobile]
0x1c23, # GP106 [GeForce GTX 1060]
0x1c60, # GP106 [GeForce GTX 1060 Mobile]
0x1c61, # GP106 [GeForce GTX 1050 Ti Mobile]
0x1c62, # GP106 [GeForce GTX 1050 Mobile]
0x1c00, # GP106
0x1c01, # GP106
0x1c02, # GP106 [GeForce GTX 1060 3GB]
0x1c03, # GP106 [GeForce GTX 1060 6GB]
0x1c04, # GP106 [GeForce GTX 1060 5GB]
0x1c06, # GP106 [GeForce GTX 1060 6GB Rev. 2]
0x1c07, # GP106 [P106-100]
0x1c09, # GP106 [P106-090]
0x1c20, # GP106M [GeForce GTX 1060 Mobile]
0x1c21, # GP106M [GeForce GTX 1050 Ti Mobile]
0x1c22, # GP106M [GeForce GTX 1050 Mobile]
0x1c23, # GP106M [GeForce GTX 1060 Mobile Rev. 2]
0x1c2d, # GP106M
0x1c30, # GP106GL [Quadro P2000]
0x1c31, # GP106GL [Quadro P2200]
0x1c35, # GP106M [Quadro P2000 Mobile]
0x1c36, # GP106 [P106M]
0x1c60, # GP106BM [GeForce GTX 1060 Mobile 6GB]
0x1c61, # GP106BM [GeForce GTX 1050 Ti Mobile]
0x1c62, # GP106BM [GeForce GTX 1050 Mobile]
0x1c70, # GP106GL

0x1c81, # GP107 [GeForce GTX 1050]
0x1c82, # GP107 [GeForce GTX 1050 Ti]
0x1c83, # GP107 [GeForce GTX 1050 3GB]
0x1c8c, # GP107 [GeForce GTX 1050 Ti Mobile]
0x1c8d, # GP107 [GeForce GTX 1050 Mobile]
0x1c8f, # GP107 [GeForce GTX 1050 Ti Max-Q]
0x1c92, # GP107 [GeForce GTX 1050 Max-Q]
0x1c80,
0x1c81, # GP107 [GeForce GTX 1050]
0x1c82, # GP107 [GeForce GTX 1050 Ti]
0x1c83, # GP107 [GeForce GTX 1050 3GB]
0x1c8c, # GP107M [GeForce GTX 1050 Ti Mobile]
0x1c8d, # GP107M [GeForce GTX 1050 Mobile]
0x1c8e, # GP107M
0x1c8f, # GP107M [GeForce GTX 1050 Ti Max-Q]
0x1c90, # GP107M [GeForce MX150]
0x1c91, # GP107M [GeForce GTX 1050 3 GB Max-Q]
0x1c92, # GP107M [GeForce GTX 1050 Mobile]
0x1c94, # GP107M [GeForce MX350]
0x1c96, # GP107M [GeForce MX350]
0x1ca7, # GP107GL
0x1ca8, # GP107GL
0x1caa, # GP107GL
0x1cb1, # GP107GL [Quadro P1000]
0x1cb2, # GP107GL [Quadro P600]
0x1cb3, # GP107GL [Quadro P400]
0x1cb6, # GP107GL [Quadro P620]
0x1cba, # GP107GLM [Quadro P2000 Mobile]
0x1cbb, # GP107GLM [Quadro P1000 Mobile]
0x1cbc, # GP107GLM [Quadro P600 Mobile]
0x1cbd, # GP107GLM [Quadro P620]
0x1ccc, # GP107BM [GeForce GTX 1050 Ti Mobile]
0x1ccd, # GP107BM [GeForce GTX 1050 Mobile]
0x1cfa, # GP107GL [Quadro P2000]
0x1cfb, # GP107GL [Quadro P1000]

0x1d01, # GP108 [GeForce GT 1030]
0x1d10, # GP108 [GeForce MX150]
0x1d12, # GP108 [GeForce MX150]
0x1d01, # GP108 [GeForce GT 1030]
0x1d02, # GP108 [GeForce GT 1010]
0x1d10, # GP108M [GeForce MX150]
0x1d11, # GP108M [GeForce MX230]
0x1d12, # GP108M [GeForce MX150]
0x1d13, # GP108M [GeForce MX250]
0x1d16, # GP108M [GeForce MX330]
0x1d33, # GP108GLM [Quadro P500 Mobile]
0x1d34, # GP108GLM [Quadro P520]
0x1d52, # GP108BM [GeForce MX250]
0x1d56, # GP108BM [GeForce MX330]
]


Expand Down Expand Up @@ -675,7 +783,7 @@ class amd_ids:
0x67E9, # Unknown
# AMDEllesmereGraphicsAccelerator - AMD9500Controller
0x67C0, # Pro WX 7100 Mobile
0x67C1, # Unknown
0x67C1, # Unknown
0x67C2, # Pro V7300X / V7350x2
0x67C4, # Pro WX 7100
0x67C7, # Pro WX 5100
Expand Down
8 changes: 8 additions & 0 deletions data/sip_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ class system_integrity_protection:
"CSR_ALLOW_UNAUTHENTICATED_ROOT", # 0x800 - Required to avoid KC mismatch kernel panic
]

root_patch_sip_big_sur_3rd_part_kexts = [
# Variables required to root patch in Big Sur and Monterey with 3rd party kexts
"CSR_ALLOW_UNTRUSTED_KEXTS", # 0x1 - Required for Aux Cache in Big Sur+
"CSR_ALLOW_UNRESTRICTED_FS", # 0x2 - Required to mount and edit root volume, as well as load modded platform binaries
"CSR_ALLOW_UNAUTHENTICATED_ROOT", # 0x800 - Required to avoid KC mismatch kernel panic
"CSR_ALLOW_UNAPPROVED_KEXTS", # 0x200 - Required for Aux Cache in Big Sur+
]

# CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE (introduced with Mojave):
# This bit is quite strange and was originally assumed to be required for modded platform binaries
# However after extensive testing, this doesn't seem true. In addition, this bit is never flipped via
Expand Down
42 changes: 39 additions & 3 deletions data/sys_patch_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,26 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
},
},

"Non-Metal CoreDisplay Common": {
# Nvidia Web Drivers require an older build of CoreDisplay
"Display Name": "",
"OS Support": {
"Minimum OS Support": {
"OS Major": non_metal_os_support[0],
"OS Minor": 0
},
"Maximum OS Support": {
"OS Major": non_metal_os_support[-1],
"OS Minor": 99
},
},
"Install": {
"/System/Library/Frameworks": {
"CoreDisplay.framework": f"10.13.6-{os_major}",
},
},
},

"Non-Metal Enforcement": {
# Forces Metal kexts from High Sierra to run in the fallback non-Metal mode
# Verified functional with HD4000 and Iris Plus 655
Expand Down Expand Up @@ -324,9 +344,25 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
"NVDANV50HalTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
"NVDAResmanTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
},
"/Library/PreferencePanes": {
"NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140",
},

# Disabled due to issues with Pref pane stripping 'nvda_drv' NVRAM
# variables
# "/Library/PreferencePanes": {
# "NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140",
# },
# "/Library/LaunchAgents": {
# "com.nvidia.nvagent.plist": "WebDriver-387.10.10.10.40.140",
# },
# "/Library/LaunchDaemons": {
# "com.nvidia.nvroothelper.plist": "WebDriver-387.10.10.10.40.140",
# },
},
"Remove": {
"/System/Library/Extensions": [
# Due to how late the Auxiliary cache loads, NVDAStartup will match first and then the Web Driver kexts.
# This has no effect for Maxwell and Pascal, however for development purposes, Tesla and Kepler are partially supported.
"NVDAStartup.kext",
],
},
},
"AMD TeraScale Common": {
Expand Down
Loading

0 comments on commit 6826b54

Please sign in to comment.