聊聊如何正确驱动集成显卡HDMI(包括视频和音频)
必备条件:
1、必须使用AppleHDA驱动声卡(仿冒、clover、applealc都可以的),使用voodoo驱动声卡应该不行的。
2、dsdt或者ssdt中关于集成显卡的gfx0改为IGPU。
#Maintained by: RehabMan for: Laptop Patches#graphics_Rename-GFX0.txt
# 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”
# sometimes there is already IGPU used for other thingsinto_all all code_regex IGPU, replaceall_matched begin IGFX, end;
# 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)
#Maintained by: RehabMan for: Laptop Patches
#graphics_Rename-B0D3.txt
# for DSDT
into method label _WAK code_regex B0D3 replaceall_matched begin HDAU end;
into definitionblock code_regex B0D3 replaceall_matched begin HDAU end;
# for GFX0 SSDT
# Note: Change your layout ID if you need something different
# inject “hda-gfx”=”onboard-1” into IGPU (GFX0 originally)
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)
{
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
Return (Package()
{
“hda-gfx”, Buffer() { “onboard-1” },
})
}
end;
# inject “hda-gfx”=”onboard-1” into HDAU (B0D3 originally)
into method label _DSM parent_adr 0x00030000 remove_entry;
into device name_adr 0x00030000 insert
begin
Method (_DSM, 4, NotSerialized)
{
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
Return (Package()
{
“layout-id”, Buffer() { 12, 0x00, 0x00, 0x00 },
“hda-gfx”, Buffer() { “onboard-1” },
})
}
end;
into device label B0D3 set_label begin HDAU end;
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 1366×768
0x01660004: HD4000 1600×900, 1920×1080
0x01660008: HD4000 1600×900, 1920×1080
0x01660009: HD4000 1600×900, 1920×1080
0x0a260006: HD4400/HD4600/HD5000
根据自己集成显卡注入的ig-platform-id结合以下信息,选择正确的补丁打入clover或者二进制文件
<key>KextsToPatch</key>
<array>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0105(12), 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AQUJAAAEAAAHAQAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AQUSAAAIAAAHAQAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQKAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQKAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204, 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQJAAAEAAAHAQAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQJAAAIAAAHAQAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0105, 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AQUJAAAEAAAHAQAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AQUJAAAIAAAHAQAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204(12), 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQKAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQSAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204, 0x0a260005 0x0a260006</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQJAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQJAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0105(12), 0x0a260005 0x0a260006, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AQUJAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AQUSAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204(12), 0x0a260005 0x0a260006</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQJAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQSAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0105, 0x0a260005 0x0a260006, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AQUJAAAEAACHAAAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AQUJAAAIAACHAAAA
</data>
</dict>
<dict>
<key>Comment</key>
<string>HDMI-audio, port 0204(12), 0x0a2e0008, 0x0a16000c, 0x0a2e000d, 0x0a26000d</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>
AgQJAAAEAAAHAQAA
</data>
<key>Name</key>
<string>AppleIntelFramebufferAzul</string>
<key>Replace</key>
<data>
AgQSAAAIAAAHAQAA
</data>
</dict>
</array>
复制代码
此文来源于rehabman大神,原帖参考:[guide]Intel IGPU HDMI/DP audio:http://www.tonymacx86.com/threads/guide-intel-igpu-hdmi-dp-audio-sandy-ivy-haswell-broadwell.189495/