#1
|
|||
|
|||
Laptop Screen Brightness Conflict With Video Card Driver.
Hi,guys~! Today I get a code of laptop screen brightness which can adjust the brightness after enter the system. It should be add into the GFX0 device, here is the code:
Code:
Method (_DSM, 4, NotSerialized) { Store (Package (0x0C) { "DisplayProductID", Buffer (0x04) { 0x5F, 0x9C, 0x00, 0x00 }, "DisplayVendorID", Buffer (0x04) { 0x10, 0x06, 0x00, 0x00 }, "AAPL,HasPanel", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "AAPL,backlight-control", Buffer (0x04) { 0xEE, 0x01, 0x00, 0x00 }, "AAPL01,DualLink", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "AAPL01,EDID", Buffer (0x80) { /* 0000 */ 0X00, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0X00, /* 0008 */ 0X30, 0XE4, 0X8B, 0X01, 0X00, 0X00, 0X00, 0X00, /* 0010 */ 0X00, 0X12, 0X01, 0X03, 0X80, 0X1F, 0X11, 0X78, /* 0018 */ 0X0A, 0X4A, 0X05, 0X9E, 0X5B, 0X54, 0X95, 0X25, /* 0020 */ 0X18, 0X50, 0X54, 0X00, 0X00, 0X00, 0X01, 0X01, /* 0028 */ 0X01, 0X01, 0X01, 0X01, 0X01, 0X01, 0X01, 0X01, /* 0030 */ 0X01, 0X01, 0X01, 0X01, 0X01, 0X01, 0X3E, 0X1C, /* 0038 */ 0X56, 0XA0, 0X50, 0X00, 0X16, 0X30, 0X30, 0X20, /* 0040 */ 0X35, 0X00, 0X36, 0XAE, 0X10, 0X00, 0X00, 0X19, /* 0048 */ 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, /* 0050 */ 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, /* 0058 */ 0X00, 0X00, 0X00, 0X00, 0X00, 0XFE, 0X00, 0X4C, /* 0060 */ 0X47, 0X20, 0X44, 0X69, 0X73, 0X70, 0X6C, 0X61, /* 0068 */ 0X79, 0X0A, 0X20, 0X20, 0X00, 0X00, 0X00, 0XFE, /* 0070 */ 0X00, 0X4C, 0X50, 0X31, 0X34, 0X30, 0X57, 0X48, /* 0078 */ 0X31, 0X2D, 0X54, 0X4C, 0X41, 0X31, 0X00, 0X75 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } unfortunely, my video card had used the method _DSM already~! Code:
Device (PEGP) { Name (_ADR, 0x00010000) Device (GFX0) { Name (_ADR, Zero) Name (_SUN, One) Method (_DSM, 4, NotSerialized) { Store (Package (0x16) { "@0,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@0,device_type", Buffer (0x08) { "display" }, "@0,name", Buffer (0x0F) { "NVDA,Display-A" }, "@1,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@1,device_type", Buffer (0x08) { "display" }, "@1,name", Buffer (0x0F) { "NVDA,Display-B" }, "NVCAP", Buffer (0x18) { /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* 0008 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, /* 0010 */ 0x00, 0x00, 0x00, 0x00 }, "VRAM,totalsize", Buffer (0x04) { 0x00, 0x00, 0x00, 0x20 }, "device_type", Buffer (0x0D) { "NVDA,GeForce" }, "model", Buffer (0x17) { "nVidia GeForce GT 240M" }, "rom-revision", Buffer (0x25) { "nVidia GeForce GT 240M OpenGL Engine" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } } both of them had use the DTGP method , but I can't figure out how this work in the above codes : Code:
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) } I had tried many ways, including put them together into GFX0, but with _DSM method already used... get the contents in one Store (Package (0x0C) { ... }, this result in only the video card driver works only... I had another GFX0 with Name (_ADR, 0x00020000), I put the screen brightness code method to it, but couldn't adjust the brightnees at all. I really appreciate you guys if could give me a help or any ways may help with this issue. Thanks anyway~! 💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers. |