macOS如何正确驱动集成显卡HDMI(包括视频和音频)

聊聊如何正确驱动集成显卡HDMI(包括视频和音频)
必备条件:
1、必须使用AppleHDA驱动声卡(仿冒、clover、applealc都可以的),使用voodoo驱动声卡应该不行的。
2、dsdt或者ssdt中关于集成显卡的gfx0改为IGPU。

  1. #Maintained by: RehabMan for: Laptop Patches#graphics_Rename-GFX0.txt
  2. # Note: Most DSDT/SSDTs use GFX0 for the integrated graphics device,# but there are few renegades that use VID or AGP1.# If your DSDT uses VID or AGP1 instead of GFX0, see the # alternate patch "Rename VID/AGP1 to IGPU"
  3. # sometimes there is already IGPU used for other thingsinto_all all code_regex IGPU, replaceall_matched begin IGFX, end;
  4. # rename GFX0 -> IGPU for better power managementinto_all all code_regex GFX0\. replaceall_matched begin IGPU. end;into_all all code_regex \.GFX0 replaceall_matched begin .IGPU end;into_all all code_regex \sGFX0, replaceall_matched begin IGPU, end;into_all all code_regex \(GFX0 replaceall_matched begin (IGPU end;into_all all label GFX0 set_label begin IGPU end;into_all all label _SB.PCI0.GFX0 set_label begin _SB.PCI0.IGPU end;into_all all label \_SB.PCI0.GFX0 set_label begin \_SB.PCI0.IGPU end;into_all all label _SB.PCI0.GFX0.DD02 set_label begin _SB.PCI0.IGPU.DD02 end;into_all all label \_SB.PCI0.GFX0.DD02 set_label begin \_SB.PCI0.IGPU.DD02 end;into_all all label ^^^GFX0 set_label begin ^^^IGPU end;into_all all label ^^GFX0 set_label begin ^^IGPU end;into_all all label ^GFX0 set_label begin ^IGPU end;
复制代码



3、对于Haswell/Broadwell集成显卡:dsdt需要打入补丁 renaming B0D3 to HDAU (device at 0x00030000)

  1. #Maintained by: RehabMan for: Laptop Patches
  2. #graphics_Rename-B0D3.txt
  3. # for DSDT
  4. into method label _WAK code_regex B0D3 replaceall_matched begin HDAU end;
  5. into definitionblock code_regex B0D3 replaceall_matched begin HDAU end;
  6. # for GFX0 SSDT
  7. # Note: Change your layout ID if you need something different
  8. # inject "hda-gfx"="onboard-1" into IGPU (GFX0 originally)
  9. into method label _DSM parent_adr 0x00020000 remove_entry;
  10. into device name_adr 0x00020000 insert
  11. begin
  12. Method (_DSM, 4, NotSerialized)\n
  13. {\n
  14. If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
  15. Return (Package()\n
  16. {\n
  17. "hda-gfx", Buffer() { "onboard-1" },\n
  18. })\n
  19. }\n
  20. end;
  21. # inject "hda-gfx"="onboard-1" into HDAU (B0D3 originally)
  22. into method label _DSM parent_adr 0x00030000 remove_entry;
  23. into device name_adr 0x00030000 insert
  24. begin
  25. Method (_DSM, 4, NotSerialized)\n
  26. {\n
  27. If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
  28. Return (Package()\n
  29. {\n
  30. "layout-id", Buffer() { 12, 0x00, 0x00, 0x00 },\n
  31. "hda-gfx", Buffer() { "onboard-1" },\n
  32. })\n
  33. }\n
  34. end;
  35. into device label B0D3 set_label begin HDAU end;
  36. into method label SBCB code_regex B0D3 replaceall_matched begin HDAU end;
复制代码


4、dsdt中,对于HDAU、IGPU、HDEF三个装备注入相同的"hda-gfx" = "onboard-1" or= “onboard-2”
5、对于Haswell/Broadwell集成显卡,dsdt中HDAU和HDEF注入的layout id要一致。
6、对于Haswell集成显卡还要安装rehabman的FakePCIID.kext和FakePCIID_Intel_HDMI_Audio.kext
7、最重要的一点是要对fb(kext)打入恰当的补丁,即要修改连接类型(00 04 00 00)为(00 08 00 00)匹配物理连接,此处修改fb结合自己的ig-platform-id。苹果的设备大多采用DP连接(00 04 00 00),我们大多数笔记本采用HDMI(00 08 00 00)连接,如果你的是DP连接无需修改fb。
ig-platform-id:集成显卡注入的此属性有以下对应关系
0x01660003: HD4000 1366x768
0x01660004: HD4000 1600x900, 1920x1080
0x01660008: HD4000 1600x900, 1920x1080
0x01660009: HD4000 1600x900, 1920x1080
0x0a260006: HD4400/HD4600/HD5000
根据自己集成显卡注入的ig-platform-id结合以下信息,选择正确的补丁打入clover或者二进制文件

  1. <key>KextsToPatch</key>
  2. <array>
  3. <dict>
  4. <key>Comment</key>
  5. <string>HDMI-audio, port 0105(12), 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
  6. <key>Disabled</key>
  7. <true/>
  8. <key>Find</key>
  9. <data>
  10. AQUJAAAEAAAHAQAA
  11. </data>
  12. <key>Name</key>
  13. <string>AppleIntelFramebufferAzul</string>
  14. <key>Replace</key>
  15. <data>
  16. AQUSAAAIAAAHAQAA
  17. </data>
  18. </dict>
  19. <dict>
  20. <key>Comment</key>
  21. <string>HDMI-audio, port 0204, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
  22. <key>Disabled</key>
  23. <true/>
  24. <key>Find</key>
  25. <data>
  26. AgQKAAAEAACHAAAA
  27. </data>
  28. <key>Name</key>
  29. <string>AppleIntelFramebufferAzul</string>
  30. <key>Replace</key>
  31. <data>
  32. AgQKAAAIAACHAAAA
  33. </data>
  34. </dict>
  35. <dict>
  36. <key>Comment</key>
  37. <string>HDMI-audio, port 0204, 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
  38. <key>Disabled</key>
  39. <true/>
  40. <key>Find</key>
  41. <data>
  42. AgQJAAAEAAAHAQAA
  43. </data>
  44. <key>Name</key>
  45. <string>AppleIntelFramebufferAzul</string>
  46. <key>Replace</key>
  47. <data>
  48. AgQJAAAIAAAHAQAA
  49. </data>
  50. </dict>
  51. <dict>
  52. <key>Comment</key>
  53. <string>HDMI-audio, port 0105, 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
  54. <key>Disabled</key>
  55. <true/>
  56. <key>Find</key>
  57. <data>
  58. AQUJAAAEAAAHAQAA
  59. </data>
  60. <key>Name</key>
  61. <string>AppleIntelFramebufferAzul</string>
  62. <key>Replace</key>
  63. <data>
  64. AQUJAAAIAAAHAQAA
  65. </data>
  66. </dict>
  67. <dict>
  68. <key>Comment</key>
  69. <string>HDMI-audio, port 0204(12), 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
  70. <key>Disabled</key>
  71. <true/>
  72. <key>Find</key>
  73. <data>
  74. AgQKAAAEAACHAAAA
  75. </data>
  76. <key>Name</key>
  77. <string>AppleIntelFramebufferAzul</string>
  78. <key>Replace</key>
  79. <data>
  80. AgQSAAAIAACHAAAA
  81. </data>
  82. </dict>
  83. <dict>
  84. <key>Comment</key>
  85. <string>HDMI-audio, port 0204, 0x0a260005 0x0a260006</string>
  86. <key>Disabled</key>
  87. <true/>
  88. <key>Find</key>
  89. <data>
  90. AgQJAAAEAACHAAAA
  91. </data>
  92. <key>Name</key>
  93. <string>AppleIntelFramebufferAzul</string>
  94. <key>Replace</key>
  95. <data>
  96. AgQJAAAIAACHAAAA
  97. </data>
  98. </dict>
  99. <dict>
  100. <key>Comment</key>
  101. <string>HDMI-audio, port 0105(12), 0x0a260005 0x0a260006, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
  102. <key>Disabled</key>
  103. <true/>
  104. <key>Find</key>
  105. <data>
  106. AQUJAAAEAACHAAAA
  107. </data>
  108. <key>Name</key>
  109. <string>AppleIntelFramebufferAzul</string>
  110. <key>Replace</key>
  111. <data>
  112. AQUSAAAIAACHAAAA
  113. </data>
  114. </dict>
  115. <dict>
  116. <key>Comment</key>
  117. <string>HDMI-audio, port 0204(12), 0x0a260005 0x0a260006</string>
  118. <key>Disabled</key>
  119. <true/>
  120. <key>Find</key>
  121. <data>
  122. AgQJAAAEAACHAAAA
  123. </data>
  124. <key>Name</key>
  125. <string>AppleIntelFramebufferAzul</string>
  126. <key>Replace</key>
  127. <data>
  128. AgQSAAAIAACHAAAA
  129. </data>
  130. </dict>
  131. <dict>
  132. <key>Comment</key>
  133. <string>HDMI-audio, port 0105, 0x0a260005 0x0a260006, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
  134. <key>Disabled</key>
  135. <true/>
  136. <key>Find</key>
  137. <data>
  138. AQUJAAAEAACHAAAA
  139. </data>
  140. <key>Name</key>
  141. <string>AppleIntelFramebufferAzul</string>
  142. <key>Replace</key>
  143. <data>
  144. AQUJAAAIAACHAAAA
  145. </data>
  146. </dict>
  147. <dict>
  148. <key>Comment</key>
  149. <string>HDMI-audio, port 0204(12), 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
  150. <key>Disabled</key>
  151. <true/>
  152. <key>Find</key>
  153. <data>
  154. AgQJAAAEAAAHAQAA
  155. </data>
  156. <key>Name</key>
  157. <string>AppleIntelFramebufferAzul</string>
  158. <key>Replace</key>
  159. <data>
  160. AgQSAAAIAAAHAQAA
  161. </data>
  162. </dict>
  163. </array>
复制代码


此文来源于rehabman大神,原帖参考:[guide]Intel IGPU HDMI/DP audio:http://www.tonymacx86.com/threads/guide-intel-igpu-hdmi-dp-audio-sandy-ivy-haswell-broadwell.189495/

posted on 2016-12-27 15:44  motoyang  阅读(3098)  评论(0编辑  收藏  举报