hotpatch 驱动 Fn 亮度快捷键

2019/4/2 hackintosh

# 针对 intel 核显

# 为什么要驱动 Fn 亮度快捷键

  • fn+功能键直接调节亮度

# hotpatch Fn 样例

# DSDT/SSDT 如何提取 反编译 请看这篇

# 在 DSDT 中查找亮度调节方法

  • 类似下面的方法 含有这两句的 Notify (^^^GFX0.DD1F, 0x87) Notify (^^^GFX0.DD1F, 0x86)
            Method (_Q14, 0, NotSerialized)  // _Qxx: EC Query
            {
                P8XH (Zero, 0x14)
                # 注意此行
                Notify (^^^GFX0.DD1F, 0x87)
            }

            Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query
            {
                P8XH (Zero, 0x15)
                # 注意此行
                Notify (^^^GFX0.DD1F, 0x86)
            }

# 找到之后就可以开始制作 hotpatch 了

  • 新建ssdt-fn.dsl
  • 将里面的_Q14 _Q15 改为你在上面查到的名字
DefinitionBlock ("", "SSDT", 2, "hack", "fnkey", 0x00000000)
{
    External (_SB_.PCI0, DeviceObj)
    External (_SB_.PCI0.LPCB, DeviceObj)
    External (_SB_.PCI0.LPCB.EC0_, DeviceObj)
    External (_SB_.PCI0.LPCB.PS2K, DeviceObj)
    External (ATKP, IntObj)

    Method (_SB.PCI0.LPCB.EC0._Q14, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
    {
        Notify (\_SB.PCI0.LPCB.PS2K, 0x0405)
        Notify (\_SB.PCI0.LPCB.PS2K, 0x20) // Reserved
    }

    Method (_SB.PCI0.LPCB.EC0._Q15, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
    {
        Notify (\_SB.PCI0.LPCB.PS2K, 0x0406)
        Notify (\_SB.PCI0.LPCB.PS2K, 0x10) // Reserved
    }
}

# 编译为 ssdt-fn.aml

  • 放入 EFI/CLOVER/ACPI/patched/
  • 重启 不出意外 你的快捷键就能用了