Advertisement
Lizard1003

Acpi100pnlf

Sep 15th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. #Maintained by: RehabMan for: Laptop Patches
  2. #graphics_PNLF-ACPI100.txt
  3.  
  4. # This patch enables the brightness slider in SysPrefs->Displays
  5. # and will also enable activation of sleep mode by closing
  6. # the laptop lid.
  7. #
  8. # This patch works well for laptops that have working
  9. # ACPI methods with 64-or more levels (100 is common)
  10. # for good support for Windows 2012 (Windows 8)
  11. #
  12. # Based on information from the normal laptop DSDT methods,
  13. # optimized for use with ACPIBacklight.kext
  14. #
  15. # Note: This patch should be applied to the DSDT or SSDT that defines
  16. # your integrated graphics device (always at _ADR 0x00020000)
  17. # applied to one of the SSDTs, not DSDT.
  18. #
  19. # Note: Intended to be used with Windows 2012, so this should be done...
  20. # if you previously patched for Windows 2006, undo that patch!
  21.  
  22. # sometimes in Scope (_SB.PCI0)
  23. into method label _INI parent_label _SB.PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
  24. begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;
  25.  
  26. # sometimes in Scope (_SB)
  27. into method label _INI parent_label _SB code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
  28. begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;
  29.  
  30.  
  31. into_all device label PNLF remove_entry;
  32. into device name_adr 0x00020000 insert
  33. begin
  34. Device (PNLF)\n
  35. {\n
  36. // normal PNLF declares (note some of this probably not necessary)\n
  37. Name (_ADR, Zero)\n
  38. Name (_HID, EisaId ("APP0002"))\n
  39. Name (_CID, "backlight")\n
  40. Name (_UID, 10)\n
  41. Name (_STA, 0x0B)\n
  42. // _BCM/_BQC: set/get for brightness level\n
  43. Method (_BCM, 1, NotSerialized)\n
  44. {\n
  45. // Update backlight via existing DSDT methods\n
  46. ^^DD02._BCM(Arg0)\n
  47. }\n
  48. Method (_BQC, 0, NotSerialized)\n
  49. {\n
  50. Return(^^DD02._BQC())\n
  51. }\n
  52. Method (_BCL, 0, NotSerialized)\n
  53. {\n
  54. Return(^^DD02._BCL())\n
  55. }\n
  56. Method (_DOS, 1, NotSerialized)\n
  57. {\n
  58. ^^_DOS(Arg0)\n
  59. }\n
  60. // extended _BCM/_BQC for setting "in between" levels\n
  61. Method (XBCM, 1, NotSerialized)\n
  62. {\n
  63. // Update backlight via existing DSDT methods\n
  64. ^^DD02._BCM(Arg0)\n
  65. }\n
  66. Method (XBQC, 0, NotSerialized)\n
  67. {\n
  68. Return(^^DD02._BQC())\n
  69. }\n
  70. // Use XOPT=1 to disable smooth transitions\n
  71. Name (XOPT, Zero)\n
  72. // XRGL/XRGH: defines the valid range\n
  73. Method (XRGL, 0, NotSerialized)\n
  74. {\n
  75. Store(_BCL(), Local0)\n
  76. Store(DerefOf(Index(Local0, 2)), Local0)\n
  77. Return(Local0)\n
  78. }\n
  79. Method (XRGH, 0, NotSerialized)\n
  80. {\n
  81. Store(_BCL(), Local0)\n
  82. Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n
  83. Return(Local0)\n
  84. }\n
  85. }\n
  86. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement