Jump to content

ACPI Backlight Driver


  • Please log in to reply
216 replies to this topic

#21
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

My display is definitely 0. AppleBacklightDisplay isn't loading as you said.

bash-3.2# ioreg -w0 -rtbSk AppleDisplayType+-o Root  <class IORegistryEntry>  +-o MacBookPro6,2  <class IOPlatformExpertDevice>    +-o AppleACPIPlatformExpert  <class AppleACPIPlatformExpert>      +-o PCI0@0  <class IOACPIPlatformDevice>        +-o AppleACPIPCI  <class AppleACPIPCI>          +-o P0P2@1  <class IOPCIDevice>            +-o IOPCI2PCIBridge  <class IOPCI2PCIBridge>              +-o PEGP@0  <class IOPCIDevice>                +-o ATY,Hoolock@0  <class AtiFbStub>                  +-o ATY_Hoolock  <class ATIFramebuffer>                    +-o display0  <class IODisplayConnect>                      +-o AppleDisplay  <class AppleDisplay>                          {                            "IOClass" = "AppleDisplay"                            "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"                            "IOProviderClass" = "IODisplayConnect"                            "DisplayProductID" = 1815                            "IOPowerManagement" = {"MaxPowerState"=3,"CurrentPowerState"=3}                            "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPCI2PCIBridge/PEGP@0/ATY,Hoolock@0/ATY_Hoolock/display0/AppleDisplay-756e6b6e-717"                            "IODisplayParameters" = {"pscn"={"min"=5101,"max"=10000,"value"=10000},"thrm"={"min"=0,"max"=120,"value"=75},"rgsc"={"min"=0,"max"=65536,"value"=65536},"ggsc"={"min"=0,"max"=65536,"value"=65536},"bgsc"={"min"=0,"max"=65536,"value"=65536},"dith"={"min"=0,"max"=1,"value"=1}}                            "IOProbeScore" = 2000                            "IOMatchCategory" = "IODefaultMatchCategory"                            "AppleDisplayType" = 10                            "AppleSense" = 1815                            "IODisplayConnectFlags" = <84400000>                            "DisplayVendorID" = 1970170734                          }


Kextstat

bash-3.2# kextstatIndex Refs Address            Size       Wired      Name (Version) <Linked Against>    1   53 0xffffff806adb4000 0x683c     0x683c     com.apple.kpi.bsd (11.1.0)    2    6 0xffffff800b665000 0x3d0      0x3d0      com.apple.kpi.dsep (11.1.0)    3   74 0xffffff806adbb000 0x1b9d8    0x1b9d8    com.apple.kpi.iokit (11.1.0)    4   80 0xffffff806add7000 0x9b54     0x9b54     com.apple.kpi.libkern (11.1.0)    5   69 0xffffff800b449000 0x88c      0x88c      com.apple.kpi.mach (11.1.0)    6   27 0xffffff806ade1000 0x4938     0x4938     com.apple.kpi.private (11.1.0)    7   48 0xffffff806ada8000 0x22a0     0x22a0     com.apple.kpi.unsupported (11.1.0)    8   16 0xffffff7f8072e000 0x7000     0x7000     com.apple.iokit.IOACPIFamily (1.4) <7 6 4 3>    9   19 0xffffff7f80735000 0x1d000    0x1d000    com.apple.iokit.IOPCIFamily (2.6.5) <7 6 5 4 3>   10    2 0xffffff7f80752000 0x58000    0x58000    com.apple.driver.AppleACPIPlatform (1.4) <9 8 7 6 5 4 3 1>   11    0 0xffffff7f807aa000 0x2a000    0x2a000    com.apple.driver.AppleIntelCPUPowerManagement (166.0.0) <7 6 5 4 3 1>   12    1 0xffffff7f807d5000 0xc000     0xc000     com.apple.driver.AppleKeyStore (28.18) <7 6 5 4 3 1>   13    2 0xffffff7f807e1000 0xa000     0xa000     org.netkas.FakeSMC (3.1.0) <8 7 5 4 3>   14    0 0xffffff7f807eb000 0x5000     0x5000     org.slice.RadeonMonitor (1.0.0d1) <13 9 4 3>   15    5 0xffffff7f807f3000 0x25000    0x25000    com.apple.iokit.IOStorageFamily (1.7) <7 6 5 4 3 1>   16    0 0xffffff7f80818000 0x19000    0x19000    com.apple.driver.DiskImages (326) <15 7 6 5 4 3 1>   17    0 0xffffff7f80831000 0x8000     0x8000     com.apple.nke.applicationfirewall (3.0.30) <7 6 5 4 3 1>   18    2 0xffffff7f8083b000 0x4000     0x4000     com.apple.kext.AppleMatch (1.0.0d1) <4 1>   19    1 0xffffff7f8083f000 0x11000    0x11000    com.apple.security.sandbox (165) <18 7 6 5 4 3 2 1>   20    0 0xffffff7f80850000 0x5000     0x5000     com.apple.security.quarantine (1) <19 18 7 6 5 4 2 1>   21    0 0xffffff7f80856000 0x3000     0x3000     com.apple.security.TMSafetyNet (7) <7 6 5 4 2 1>   22    0 0xffffff7f80859000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (166.0.0) <7 6 5 4 3 1>   23    0 0xffffff7f8085d000 0x3000     0x3000     com.apple.driver.AppleAPIC (1.5) <4 3>   24    0 0xffffff7f80861000 0x4000     0x4000     com.apple.driver.AppleSMBIOS (1.7) <7 4 3>   25    4 0xffffff7f80866000 0x6b000    0x6b000    com.apple.iokit.IOHIDFamily (1.7.0) <12 7 6 5 4 3 2 1>   26    0 0xffffff7f808d1000 0x4000     0x4000     com.apple.driver.AppleACPIButtons (1.4) <25 10 8 7 6 5 4 3 1>   27    2 0xffffff7f808d7000 0x4000     0x4000     com.apple.iokit.IOSMBusFamily (1.1) <5 4 3>   28    0 0xffffff7f808db000 0x7000     0x7000     com.apple.driver.AppleACPIEC (1.4) <27 10 8 5 4 3>   29    0 0xffffff7f808e4000 0x3000     0x3000     com.apple.driver.AppleHPET (1.6) <8 7 5 4 3>   30    0 0xffffff7f808e8000 0x7000     0x7000     com.apple.driver.AppleRTC (1.4) <8 5 4 3 1>   31    0 0xffffff7f808f1000 0x3000     0x3000     com.yourcompany.driver.AppleACPIPS2Nub (1.0.0d1) <8 7 5 4 3 1>   32    1 0xffffff7f808f6000 0x4000     0x4000     com.apple.driver.AppleEFIRuntime (1.5.0) <7 6 5 4 3>   33    8 0xffffff7f808fa000 0x4e000    0x4e000    com.apple.iokit.IOUSBFamily (4.4.0) <9 7 5 4 3 1>   34    0 0xffffff7f80948000 0x17000    0x17000    com.apple.driver.AppleUSBEHCI (4.4.0) <33 9 7 5 4 3 1>   35    2 0xffffff7f80967000 0xa000     0xa000     com.apple.iokit.IOAHCIFamily (2.0.6) <5 4 3 1>   36    0 0xffffff7f80971000 0x16000    0x16000    com.apple.driver.AppleAHCIPort (2.1.8) <35 9 5 4 3 1>   37    0 0xffffff7f8098d000 0x8000     0x8000     com.apple.driver.ApplePS2Controller (1.1.5) <7 5 4 3 1>   38    0 0xffffff7f80995000 0x7000     0x7000     com.apple.driver.AppleEFINVRAM (1.5.0) <32 7 5 4 3>   39    2 0xffffff7f8099e000 0x29000    0x29000    com.apple.iokit.IONetworkingFamily (2.0) <7 6 5 4 3 1>   40    0 0xffffff7f809c7000 0x6000     0x6000     com.insanelymac.AtherosL1cEthernet (1.0.2b2) <39 9 5 4 3 1>   41    0 0xffffff7f809cf000 0x3000     0x3000     com.apple.iokit.IOUSBUserClient (4.4.0) <33 7 5 4 3 1>   42    0 0xffffff7f809d2000 0x4000     0x4000     com.Apple.driver.PS2Keyboard (1.1.0) <25 5 4 3>   43    0 0xffffff7f809d6000 0x5000     0x5000     com.apple.AppleFSCompression.AppleFSCompressionTypeDataless (1.0.0d1) <7 6 4 3 2 1>   44    0 0xffffff7f809dd000 0x11000    0x11000    com.apple.driver.AppleUSBHub (4.4.0) <33 5 4 3 1>   45    0 0xffffff7f809f2000 0x5000     0x5000     com.apple.AppleFSCompression.AppleFSCompressionTypeZlib (1.0.0d1) <6 4 3 2 1>   46    0 0xffffff7f809f9000 0x15000    0x15000    com.apple.iokit.IOAHCIBlockStorage (2.0.0) <35 15 5 4 3 1>   47    0 0xffffff7f80a16000 0x9000     0x9000     com.apple.BootCache (32) <7 6 5 4 3 1>   48    0 0xffffff7f80a20000 0x4000     0x4000     com.apple.driver.XsanFilter (403) <15 5 4 3 1>   49    1 0xffffff7f80a24000 0x6000     0x6000     com.apple.driver.AppleUSBComposite (3.9.0) <33 4 3 1>   50    0 0xffffff7f80a2a000 0x6000     0x6000     com.apple.driver.AppleUSBMergeNub (4.4.0) <49 33 4 3 1>   52    2 0xffffff7f80a33000 0x2a000    0x2a000    com.apple.iokit.IOSCSIArchitectureModelFamily (3.0.0) <5 4 3 1>   53    0 0xffffff7f80a5d000 0x11000    0x11000    com.apple.iokit.IOUSBMassStorageClass (3.0.0) <52 33 15 5 4 3 1>   54    1 0xffffff7f80a6e000 0x73000    0x73000    com.apple.iokit.IOBluetoothFamily (2.5f17) <7 5 4 3 1>   55    0 0xffffff7f80ae1000 0xe000     0xe000     com.apple.driver.AppleUSBBluetoothHCIController (2.5f17) <54 33 7 5 4 3>   56    0 0xffffff7f80aef000 0x15000    0x15000    com.apple.iokit.IOSCSIBlockCommandsDevice (3.0.0) <52 15 5 4 3 1>   58    1 0xffffff7f80b0d000 0x5000     0x5000     com.apple.kext.triggers (1.0) <7 6 5 4 3 1>   59    0 0xffffff7f80b12000 0x9000     0x9000     com.apple.filesystems.autofs (3.0) <58 7 6 5 4 3 1>   60    0 0xffffff7f80b1d000 0xd000     0xd000     com.Apple.driver.PS2Trackpad (1.1.0) <25 5 4 3>   61    9 0xffffff7f80b2a000 0x38000    0x38000    com.apple.iokit.IOGraphicsFamily (2.3) <9 7 5 4 3>   62    0 0xffffff7f80b62000 0x3000     0x3000     com.darwin.driver.ACPIBacklight (1) <61 8 4 3>   63    0 0xffffff7f80b67000 0x3000     0x3000     com.apple.driver.AppleLPC (1.5.1) <9 5 4 3>   64    0 0xffffff7f80b6b000 0x3000     0x3000     com.apple.driver.AppleSMBusPCI (1.0.10d0) <9 5 4 3>   65    1 0xffffff7f80b6e000 0x13000    0x13000    com.apple.driver.IOPlatformPluginFamily (4.7.0b2) <8 7 6 5 4 3>   66    2 0xffffff7f80b81000 0xc000     0xc000     com.apple.driver.AppleSMC (3.1.1d2) <8 7 5 4 3>   67    0 0xffffff7f80b8d000 0x11000    0x11000    com.apple.driver.ACPI_SMC_PlatformPlugin (4.7.0b2) <66 65 9 8 7 6 5 4 3>   68    1 0xffffff7f80ba3000 0x6000     0x6000     com.apple.kext.OSvKernDSPLib (1.3) <5 4>   69    1 0xffffff7f80ba9000 0x2a000    0x2a000    com.apple.iokit.IOAudioFamily (1.8.3fc11) <68 5 4 3 1>   70    0 0xffffff7f80bd3000 0x4000     0x4000     com.apple.driver.AudioIPCDriver (1.2.0) <69 5 4 3 1>   71    2 0xffffff7f80bd9000 0x186000   0x186000   com.apple.kext.ATISupport (7.0.4) <61 9 8 7 5 4 3 1>   72    0 0xffffff7f80d5f000 0x3f000    0x3f000    com.apple.kext.ATI5000Controller (7.0.4) <71 61 9 8 5 4 3 1>   73    0 0xffffff7f80d9e000 0x8000     0x8000     com.apple.iokit.IOUSBHIDDriver (4.4.0) <33 25 5 4 3 1>   75    2 0xffffff7f80daa000 0x12000    0x12000    com.apple.iokit.IONDRVSupport (2.3) <61 9 7 5 4 3>   78    0 0xffffff7f80dc5000 0xe000     0xe000     com.apple.driver.AppleSMBusController (1.0.10d0) <27 9 8 5 4 3>   79    0 0xffffff7f80dd3000 0x5000     0x5000     com.apple.Dont_Steal_Mac_OS_X (7.0.0) <66 7 4 3 1>   80    0 0xffffff7f80dd9000 0x296000   0x296000   com.apple.ATIRadeonX3000 (7.0.4) <75 61 9 7 6 5 4 3 1>   83    0 0xffffff7f8113c000 0xb000     0xb000     com.apple.driver.AGPM (100.12.40) <75 61 9 5 4 3>   85    0 0xffffff7f81156000 0x3000     0x3000     org.mozodojo.IntelThermal (1.0.0d1) <13 7 5 4 3>   86    0 0xffffff7f8115b000 0x12000    0x12000    com.apple.kext.ATIFramebuffer (7.0.4) <71 61 9 8 7 5 4 3 1>   89    0 0xffffff7f81180000 0xa000     0xa000     com.apple.driver.AppleMCCSControl (1.0.24) <61 9 7 5 4 3 1>   90    1 0xffffff7f8118f000 0xe000     0xe000     com.apple.iokit.IOSerialFamily (10.0.5) <7 6 5 4 3 1>   91    0 0xffffff7f8119d000 0xe000     0xe000     com.apple.iokit.IOBluetoothSerialManager (2.5f17) <90 7 5 4 3 1>   92    0 0xffffff7f811ab000 0x5000     0x5000     com.apple.driver.AppleUpstreamUserClient (3.5.9) <61 9 8 7 5 4 3 1>   93    0 0xffffff7f811b2000 0x12000    0x12000    com.apple.iokit.IOSurface (80.0) <7 5 4 3 1>   94    0 0xffffff7f811c4000 0x6000     0x6000     com.apple.iokit.IOUserEthernet (1.0.0d1) <39 6 5 4 3 1>   96    3 0xffffff7f811d4000 0x57000    0x57000    com.apple.filesystems.ntfs (3.8) <7 6 5 4 1>   97    0 0xffffff7f81230000 0x5000     0x5000     com.apple.driver.AppleHWSensor (1.9.4d0) <5 4 3>   98    1 0xffffff7f81237000 0xc000     0xc000     com.apple.filesystems.msdosfs (1.7) <7 5 4 1>


Send me a IORegisteryExplorer dump.

#22
toxomo

toxomo

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
well, i also have no luck for my ati mobility radeon 5450.
i put the two sections of codes into the graphics part of my dsdt and still failed to get "applebacklightdisplay" loaded.
here is my iroregistryexplorer dump. ;)
Attached File  Ioregistry.zip   560.16KB   14 downloads

#23
jamezelle

jamezelle

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts
[codebox] "AAPL,HasPanel",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"AAPL,Haslid",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"AAPL,backlight-control",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,backlight-control",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,AAPL,boot-display",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,built-in",
Buffer ()
{
One
},
[/codebox]

Where can I inject this into my _DSM Method? I looked at your dsdt but I could not find the above code anywhere in your dsdt, are you injecting via graphics enabler or EFI string??

I have PNLF method in \_SB scope

Any help is appreciated

Attached is iogreg.txt.zip and DSDT.aml.zip

ASUS G53JW
Core I7 740QM
8GB DDR3 1333
Nvidia GTX 460M

Thanks.

Attached Files



#24
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

"AAPL,HasPanel",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,Haslid",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                        "AAPL,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },                                                                        "@0,backlight-control",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        }, 						"@0,AAPL,boot-display",                        Buffer (0x04)                        {                            0x01, 0x00, 0x00, 0x00                        },												"@0,built-in",                        Buffer ()                        {                            One                        },


Where can I inject this into my _DSM Method? I looked at your dsdt but I could not find the above code anywhere in your dsdt, are you injecting via graphics enabler or EFI string??

I have PNLF method in \_SB scope

Any help is appreciated

Attached is iogreg.txt.zip and DSDT.aml.zip

ASUS G53JW
Core I7 740QM
8GB DDR3 1333
Nvidia GTX 460M

Thanks.


Use _DSM...DTGP classical way in Device (GFX0) scope
The properties are merged with the one injected by graphic enabler

#25
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

well, i also have no luck for my ati mobility radeon 5450.
i put the two sections of codes into the graphics part of my dsdt and still failed to get "applebacklightdisplay" loaded.
here is my iroregistryexplorer dump. :)
Attached File  Ioregistry.zip   560.16KB   14 downloads


I've made a diagnostic driver to try to understand what's happening.
It will make some log lines starting by ACPIBacklightDisplay: at the end of boot, and then will refuse to load.
Attached File  ACPIBacklightDisplay.kext.zip   20.77KB   123 downloads
publish the logs

#26
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN
Good job, hotKoffy.
I just try it, works well in my case. My graphics card is Intel X3100, i can get brightness work by default, i mean by using Fn+up/down adjust brightness but no "sun" notify. After install the driver and edit dsdt, i can the both work, by using the hotkey Fn+Delete and Pause, also the slider adjust function under the Display setting too.
But, I found one thing, OS X can store the brightness level by using keyboard adjust. can't remember by slider adjust. For example, when I use slider adjust brightness level to 50%, after reboot, it goes 100% (But the real value is 50%, just the slider goes 100%.), if I use Hot key to do it, it works well.

Edit:
After do some tests, it really works great i think, I found some clue about brightness level store, when I set the value to 80% or smaller than that, OSX can store the value well, if it larger than 80%, it turn to 100% no matter using keyboard or slider. More information like that I laptop model as Macbook 3,1 and my laptop screen has ten steps, Macbook 3,1 only has eight steps. I think that why i set the value over 80% it change to max value.

#27
1337David

1337David

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 100 posts
Hi I am having trouble with your kext and injecting the properties into my DSDT on my Asus 1201N. The SB scope ones work fine but when I try to inject the other properties under _DSM in IGPU I can't compile a DSDT.aml. Do I have the properties in the wrong location? I knew they went there in the previous kext version but your instructions on this post are vague to me.

#28
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts

This is a driver for laptops which backlight are controlled by ACPI Methods: if you have _DOS _BCL _BCM _BQC in you DSDT.

This driver provides native backlight management for laptops with backlight managed by ACPI : slider in the display pref pane and sun bezel when you press backlight up/down hotkey (with an other driver than can understand your keyboard Fn keys...), power management by the OS : dim before sleep, reduce level when AC is unpluged.

It replaces an other driver I've written.ACPIBacklightDisplay.kext This old driver shall be removed.
Tested on SL 10.6.8 and Lion 10.7.0 10.7.1. May works on older version, but not tested.


Thanks man, I can use Fn+Delete(ScrLk) and Pause to adjust the brightness, it works perfect for me!
But I still have a trouble about the hotkey. I modified the voodoops2keyboard, changed the scancode, and change the brightness down hotkey to PrtSc, and then something strange happened. I can't use the PrtSc to adjust the brightness to lowest level and some levels are missed, but Fn+Delete works well.
The voodoops2keyboard source is in this thread .
BTW, I'm using 10.6.7.
Thanks.

#29
toxomo

toxomo

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts

I've made a diagnostic driver to try to understand what's happening.
It will make some log lines starting by ACPIBacklightDisplay: at the end of boot, and then will refuse to load.
Attached File  ACPIBacklightDisplay.kext.zip   20.77KB   123 downloads
publish the logs

The log content related to ACPIBacklightDisplay is
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: probe(display0)
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: !kIOConnectionBuiltIn
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: wrong displayType
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: displayType 10


Thank you ;)



#30
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

The log content related to ACPIBacklightDisplay is
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: probe(display0)
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: !kIOConnectionBuiltIn
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: wrong displayType
Oct 5 17:21:58 tangdeMacBook kernel[0]: ACPIBacklightDisplay: displayType 10

Thank you :)


Your screen is not reconised as built in LCD panel but generic VGA.

I don't know what's happen with ATI drivers. I've NVIDIA.
Do you have integrated intel HD graphics too? like MBP8.2

Looking into imac 12.2 properties is interesting:
Attached File  imac12_2.png   264.75KB   172 downloads

try injecting display type

Edit:
Cyrus the Great use this for his ATI 4850

"@0,display-type",
Buffer (0x05)
{
"LVDS"
},

Try LVDS or LCD

#31
yehia Amer

yehia Amer

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:egypt
Hi hotKoffy
thanks for this great Kext it works very good

Oct 5 12:28:51 localhost kernel[0]: ACPIBacklightPanel: Found Backlight Device: DD02
Oct 5 12:28:51 localhost kernel[0]: ACPIBacklightPanel: ACPI Method _DOS found. Device path: _SB.PCI0.GFX0
Oct 5 12:28:51 localhost kernel[0]: ACPIBacklightPanel: ACPI Methods _BCL _BCM _BQC found. Device path: _SB.PCI0.GFX0.DD02
Oct 5 12:28:51 localhost kernel[0]: ACPIBacklightPanel: Version 1.0


the only problem is that it gives me a KP when i plug any HDMI Cable !!!

i did all the DSDT edits myself, so please take a look
also attached the ioreg

Attached Files



#32
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

Hi I am having trouble with your kext and injecting the properties into my DSDT on my Asus 1201N. The SB scope ones work fine but when I try to inject the other properties under _DSM in IGPU I can't compile a DSDT.aml. Do I have the properties in the wrong location? I knew they went there in the previous kext version but your instructions on this post are vague to me.


here it is http://www.insanelym...c=264740&st=240

Hi hotKoffy
thanks for this great Kext it works very good

the only problem is that it gives me a KP when i plug any HDMI Cable !!!

i did all the DSDT edits myself, so please take a look
also attached the ioreg


I don't have this problem but I've an idea on what's happening in the code. I will make the change for the next release.

Edit:
New release is online!

#33
toxomo

toxomo

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts

Your screen is not reconised as built in LCD panel but generic VGA.

I don't know what's happen with ATI drivers. I've NVIDIA.
Do you have integrated intel HD graphics too? like MBP8.2

Looking into imac 12.2 properties is interesting:
Attached File  imac12_2.png   264.75KB   172 downloads

try injecting display type

Edit:
Cyrus the Great use this for his ATI 4850

"@0,display-type",
Buffer (0x05)
{
"LVDS"
},

Try LVDS or LCD



That did not work. i've tried that several times, but the system seemed to omit the setting and insisted on using "CRT". :(

#34
Cyrus the Great

Cyrus the Great

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:tehran

That did not work. i've tried that several times, but the system seemed to omit the setting and insisted on using "CRT". :(

the os get display type from framebuffer personality may be you must patch the framebuffer that using for your card .
this is mucha guide about modding framebuffer personality:
http://www.insanelym...howtopic=252061

#35
macq

macq

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 126 posts
@hotKoffy,
Firstly congrats and thanks for the perfect kext.
I would like to report my experience with it.
For me the kext provided super smooth brightness control via the slider but no Fn key control.

How ever with the newer version the brightness value does not remain fixed with newer boots and the laptop boots with maximum brightness with every boot.
With the previous release pf ACPI Backlight Driver the brightness level remained fixed once set,and did not change to max with the next boot.

What changed?

#36
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

@hotKoffy,
Firstly congrats and thanks for the perfect kext.
I would like to report my experience with it.
For me the kext provided super smooth brightness control via the slider but no Fn key control.

How ever with the newer version the brightness value does not remain fixed with newer boots and the laptop boots with maximum brightness with every boot.
With the previous release pf ACPI Backlight Driver the brightness level remained fixed once set,and did not change to max with the next boot.

What changed?


I've finish to followed ACPI specification:
Attached File  ACPI_BCL.png   183.73KB   162 downloads

When the driver initialize, it get the current brightness and look if the AC adapter is plugged.
If the PC is on AC, it took the max between the current value and the first entry in _BCL
If the PC is on Battery, it took the min between the current value and the second entry in _BCL.

So if you wants to change the behaviour for your laptop, edit in your DSDT the package returned by _BCL:
First entry : a minimum value if you are on AC (didn't need to save power)
Second entry : a max auto value if you are on battery.

If you don't like this behaviour and want to get the old one, put the min of the values of _BCL in the first entry and the max in the second.

#37
macq

macq

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 126 posts

I've finish to followed ACPI specification:
Attached File  ACPI_BCL.png   183.73KB   162 downloads

When the driver initialize, it get the current brightness and look if the AC adapter is plugged.
If the PC is on AC, it took the max between the current value and the first entry in _BCL
If the PC is on Battery, it took the min between the current value and the second entry in _BCL.

So if you wants to change the behaviour for your laptop, edit in your DSDT the package returned by _BCL:
First entry : a minimum value if you are on AC (didn't need to save power)
Second entry : a max auto value if you are on battery.

If you don't like this behaviour and want to get the old one, put the min of the values of _BCL in the first entry and the max in the second.


ok thanks for the explanation,just to make sure if I set my bcl return package values(first value =min and second=max) then the newer kext will give me same results as before.

Another thing ,can we set the min value to 0,or we should set it at the next min value above zero,as at times the screen goes black completely while booting and hence completely unusable.

#38
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

ok thanks for the explanation,just to make sure if I set my bcl return package values(first value =min and second=max) then the newer kext will give me same results as before.

Another thing ,can we set the min value to 0,or we should set it at the next min value above zero,as at times the screen goes black completely while booting and hence completely unusable.


Some buggy DSDT didn't return the current backlight value on the first call (_BQC), so I've added a work around returning the first BCL package value instead (but I don't know if this code works). This could have side effect here.

Best is to make some tests.

#39
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 252 posts
  • Gender:Male
  • Location:CHN

Some buggy DSDT didn't return the current backlight value on the first call (_BQC), so I've added a work around returning the first BCL package value instead (but I don't know if this code works). This could have side effect here.

Best is to make some tests.


Hi hotKoffy, I download the v1.1 backlight driver, and works well around. But the problem as describe before, I have ten steps of brightness control, and use the slider to adjust the level to 9, close the display preference. When i reopen it, it jump to max level, the IO also shows nine. Here is my brightness control code and some screenshots:
Method (_BCL, 0, NotSerialized)
					{
						Return (Package (0x0D)
						{
							0x5A, 
							0x28, 
							Zero, 
							0x0A, 
							0x14, 
							0x1E, 
							0x28, 
							0x32, 
							0x3C, 
							0x46, 
							0x50, 
							0x5A, 
							0x64
						})
					}
					Method (_BCM, 1, NotSerialized)
					{
						Divide (Arg0, 0x0A, Local0, Local1)
						Store (Local1, ^^^LPCB.EC.BRTS)
					}
					Method (_BQC, 0, NotSerialized)
					{
						Multiply (^^^LPCB.EC.BRTS, 0x0A, Local0)
						Return (Local0)
					}
Attached File  Screen_shot_2011_10_08_at_10.28.00_AM.png   55.48KB   77 downloads
Attached File  Screen_shot_2011_10_08_at_10.28.42_AM.png   146.33KB   101 downloads

At first, I think my laptop model cause this happen, but when i change to other models without good luck. Any ideas ?

#40
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

Hi hotKoffy, I download the v1.1 backlight driver, and works well around. But the problem as describe before, I have ten steps of brightness control, and use the slider to adjust the level to 9, close the display preference. When i reopen it, it jump to max level, the IO also shows nine. Here is my brightness control code and some screenshots:

Method (_BCL, 0, NotSerialized)
					 {
						 Return (Package (0x0D)
						 {
							 0x5A, 
							 0x28, 
							 Zero, 
							 0x0A, 
							 0x14, 
							 0x1E, 
							 0x28, 
							 0x32, 
							 0x3C, 
							 0x46, 
							 0x50, 
							 0x5A, 
							 0x64
						 })
					 }
					 Method (_BCM, 1, NotSerialized)
					 {
						 Divide (Arg0, 0x0A, Local0, Local1)
						 Store (Local1, ^^^LPCB.EC.BRTS)
					 }
					 Method (_BQC, 0, NotSerialized)
					 {
						 Multiply (^^^LPCB.EC.BRTS, 0x0A, Local0)
						 Return (Local0)
					 }
Attached File  Screen_shot_2011_10_08_at_10.28.00_AM.png   55.48KB   77 downloads
Attached File  Screen_shot_2011_10_08_at_10.28.42_AM.png   146.33KB   101 downloads

At first, I think my laptop model cause this happen, but when i change to other models without good luck. Any ideas ?


Seems that your DSDT returns the index in _BCL instead of the value itself. I've see some checks about this in Linux drivers but I've not coded this (this is a DSDT bug).
try this:

Method (_BCM, 1, NotSerialized)
{
Store (Arg0, ^^^LPCB.EC.BRTS)
}
Method (_BQC, 0, NotSerialized)
{
Return (^^^LPCB.EC.BRTS)
}

You can also extend the table between Zero and 0x64 (100% of PWM), it will gives smooth transitions during brightness level change.





1 user(s) are reading this topic

0 members, 0 guests, 1 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy