Jump to content

ACPI Backlight Driver


hotKoffy
 Share

224 posts in this topic

Recommended Posts

EDIT: This is of course with RehabMan's method, not the original one.

My DSDT patches for brightness are only for laptops with Intel graphics hardware (standalone or switched dual-GPU).

 

From your signature, you only have nvidia.

Link to comment
Share on other sites

My DSDT patches for brightness are only for laptops with Intel graphics hardware (standalone or switched dual-GPU).

 

From your signature, you only have nvidia.

 

Sorry about the signature, that is my other system, a desktop - I haven't updated my signature for this project. I'll get on that right now.

 

I'm working on an Asus G73SW, which has a GTX 460m and an i7 2630QM.

Link to comment
Share on other sites

Sorry about the signature, that is my other system, a desktop - I haven't updated my signature for this project. I'll get on that right now.

 

I'm working on an Asus G73SW, which has a GTX 460m and an i7 2630QM.

You should post your native DSDT and all native OEM SSDTs if you need help.

Link to comment
Share on other sites

Link to comment
Share on other sites

No -- the SSDT you posted is one you generated (not OEM).

 

You need to extract native SSDTs from Linux (there will be many). They are at /sys/firmware/acpi/tables and /sys/firmware/acpi/tables/dynamic.

Link to comment
Share on other sites

No -- the SSDT you posted is one you generated (not OEM).

 

You need to extract native SSDTs from Linux (there will be many). They are at /sys/firmware/acpi/tables and /sys/firmware/acpi/tables/dynamic.

 

 

Hey,

if you're on Clover, just hit F4 while on Clover GUI, you'll find the dumps in Clover > ACPI > Original, select the needed files and send them here (do not send all files!)

 

Whoops - my apologies, this is brand new to me!  :wacko:

 

I used AIDA64 to extract the DSDT/SSDT in Windows (I don't have a Linux partition) and ended up with a DSDT and 2 SSDTs... I hope this is right. https://drive.google.com/file/d/0B7cWRyrtHaFeZWlfbmJHb25RVzA/view?usp=sharing

Link to comment
Share on other sites

Whoops - my apologies, this is brand new to me!  :wacko:

 

I used AIDA64 to extract the DSDT/SSDT in Windows (I don't have a Linux partition) and ended up with a DSDT and 2 SSDTs... I hope this is right. https://drive.google.com/file/d/0B7cWRyrtHaFeZWlfbmJHb25RVzA/view?usp=sharing

Incomplete. Use Clover F4 or Linux.

Link to comment
Share on other sites

Okay, here's the files from .../tables/ and .../tables/dynamic/ from Ubuntu. https://drive.google.com/file/d/0B7cWRyrtHaFedWZvdTczSk1OOWs/view?usp=sharing

There is no intel gfx device defined in any of those files.

 

Post ioreg. Please use IORegistryExplorer v2.1.

 

Also, run 'lspci -nn' in Linux Terminal and post the output here.

Link to comment
Share on other sites

There is no intel gfx device defined in any of those files.

 

Post ioreg. Please use IORegistryExplorer v2.1.

 

Also, run 'lspci -nn' in Linux Terminal and post the output here.

 

IOReg: https://drive.google.com/file/d/0B7cWRyrtHaFeUV9PQ2RYc0dLYWc/view?usp=sharing

 

Terminal: https://drive.google.com/file/d/0B7cWRyrtHaFeZHZsX2J2RF9VX0E/view?usp=sharing

Link to comment
Share on other sites

hmm, looks like you have a NVIDIA, no intel hd tho! and somehow, PNFL is applied/loaded!

And the terminal  output points that out too!

 

Well, that is strange... My CPU is supposed to have an HD3000, but maybe it's disabled for this laptop because I also have discreet graphics? Does this mean that there is no way to adjust the screen backlight? 

Link to comment
Share on other sites

if you have such thing in bios, you may use IntelHD (but slow performances) and have this PNLF patch, else, you may have to stick to your NVDA, which is nice. what's the problem anyway, is it too dim or too bright or just can't control brightness?

Hey I found something, in clover (if you're using it) add the new_way and the addpnlf patch to ACPI, it may work, or not, just try :)

Link to comment
Share on other sites

if you have such thing in bios, you may use IntelHD (but slow performances) and have this PNLF patch, else, you may have to stick to your NVDA, which is nice. what's the problem anyway, is it too dim or too bright or just can't control brightness?

Hey I found something, in clover (if you're using it) add the new_way and the addpnlf patch to ACPI, it may work, or not, just try :)

 

I don't think there's any option in my BIOS to switch to integrated graphics, unfortunately. I think I'm stuck with my 460m as far as that's concerned. 

 

The problem is that I can't adjust it - when I boot the laptop up, the brightness is a bit dim, maybe 1/3 brightness. If I put the laptop to sleep and then wake it up, it jumps up to what looks like 100% brightness. In both cases, I can't adjust the brightness - if I install RehabMan's kext, the brightness bar does appear in settings, and it does work with my keyboard hotkeys, but it doesn't actually change the brightness. 

 

Unfortunately, I think I'm stuck with Chameleon. I've spent a lot of time trying to get Clover working on this notebook - I've tried many times many different ways, and no matter what I get some problem (usually an ACPI-related KP, but sometimes a black screen). Chameleon seems to be the only bootloader I can get to work, so I've gone with that for now. 

Link to comment
Share on other sites

I don't think there's any option in my BIOS to switch to integrated graphics, unfortunately. I think I'm stuck with my 460m as far as that's concerned. 

 

The problem is that I can't adjust it - when I boot the laptop up, the brightness is a bit dim, maybe 1/3 brightness. If I put the laptop to sleep and then wake it up, it jumps up to what looks like 100% brightness. In both cases, I can't adjust the brightness - if I install RehabMan's kext, the brightness bar does appear in settings, and it does work with my keyboard hotkeys, but it doesn't actually change the brightness. 

 

Unfortunately, I think I'm stuck with Chameleon. I've spent a lot of time trying to get Clover working on this notebook - I've tried many times many different ways, and no matter what I get some problem (usually an ACPI-related KP, but sometimes a black screen). Chameleon seems to be the only bootloader I can get to work, so I've gone with that for now.

If your native APCI brightness methods work, you may be able to use the normal PNLF patch ("Brightness Fix" in my repo).

 

But yes... lesson learned here. You absolutely must know your hardware before attempting any hackintosh task.

Link to comment
Share on other sites

If your native APCI brightness methods work, you may be able to use the normal PNLF patch ("Brightness Fix" in my repo).

 

But yes... lesson learned here. You absolutely must know your hardware before attempting any hackintosh task.

 

Absolutely - after some research it appears Asus disabled the IGPU in this particular model for some reason, which is mildly frustrating.

 

However, I was able to my backlight working perfectly with an alternate method, though I won't post that here to respect the solutions in this thread. 

 

Thanks for all of the help, RehabMan and midi!  :)

Link to comment
Share on other sites

  • 2 months later...

Guys is this work on Desktop? I read all pages but I don't get it anything? if works HOW?

 

I just add ACPIBacklight.kext (from RehabMan) and restart machine nothing happened.

 

My system is Clover and graphic card is MSI NVIDIA GTX 660.

Link to comment
Share on other sites

Guys is this work on Desktop? I read all pages but I don't get it anything? if works HOW?

 

I just add ACPIBacklight.kext (from RehabMan) and restart machine nothing happened.

 

My system is Clover and graphic card is MSI NVIDIA GTX 660.

Generally, only built-in displays have backlight control on-board. External displays have their own backlight control via buttons on the bezel.

  • Like 1
Link to comment
Share on other sites

Hey Guys!

 

I made a hackintosh with my laptop, a LG A410-K.BE47P1(5300) below yours main configurations:

 

Intel® Core™ i5 - 480M (2,66GHz, Cache 3MB) First Generation

8GB (2X4GB) DDR3 1333MHz

Mobile Intel® HM55

14" LCD HD (1366x768) illuminated by LED

NVIDIA® GeForce® G310M (512MB dedicated memory)

HD 500GB Sata2

 


 

So, I install OS X Yosemite 10.10 and I use chameleon v2.3svn r2510 for boot. Everything is working well apparently, a few problems which I have been trying to fix. They are:

Bluetooth - does not work

Webcam - does not work

Backlight - does not work

Battery - It's working strangely.

 

In that post I would like to help fixing my backlight, already follow some tutorials, but I still did not get success. I have used the kext of RehabMan and hotKoffy.

 

Attached hereto as my DSDT is currently.

 

Thank U

 

DSDT.aml.zip

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hello everyone,
 
i just wanted to share my experience and solution for Intel GMA950 (Notebook: Lenovo Thinkpad R60).
Although I'm talking about Hardware that is quite old now (TP R60 is from 2007), the information may help some others.
 
First of all my system specs:
Lenovo Thinkpad R60
Core 2 Duo T5500 @1,66 Ghz
4 GB RAM (3 usable due to chipset limit)
Intel GMA950 w. 64 MB VRAM
1400x1050 Panel
Mac OS X Lion 10.7.3
GMA950 kext plist-patched (27A2) & Intel Framebuffer kext older Version (7.0.45)
 
I didn't have problems with backlight after sleep (was working).
Brightness slider & scroll lock / pause keys were also working properly (with a simple device pelf) inside the DSDT.
The only problem was the brightness control not working properly after sleep (display much too bright, fn-keys working, but brightness only 4 steps after sleep and these steps too small).
 
After trying a lot with dsdt and _bcm _bcl _bqc methods, i simply searched the web for the backlight register of the gma950.
Success: the register is at offset 0x00061254
To write to the register, you have to find your VGA's BAR0:
lspci -vv -> look for "Region 0"
"Region 0" in my case: 0xEE100000
Take Calculator (Hex-Mode), add 0x00061254 + 0xEE100000: voila, our address to write is 0xEE161254.
This address is NOT accessible in PCI-Memory, it must be accessed per physical memory.
 
And now the interesting thing:
Like i said, after sleep the brightness was always too high & couldn't be controlled anymore.
Solution:
Take reggie_se as root and write some value to the address:
sudo /usr/bin/reggie_se -D PhysAddr -w 0x59be266c -a 0xEE161254 -B 32
And now: the brightness slider is working again! Working correctly, like on a fresh boot :-)

To get the correct values use the brightness slider and after every step do:

sudo /usr/bin/reggie_se -D PhysAddr -r -a 0xEE161254 -B 32

Or run Reggie SE.app and watch the register there (to see the PCI-Tab in Reggie SE i had to start it with sudo from the command line)
 
So this shows that somehow OS X (on standby) loses the correct table of values (defined in method _bcl) and is writing wrong value to the register.

If you correct that with the reggie_se command, the system gains control back.
 
Btw: i have method _wak with a write to the register (store 0x59be266c LEVL) - but it doesn't work.

I guess the method _wak isn't executed or fails on another reason.
The same write from dsdt works on boot (i put it in method _ini inside device PCI0).
 
So i decided do just put the reggie_se command in a shell script & execute it on wakeup (sleepwatcher: .wakeup file).
This brings the brightness control back working.

 

To restore to the same value as before sleep, i let my script write the current value to a file (/tmp/blvalue) and after sleep i read this value and write back to the register.

 

I do NOT use ACPIBacklight.kext, it isn't necessary on my system.

 

Hope this helps someone.

 

Karlito

Link to comment
Share on other sites

  • 3 months later...

And again some Information for a - meanwhile - legacy notebook:

I got brightness control working on a DELL Inspiron 6400 (E1505):

 

DSDT:

Edit your PNLF Device as described in the first post.

Then you have to change the variable "WLG" from "Windows 2006" to "Darwin":

 

Orig Value:   Name (WLG, "Windows 2006")

New Value:     Name (WLG, "Darwin")

 

Do NOT use "WXP" in this case, it won't work!

If you search Google, you will find a lot of recommendations to use "Windows 2001" for OS X, as the ACPI-behaviour seems to be almost identical.

In case of the Inspiron 6400, this route is the wrong one.

 

After changing the value to "Darwin", the brightness control started to work.

About 10 brightness-levels, sun-bezel is properly shown.

Even better:

Brightness value is properly restored after reboot / standby.

 

I also tried without the ACPIBacklight.kext, but this doesn't work.

You need both the "Darwin"-entry AND ACPIBacklight.kext in /S/L/E.

 

Don't forget to fix permissions and rebuild caches after installing the kext:

sudo chown -R root:wheel /System/Library/Extensions

sudo chmod -R 755 /System/Library/Extensions

sudo touch /System/Library/Extensions (rebuilds the cache)

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Hello every one

I want to share my experience with my sony VAIO AW

It ha only one discrete graphics NVIDIA

My laptop does not have any of BQC BCM ... methods

so I think it is controlled by sony SNC, also there is no sony brightness method in there,

It was strange

Next possibility Is controlled by Nvidia, but pwm-info in DSDT only help in show Brightness Slider but no actual brightness change

I saw there is only one method in PEGP.NGFX called NVIF 

 Method (NVIF, 3, NotSerialized)
                    {
                        DBGC (0x66, Arg0, BCEN)
                        Acquire (NVLK, 0xFFFF)
                        If (LEqual (Arg0, One))
                        {
                            Concatenate (ERR0, VER1, Local0)
                            Release (NVLK)
                            Return (Local0)
                        }
                        Else
                        {
                            If (LEqual (Arg0, 0x09))
                            {
                                Name (T_0, Zero)
                                Store (ToInteger (Arg1), T_0)
                                If (LEqual (T_0, Zero))
                                {
                                    Release (NVLK)
                                    Return (ERR0)
                                }
                                Else
                                {
                                    If (LEqual (T_0, One))
                                    {
                                        If (LEqual (LPID, 0x03))
                                        {
                                            Concatenate (ERR0, BHW3, Local1)
                                        }
                                        Else
                                        {
                                            Concatenate (ERR0, BHW1, Local1)
                                        }

                                        Release (NVLK)
                                        Return (Local1)
                                    }
                                    Else
                                    {
                                        If (LEqual (T_0, 0x02))
                                        {
                                            If (LEqual (LPID, 0x03))
                                            {
                                                Store (DerefOf (Index (Arg2, Zero)), Local0)
                                                Subtract (Local0, 0x04, Local0)
                                                Store (Divide (Local0, 0x0C, ), Local1)
                                                If (LLess (Local1, 0x09))
                                                {
                                                    Store (Local1, SSBR)
                                                    PHSB (0xE6, Local1)
                                                    Sleep (0x14)
                                                    Return (ERR0)
                                                }
                                            }

                                            Release (NVLK)
                                            Return (ERR0)
                                        }
                                        Else
                                        {
                                            If (LEqual (T_0, 0x03))
                                            {
                                                If (LEqual (LPID, 0x03))
                                                {
                                                    Concatenate (ERR0, BCL3, Local1)
                                                }
                                                Else
                                                {
                                                    If (LEqual (LPID, 0x02))
                                                    {
                                                        Concatenate (ERR0, BCL2, Local1)
                                                    }
                                                    Else
                                                    {
                                                        Concatenate (ERR0, BCL1, Local1)
                                                    }
                                                }

                                                Release (NVLK)
                                                Return (Local1)
                                            }
                                            Else
                                            {
                                                Release (NVLK)
                                                Return (UNSP)
                                            }
                                        }
                                    }
                                }
                            }
                            Else
                            {
                                If (LEqual (Arg0, 0x0B))
                                {
                                    If (LEqual (Arg1, One))
                                    {
                                        Concatenate (ERR0, ODID, Local0)
                                        Release (NVLK)
                                        Return (Local0)
                                    }
                                    Else
                                    {
                                        Release (NVLK)
                                        Return (UNSP)
                                    }
                                }
                            }
                        }

                        Release (NVLK)
                        Return (UNSP)
                    }
                }

so I suspect that this method which was called by NVidia Driver should work with my situation

I deep into code and find in one case (9,2, Value) get into somewhat setting brightness

  Store (DerefOf (Index (Arg2, Zero)), Local0)
                                                Subtract (Local0, 0x04, Local0)
                                                Store (Divide (Local0, 0x0C, ), Local1)
                                                If (LLess (Local1, 0x09))
                                                {
                                                    Store (Local1, SSBR)
                                                    PHSB (0xE6, Local1)
                                                    Sleep (0x14)
                                                    Return (ERR0)
                                                }

and next if parmaeter are somewhat( 9,3,v) return Brightness array

the register Brightness SSBR found,

SSBR= (x-4)/ 11 and SSBR can take value (0-8)

so I run into code and create MY BCM BCL methods for my laptop 

and my final PNLF device is 

        Device (PNLF)
        {
            Name (_HID, EisaId ("APP0002"))
            Name (_CID, "backlight")
            Name (_UID, 0x0A)
            Name (_STA, 0x0B)
            Method (_DOS, 1, NotSerialized)
            {
            }

            Method (_BCL, 0, NotSerialized)
            {
                Return (Package (0x0B)
                {
                    0x64, 
                    0x64, 
                    0x04, 
                    0x10, 
                    0x1C, 
                    0x28, 
                    0x34, 
                    0x40, 
                    0x4C, 
                    0x58, 
                    0x64
                })
            }


            Method (_BCM, 1, NotSerialized)
            {
                Store (ToInteger (Arg0), Local0)
                Subtract (Local0, 0x04, Local0)
                Store (Divide (Local0, 0x0C, ), Local1)
                If (LLess (Local1, 0x09))
                {
                    Store (Local1, SSBR)
                    PHSB (0xE6, Local1)
                    Sleep (0x14)
                }
            }

            Method (_BQC, 0, NotSerialized)
            {
                Return (BRTL)
}}

          

and WHOAAAAA :thumbsup_anim:  my brightness fully worked! 

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Anyone knows how to implement alish's solution described above for my VAIO FZ which share the same "setting"?

Link to comment
Share on other sites

 Share

×
×
  • Create New...