Contribute
Register

Apple Backlight Injector Brightness not saved

Status
Not open for further replies.
Also, using the setting "Slightly dim the display while on battery power" setting causes the brightness to reload with a maximum of 50%. In other words, if you restart on AC power at a certain brightness >50%, that will stick. However, on battery power, it will get reset to 50% (settings less than 50% will persist, however). Disabling this setting in "Energy Saver" causes the battery brightness to behave just like AC power brightness. I'm fairly confident that this is how it is supposed to work normally. :)

Brightness was saved as expected (no 50% limit) on my Apple MacBookAir6,2.
So probably something is still not right.

I suspect it has to do with the writes that the system may be doing to the SMC keys not being persisted in the hack case. There was some experimental code added to FakeSMC at a certain point that would save SMC keys to nvram, but I'm not sure if that is still enabled, or even if it works properly.

I just found something weird: Brightness is also only saved, given my suggestions, if "automatically adjust brightness" is enabled. (At least on battery.) The "half-brightness" thing I mentioned also only works if this same setting is enabled.

At least we have a setting/setup that results in acceptable behavior...
 
Are you a wizard RehabMan? It works like a charm. Thank you.
 
Are you a wizard RehabMan? It works like a charm. Thank you.

Credit to KNNSpeed for finding that thread on the FakeSMC keys/ALS interactions related to this...
I just cleaned it up a bit to make it a generic solution.
 
I found this for more information on what the "5 keys" do.

https://app.assembla.com/wiki/show/fakesmc

Looks like it's just ALS config information. My guess is that Apple Laptops use the ALS pretty much exclusively when "automatically adjust brightness" is turned on, so the Fake ALS + keys just means that we're hijacking the ALS to do brightness saving for us. So as for why it doesn't work when the ALS is turned off (unchecked "automatically adjust brightness"), that seems to be something going weird somewhere.
 
Hi RehabMan,

I have successfully installed Sierra on 2 laptops, a Dell E7450 and a Dell E5570. All is working sound, wifi, bluetooth, but I have the same problem on both, can't get the backlight level saved..
I have read a lot of posts on the forum an tried a lot of things an I can say I am lost ..
Is someone has a working configuration for this 2 laptops or can help me.

Many thanks by advance
 
How do I get this to work on the Dell XPS 15 9550? I currently have the configuration that wmchris provides.
 
Hi RehabMan,

I have successfully installed Sierra on 2 laptops, a Dell E7450 and a Dell E5570. All is working sound, wifi, bluetooth, but I have the same problem on both, can't get the backlight level saved..
I have read a lot of posts on the forum an tried a lot of things an I can say I am lost ..
Is someone has a working configuration for this 2 laptops or can help me.

Many thanks by advance

How do I get this to work on the Dell XPS 15 9550? I currently have the configuration that wmchris provides.

as per rules, please update your hardware profile

also read up on "problem reporting" and then upload your files
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
T
Based on this..., although I can't reproduce the problem on my systems, I wanted to see if there was a way to make a generic ALS, and if FakeSMC.kext with those extra keys was a problem on other computers...

So I added the keys... this is the diff (it was a little unclear which keys you were adding, but this is what I gathered by reading between the lines):

Code:
SPEEDY-NUC:kozlek.git rehabman$ git diff
diff --git a/FakeSMC/FakeSMC-Info.plist b/FakeSMC/FakeSMC-Info.plist
index 3ebd61cd..8d2bf9e8 100755
--- a/FakeSMC/FakeSMC-Info.plist
+++ b/FakeSMC/FakeSMC-Info.plist
@@ -151,6 +151,31 @@
                                                <string>si8</string>
                                                <data>BQ==</data>
                                        </array>
+                                       <key>RMde</key>
+                                       <array>
+                                               <string>char</string>
+                                               <data>QQ==</data>
+                                       </array>
+                                       <key>ALV0</key>
+                                       <array>
+                                               <string>{alv</string>
+                                               <data>ARAGdQEgALYO4A==</data>
+                                       </array>
+                                       <key>ALRV</key>
+                                       <array>
+                                               <string>ui16</string>
+                                               <data>AAE=</data>
+                                       </array>
+                                       <key>ALI0</key>
+                                       <array>
+                                               <string>{ali</string>
+                                               <data>BwECAA==</data>
+                                       </array>
+                                       <key>MSLD</key>
+                                       <array>
+                                               <string>ui8 </string>
+                                               <data>AA==</data>
+                                       </array>
                                </dict>
                                <key>Types</key>
                                <dict>

The FakeSMC.kext with this change is attached.
I didn't have any issue with the updated FakeSMC.kext (without SSDT-ALS0.aml) on a desktop, nor one one of my laptops.

So..., then I move on to enabling a Fake ALS that is generic...

I did a little reading on ALS in the ACPI spec... and decided to create a minimal SSDT-ALS0.dsl to serve as a generic, never changing, fake ALS:
Code:
// Fake ambient light sensor device
DefinitionBlock("", "SSDT", 2, "hack", "ALS0", 0)
{
    Device(_SB.ALS0)
    {
        Name(_HID, "ACPI0008")
        Name(_CID, "smc-als")
        Name(_ALI, 300)
        Name(_ALR, Package()
        {
            //Package() { 70, 0 },
            //Package() { 73, 10 },
            //Package() { 85, 80 },
            Package() { 100, 300 },
            //Package() { 150, 1000 },
        })
    }
}
//EOF

As you can see, the version above always returns 300 for the _ALI and only has one mapping in _ALR: a neutral mapping (100) for 300 lux)
I actually tested both ways with the other items in the list, and without...
Both same result...
This does get me the "Automatically adjust brightness" checkbox in SysPrefs->Displays, so maybe it is also adequate to fix the brightness restore (and relies on no specifics of any particular native ACPI).

The pre-built SSDT-ALS0.aml is also attached.

Please test.
Thank you. It worked for me on two laptops. One Dell 5557 Skylake that has ALSD on DSDT and a VAIO Kaby Lake that does not have ALSD, but also need this to have brightness level saved.
 
Thank you. It worked for me too with the modified FakeSMC and the SSDT-ALS0 on my Skylake Asus Zenbook UX501VW, even though my laptop doesn't have an ambient sensor device.

I thought there was a bug in Clover v4233. I don't have config.plist/SystemParameters/BacklightLevel. But, brightness level was only maintained when I went, at boot time, into Clover Options -> Graphics Injector -> Backlight Level and cleared the 0xFFFF. If I didn't do that, brightness level was reset to full brightness after each reboot. I thought that a bug in Clover was doing that.

Anyway, with the modified FakeSMC and SSDT-ALS0, the two different brightness levels on battery and power adapter are both flawlessly maintained now. Thanks again.
 
@KNNSpeed I am sorry if i am being off-topic here. I am also using Dell XPS 9560 with 4k display. My question is if there is any solution on how to lower the screen below minimum brightness? I am using this laptop at night and the brightness is too high even at its lowest setting. I heard about Dell removing lower 20% brightness settings from this laptop, but i want them back, is there anything i can do please. Currently using windows 10 but ill be installing hackintosh on this thing. Thank you for any tips.
I would message KNNSpeed but it doesnt allow me to start a conversation.
 
Status
Not open for further replies.
Back
Top