Jump to content

Lenovo T530 Clover - Brightness Level resets to max after reboot


9 posts in this topic

Recommended Posts

So I have a great working Lenovo T530 with configs for Clover and OpenCore. I worked really long on them. OpenCore is perfect but I noticed when I switch to Clover for testing things, the brightness always resets to maximum on Reboot and I don't know why. It uses the same SSDT-ALS0 and SSDT-PNLF files for both Clover and OpenCore.

 

If anybody is interested in having a look, here's my Repo with all the files (under Releases) : https://github.com/5T33Z0/Lenovo-T530-Hackinosh-OpenCore

 

Thanks

 

Are there any ACPI Samples included in Clover? The SSDT-PNLF.aml or SSDT-ALS0.aml use in OpenCore doesn't seem to work correctly in Clover. Every time I reboot my Noteboo,k the brightness is reset to 100 % and I don't know why.

Are there any ACPI Samples included in Clover? The SSDT-PNLF.aml or SSDT-ALS0.aml use in OpenCore doesn't seem to work correctly in Clover. Every time I reboot my Noteboo,k the brightness is reset to 100 % and I don't know why.

Do you have working nvram?


Sent from my iPhone using Tapatalk

@SavageAUS Yes, I do. In Open Core everything works perfectly fine.

 

From the Preboot.log

 

Quote

5:937  0:000  found boot-args in NVRAM:applbkl=1 brcmfx-country=#a -gux_defer_usb2, size=44
5:937  0:000  after NVRAM boot-args=applbkl=1 -gux_defer_usb2 brcmfx-country=#a
5:937  0:000  === [ Dump SMC keys from NVRAM ] ================
5:984  0:000  === [ GetEfiBootDeviceFromNvram ] ===============
21:819  0:000  OC: OcLoadNvramSupport...
21:887  0:000  SetNvramVariable (system-id, guid, 0x2, 16): -> writing new (Success)
21:887  0:000  SetNvramVariable (MLB, guid, 0x6, 17): -> writing new (Success)
21:887  0:000  SetNvramVariable (ROM, guid, 0x6, 6): -> writing new (Success)
21:887  0:000  SetNvramVariable (FirmwareFeatures, guid, 0x6, 4): -> writing new (Success)
21:888  0:000  AddNvramVariable (FirmwareFeaturesMask, guid, 0x6, 4): -> writing new (Success)
21:888  0:000  AddNvramVariable (HW_BID, guid, 0x6, 20): -> writing new (Success)
21:889  0:000  AddNvramVariable (security-mode, guid, 0x6, 5): -> writing new (Success)
21:889  0:000  AddNvramVariable (backlight-level, guid, 0x6, 2): -> writing new (Success)
21:889  0:000  DeleteNvramVariable (DefaultBackgroundColor, guid = Not Found):
21:889  0:000  SetNvramVariable (UIScale, guid, 0x6, 1): -> writing new (Success)
21:890  0:000  SetNvramVariable (EFILoginHiDPI, guid, 0x6, 4): -> writing new (Success)
21:890  0:000  SetNvramVariable (flagstate, guid, 0x6, 32): -> writing new (Success)
21:890  0:000  SetNvramVariable (csr-active-config, guid, 0x6, 4): -> writing new (Success)
21:890  0:000  DeleteNvramVariable (bootercfg, guid = Not Found):
21:891  0:000  DeleteNvramVariable (nvda_drv, guid = Not Found):
21:891  0:000  DeleteNvramVariable (recovery-boot-mode, guid = Not Found):
21:891  0:000  AddNvramVariable (wake-failure, guid, 0x6, 5): -> writing new (Success)
21:892  0:000  SetNvramVariable (efi-boot-device-data, guid, 0x7, 110): -> writing new (Success)
21:894  0:000  SetNvramVariable (efi-boot-device, guid, 0x7, 216): -> writing new (Success)
21:897  0:000  DeleteNvramVariable (IOHibernateRTCVariables, guid = Not Found):
21:897  0:000  DeleteNvramVariable (boot-image, guid = Not Found):

 

Edited by 5T33Z0

NVRAM is working. I've verified it. NVRAM Reset is a given.

 

If the problem was related to NVRAM, storing brightness should work after emulating NVRAM, right?. So I added EmuVaribleUefi.efi. Same result. So I conclude it's related to something else. The renames all work, otherwise the brightness shortcut keys wouldn't work either. So, I guess unless somebody takes a look at the EFI we are done here.

8 minutes ago, 5T33Z0 said:

NVRAM is working. I've verified it. NVRAM Reset is a given.

 

If the problem was related to NVRAM, storing brightness should work after emulating NVRAM, right?. So I added EmuVaribleUefi.efi. Same result. So I conclude it's related to something else. The renames all work, otherwise the brightness shortcut keys wouldn't work either. So, I guess unless somebody takes a look at the EFI we are done here.

try adding ALS0.aml

Fair enough. But I think there are a also few things you still need to learn about Dirvers. And  If you don't beleve me, go check Slice's Documentation Thread for Clover - it's all in there.

  • DataHubDXE > Unnecessary. Fully Integrated in Clover since r5129.
  • EmuVariableUefi > Only necesseary in NVRAM is  not available (legacy systems) or working incorrectly. (I tested this already, so that's not it)
  • FSInject.efi > Fully integrated in Clover. Necessary only for legacy versions of macOS ≤ 10.7 (Lion) which are able to load individual kexts instead of prelinkedkernel. So in other words: redundant.

2. Here's an excerpt from the Clover's Preboot.log from in regards to NVRAM (of course it says "OcLoadNvramSupport", since Clover uses OpenRuntime since r5123):

5:941  0:000  after NVRAM boot-args=applbkl=1 -gux_defer_usb2 brcmfx-country=#a
5:941  0:000  === [ Dump SMC keys from NVRAM ] ================
5:984  0:000  === [ GetEfiBootDeviceFromNvram ] ===============
31:316  0:000  OC: OcLoadNvramSupport...
31:384  0:000  SetNvramVariable (system-id, guid, 0x2, 16): -> writing new (Success)
31:384  0:000  SetNvramVariable (MLB, guid, 0x6, 17): -> writing new (Success)
31:384  0:000  SetNvramVariable (ROM, guid, 0x6, 6): -> writing new (Success)
31:384  0:000  SetNvramVariable (FirmwareFeatures, guid, 0x6, 4): -> writing new (Success)
31:385  0:000  AddNvramVariable (FirmwareFeaturesMask, guid, 0x6, 4): -> writing new (Success)
31:385  0:000  AddNvramVariable (HW_BID, guid, 0x6, 20): -> writing new (Success)
31:385  0:000  SetNvramVariable (prev-lang:kbd, guid, 0x6, 7): -> writing new (Success)
31:386  0:000  AddNvramVariable (security-mode, guid, 0x6, 5): -> writing new (Success)
31:386  0:000  AddNvramVariable (backlight-level, guid, 0x6, 2): -> writing new (Success)
31:386  0:000  DeleteNvramVariable (DefaultBackgroundColor, guid = Not Found):
31:386  0:000  SetNvramVariable (UIScale, guid, 0x6, 1): exists(0x7, 1)DeleteNvramVariable (UIScale, guid = Success):
31:388  0:000  SetNvramVariable (EFILoginHiDPI, guid, 0x6, 4): -> writing new (Success)
31:388  0:000  SetNvramVariable (flagstate, guid, 0x6, 32): -> writing new (Success)
31:388  0:000  SetNvramVariable (csr-active-config, guid, 0x6, 4): -> writing new (Success)
31:389  0:000  DeleteNvramVariable (bootercfg, guid = Not Found):
31:389  0:000  DeleteNvramVariable (nvda_drv, guid = Not Found):
31:389  0:000  DeleteNvramVariable (recovery-boot-mode, guid = Not Found):
31:389  0:000  AddNvramVariable (wake-failure, guid, 0x6, 5): -> writing new (Success)
31:390  0:000  SetNvramVariable (efi-boot-device-data, guid, 0x7, 110): -> writing new (Success)
31:392  0:000  SetNvramVariable (efi-boot-device, guid, 0x7, 216): -> writing new (Success)
31:395  0:000  DeleteNvramVariable (IOHibernateRTCVariables, guid = Not Found):
31:395  0:000  DeleteNvramVariable (boot-image, guid = Not Found):

Looks pretty much like working NVRAM to me. But lets try nvram -p as well (excerpt):

security-mode	none
prev-lang:kbd	en-US:0
SystemAudioVolumeDB	%f4
EFILoginHiDPI	%01%00%00%00
backlight-level	%ff%ff
csr-active-config	%ff%07%00%00
SystemAudioVolume	G

If NVRAM wasn't working none of these variables could have been created.

I added SMCLightSensor.kext (which i don't need in OpenCore) and then it worked.

 

@Hervé You know, I took a lot of time and effort here to write Guides that other helped other people to successfully update to the new Clover and save their you know what. This guide along with my OpenCore Update gude alone have about 50.000 hits. These are probably the best and most on-point update guides in the whole realm of hackintoshing. I spent a lot of time developing the workflow and explainations.

 

I'v build my Laptop and PC EFIs from scratch with all SSDTs, no patched DSDT and learnt aml basics along the way and on top of that created repos and translated daliansky's OC Little repo from chines into english along the way…

 

I think I deserve better than being treated like a noob! On that note, I am glad I fixed it…

 

 

×
×
  • Create New...