本人机子Thinkpad E430 3254AB2 ,去年6月份购入,为了无线更快点,曾购入过 Intel 6235N 无线网卡,又为了黑苹果,年初购入了 AR5b197 无线蓝牙二合一(免驱,DSDT解决,什么是DSDT?你还没入门吧)

我比较喜欢使用原版安装方式,但又不是纯原版,至少不是整合版,整合版整合了很多内容,是我们不知道的。所以。。不想用。我个人比较倾向使用UEFI引导,故此文讲解的引导方式是 Clover 引导工具

本篇主要说解决本机的DSDT问题。

首先使用 Aida64 在windows下导出 DSDT 文件,至于如何进行,可参考DSDT修改(提取和软件使用篇)

提取之后,使用使用 DSDT Editor 修改至 0 error ,如果您有洁癖,可以参考上面的文章,将 waring 也清理掉。

1、添加 GTDP 函数(黑苹果必备)

可以在最后,也可以在最前,但要位于第一个“{”后,或者最后一个“}” 前,我是放在最后一个前的。

Method (DTGP, 5, NotSerialized) { If (LEqual (Arg0, Buffer (0x10) { /* 0000 / 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, / 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B })) { If (LEqual (Arg1, One)) { If (LEqual (Arg2, Zero)) { Store (Buffer (One) { 0x03 }, Arg4) Return (One) } If (LEqual (Arg2, One)) { Return (One) } } } Store (Buffer (One) { 0x00 }, Arg4) Return (Zero) }

2、修改LPC 支持原生电源管理

搜索 0x001F0000,查到 LPCB 节点:

Device (LPCB) { Name (_ADR, 0x001F0000)

在  Name (_ADR, 0x001F0000)  下添加以下内容:

Method (_DSM, 4, NotSerialized) { Store (Package (0x02) { "device-id", Buffer (0x04) { 0x57, 0x1e, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

device-id 的具体值,请使用 IORegistryExplorer 查看 Device (LPCB) 下的内容。

clover 配置中,使用<``key``>AsusAICPUPM</``key``> <string>Yes</string> 给驱动打补丁,用于加载原生驱动。

3、解决BIOS重置

搜索 0x001F0000,查到 LPCB 节点:

Device (LPCB) { Name (ADR, 0x001F0000) Name (CRS, ResourceTemplate ()     {         IO (Decode16,             0x0070,             // Range Minimum             0x0070,             // Range Maximum             0x01,               // Alignment             0x08,               // Length             )         IRQNoFlags ()             {8}     }) }

修改Length 为 0x02,如下内容:

Device (RTC) {     Name (HID, EisaId ("PNP0B00"))     Name (CRS, ResourceTemplate ()     {         IO (Decode16,             0x0070,             // Range Minimum             0x0070,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IRQNoFlags ()             {8}     }) }

4、IRQ修正。

HPET的IRQ。由于i5-3210m是双核四线程CPU,它需要4个IRQ。添加2个IRQ(0和8),同时也参考其他帖子,再为其增加2个IRQ(11和15)

搜索 PNP0103,查到HPET节点:

Device (HPET) {    Name (HID, EisaId ("PNP0103"))    Name (UID, Zero)    Name (BUF0, ResourceTemplate ()    {        Memory32Fixed (ReadWrite,            0xFED00000,         // Address Base            0x00000400,         // Address Length        _Y0F)    })

在  Name (BUF0, ResourceTemplate ()  下添加以下IRQ参数,修改之后如下:

Name (BUF0, ResourceTemplate () {     IRQNoFlags ()         {0}     IRQNoFlags ()         {8}     IRQNoFlags ()         {11}     IRQNoFlags ()         {15}     Memory32Fixed (ReadWrite,         0xFED00000,         // Address Base         0x00000400,         // Address Length         _Y0F) })

修正声音变形,电源管理须删除 LPC、 RTC 与 TIMR 的IRQ

Device (IPIC) {     Name (HID, EisaId ("PNP0000"))     Name (CRS, ResourceTemplate ()     {         IO (Decode16,             0x0020,             // Range Minimum             0x0020,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x0024,             // Range Minimum             0x0024,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x0028,             // Range Minimum             0x0028,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x002C,             // Range Minimum             0x002C,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x0030,             // Range Minimum             0x0030,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x0034,             // Range Minimum             0x0034,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x0038,             // Range Minimum             0x0038,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x003C,             // Range Minimum             0x003C,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00A0,             // Range Minimum             0x00A0,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00A4,             // Range Minimum             0x00A4,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00A8,             // Range Minimum             0x00A8,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00AC,             // Range Minimum             0x00AC,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00B0,             // Range Minimum             0x00B0,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00B4,             // Range Minimum             0x00B4,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00B8,             // Range Minimum             0x00B8,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x00BC,             // Range Minimum             0x00BC,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )         IO (Decode16,             0x04D0,             // Range Minimum             0x04D0,             // Range Maximum             0x01,               // Alignment             0x02,               // Length             )     }) } Device (RTC) { Name (HID, EisaId ("PNP0B00")) Name (CRS, ResourceTemplate () { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x02, // Length ) }) } Device (TIMR) { Name (HID, EisaId ("PNP0100")) Name (CRS, ResourceTemplate () { IO (Decode16, 0x0040, // Range Minimum 0x0040, // Range Maximum 0x01, // Alignment 0x04, // Length ) IO (Decode16, 0x0050, // Range Minimum 0x0050, // Range Maximum 0x10, // Alignment 0x04, // Length ) }) }

5、DSDT 驱动显卡

搜索 0x00020000 查到 VID 节点:

Device (VID) { Name (_ADR, 0x00020000)

在其下面添加内建代码:

Method (_DSM, 4, NotSerialized) { Store (Package (0xa) { "hda-gfx", Buffer (0x0A) { "onboard-1" }, "AAPL,slot-name", Buffer (0x09) { "Built in" }, "device-id", Buffer (0x04) { 0x66, 0x01, 0x00, 0x00 }, "AAPL,ig-platform-id", Buffer (0x04) { 0x03, 0x00, 0x66, 0x01 }, "AAPL00,DualLink", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

ig-platform-id 请根据你自己电脑的显卡 id 设定。

6、添加声卡信息

搜索 0x001B0000 查到 HDEF 节点:

Device (HDEF) { Name (_ADR, 0x001B0000)

改节点下添加声卡内建信息:

Method (DSM, 4, NotSerialized) { Store (Package (0x10) { "hda-gfx", Buffer (0x0A) { "onboard-1" }, "AAPL,slot-name", Buffer (0x09) { "Built in" }, "device-id", Buffer (0x04) { 0x6E, 0x50, 0xF1, 0x14 }, "layout-id", Buffer (0x04) { 0x0C, 0x00, 0x00, 0x00 }, "model", Buffer (0x1A) { "HD Audio Conexant Cx20671" }, "name", Buffer (0x11) { "Conexant Cx20671" }, "devicetype", Buffer (0x11) { "Audio Controller" }, "PinConfigurations", Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

内建声卡信息之后,PCI设备即可查询到,配合修改好的 AppleHDA 驱动声卡使用,声卡驱动在下文提供。

7、添加网卡内建

搜索 0x001C0003,查到 RP04 节点,具体是哪个节点,可通过 IORegistryExplorer 查看网卡位于哪个节点下。

Device (RP04) { Name (_ADR, 0x001C0003)

在这个节点下的 Device (PXSX) 节点下添加网卡内建信息 Method (_DSM, 4, NotSerialized) ,修改好之后如下:

Device (PXSX) { Name (ADR, Zero) Name (PRW, Package (0x02) { 0x23, 0x05 }) Method (PSW, 1, NotSerialized) { If (Arg0) { Store (One, ^^^LPCB.EC0.HWWL) } Else { Store (Zero, ^^^LPCB.EC0.HWWL) } } Method (DSM, 4, NotSerialized) { Store (Package (0x0a) { "hda-gfx", Buffer (0x0A) { "onboard-1" }, "AAPL,slot-name", Buffer (0x09) { "Built in" }, "built-in", Buffer (One) { 0x00 }, "model", Buffer (0x24) { "Realtek 8168/8101E Gigabit Ethernet" }, "device_type", Buffer (0x09) { "Ethernet" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } }

8、SATA内建

搜索 0x001F0002 查到 SAT0 节点:

Device (SAT0) { Name (_ADR, 0x001F0002)

在其下添加内建代码:

Method (_DSM, 4, NotSerialized) { Store (Package (0x02) { "device-id", Buffer (0x04) { 0x03, 0x1e, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

device-id 可通过 IORegistryExplorer 查看

9、解决关机重启

在 GTDP 后添加一下内容:

OperationRegion (PMRS, SystemIO, 0x0430, One) Field (PMRS, ByteAcc, NoLock, Preserve) { , 4, SLPE, 1 }

搜索 Method (_PTS, 1, NotSerialized) 得到关节代码部分内容,如下:

Method (_PTS, 1, NotSerialized) { If (LEqual (Arg0, 0x03)) { Store (0x53, P80H) } If (LEqual (Arg0, 0x04)) { Store (0x54, P80H) } If (LEqual (Arg0, 0x05)) { Store (0x55, P80H) } Store (One, Local0) If (LEqual (Arg0, SPS)) { Store (Zero, Local0) } .....原代码。 }

将0x05后的节点用 else 括住,然后调用 SLPE,改后代码如下

Method (_PTS, 1, NotSerialized) { If (LEqual (Arg0, 0x03)) { Store (0x53, P80H) } If (LEqual (Arg0, 0x04)) { Store (0x54, P80H) } If (LEqual (Arg0, 0x05)) { Store (0x55, P80H) Store (Zero, SLPE) } Else { Store (One, Local0) If (LEqual (Arg0, SPS)) { Store (Zero, Local0) } ....原代码 } }

10、添加AR5B197无线网卡信息

搜索 0x001C0001,查到 RP02 节点,具体是哪个节点,可通过 IORegistryExplorer 查看网卡位于哪个节点下。

Device (RP02) { Name (_ADR, 0x001C0001)

在这个节点下的 Device (PXSX) 节点下添加网卡内建信息 Method (_DSM, 4, NotSerialized) ,修改好之后如下:

Device (PXSX) { Name (ADR, Zero) Name (PRW, Package (0x02) { 0x09, 0x04 }) Method (PSW, 1, NotSerialized) { If (Arg0) { Store (One, ^^^LPCB.EC0.HWWL) } Else { Store (Zero, ^^^LPCB.EC0.HWWL) } } Method (DSM, 4, NotSerialized) { Store (Package (0x12) { "hda-gfx", Buffer (0x0A) { "onboard-1" }, "AAPL,slot-name", Buffer (0x08) { "AirPort" }, "built-in", Buffer (One) { 0x00 }, "model", Buffer (0x19) { "Atheros AR9287 WiFi card" }, "name", Buffer (0x0B) { "pci168c,2a" }, "device-id", Unicode ("*"), "subsystem-id", Buffer (0x04) { 0x8F, 0x00, 0x00, 0x00 }, "subsystem-vendor-id", Buffer (0x04) { 0x6B, 0x10, 0x00, 0x00 }, "device_type", Buffer (0x08) { "Airport" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } }

11、USB内建

搜索 0x001D0000 ,查到 EHC1 节点:

Device (EHC1) { Name (_ADR, 0x001D0000)

在其下添加内建代码:

Method (DSM, 4, NotSerialized) { Store (Package (0x09) { "device-id", Buffer (0x14) { 0x26, 0x1e, 0x00, 0x00 }, "built-in", Buffer (One) { 0x00 }, "AAPL,clock-id", Buffer (One) { 0x01 }, "devicetype", Buffer (0x05) { "EHCI" },/* "AAPL,current-available", 0x05DC, "AAPL,current-extra", 0x04B0, "AAPL,current-extra-in-sleep", 0x03E8, "AAPL,device-internal", 0x02, "AAPL,max-port-current-in-sleep", 0x3E8, "AAPL,standard-port-current-in-sleep", 0X1F4,*/ Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

device-id 可通过 IORegistryExplorer 查看位于哪个节点下,通过上面内容可以看到,有一部分内容我是注释掉的,目前我也不知道有没有用。暂时用 clover 里面配置的USBFixOwnership,USBInjection 两个参数处理。因为我的机子现在有个毛病就是不定时无故无法睡眠。造成指示灯长时间短亮闪烁。

搜索 0x001A0000 ,查到 EHC1 节点:

Device (EHC2) { Name (_ADR, 0x001A0000)

在其下添加内建代码:

Method (DSM, 4, NotSerialized) { Store (Package (0x09) { "device-id", Buffer (0x04) { 0x2d, 0x1e, 0x00, 0x00 }, "built-in", Buffer (One) { 0x00 }, "AAPL,clock-id", Buffer (One) { 0x02 }, "devicetype", Buffer (0x05) { "EHCI" },/* "AAPL,current-available", 0x05DC, "AAPL,current-extra", 0x04B0, "AAPL,current-extra-in-sleep", 0x03E8, "AAPL,device-internal", 0x02, "AAPL,max-port-current-in-sleep", 0x3E8, "AAPL,standard-port-current-in-sleep", 0X1F4,*/ Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } }

device-id 可通过 IORegistryExplorer 查看

搜索 0x00140000 ,查到 XHC1 节点:

Device (XHC) { Name (_ADR, 0x00140000)

在其下添加内建代码:

Method (DSM, 4, NotSerialized) { Store (Package (0x09) { "device-id", Buffer (0x04) { 0x31, 0x1E, 0x00, 0x00 }, "built-in", Buffer (One) { 0x00 }, "AAPL,clock-id", Buffer (One) { 0x00 }, "devicetype", Buffer (0x05) { "XHC" },/* "AAPL,current-available", 0x05DC, "AAPL,current-extra", 0x04B0, "AAPL,current-extra-in-sleep", 0x03E8, "AAPL,device-internal", 0x02, "AAPL,max-port-current-in-sleep", 0x3E8, "AAPL,standard-port-current-in-sleep", 0X384,*/ Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }

device-id 可通过 IORegistryExplorer 查看

12、添加SMBUS支持

搜索 0x001F0003 ,查到 SBUS 节点

Device (SBUS) { Name (_ADR, 0x001F0003)

在其下添加 SMBUS 设备:

Device (BUS0) { Name (CID, "smbus") Name (ADR, Zero) Device (DVL0) { Name (ADR, 0x57) Name (CID, "diagsvault") Method (_DSM, 4, NotSerialized) { Store (Package (0x02) { "address", 0x57 }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } }

剩下的工作,还有DSDT设置电源,已经驱动的适应使用。