Contribute
Register

a few remaining issues/clarifications to solve on L440

Status
Not open for further replies.
@RehabMan sorry for bothering you again with same question, but lets take an example the Lenovo ThinkPad T440 ACPI-DSDT:
Code:
 Offset (0x78),
                        TMP0,   8,
                        Offset (0x80),
                        Offset (0x81),
                        HIID,   8,
                        Offset (0x83),
                        HFNI,   8,
                        HSPD,   16,
                        Offset (0x88),
                        TSL0,   7,
                        TSR0,   1,
                        TSL1,   7,
                        TSR1,   1,
                        TSL2,   7,
                        TSR2,   1,
                        TSL3,   7,
                        TSR3,   1,
                        Offset (0x8D),
HSPD, 16 is the Offset that reads FAN RPM on Lenovo ThinkPad T440/T440S/T440P/X240 etc.
I did try to search on DSDT for HSPD if i can find it somewhere else but i couldn't find.

My question is, since this/these laptops have exactly same FAN&/Heatsink, is it possible to debug/dump the code of HSPD, 16 ?
Is ACPiDebug.kext capable of extracting data from an offset ?
If it is so, i have no need to read the Fan RPM physically as it's the same exact hardware as mine,i can just dump the formula if that is possible and add it on my SSDT-FAN and done.

It's strange that not a single app does display Fan Speed on this laptop, is it even possible that they didn't implement Fan RPM at all ?

On my L440 ACPI the only thing related that i was able to find is:
Code:
Offset (0x51), 
                        HFNE,   1, 
                        SNLK,   1, 
                            ,   1, 
                        HWFN,   1, 
                        FNKC,   1, 
                        NULS,   1, 
                            ,   1, 
                        HMDN,   1, 
                        DCWL,   1, 
                        DCBD,   1, 
                        DCWW,   1, 
                            ,   4, 
                        OVRQ,   1, 
                        HFNS,   2, 
                        Offset (0x58), 
                        PWML,   8, 
                        PWMH,   8,
Is it possible that the formula is held on another offset like these above HFNE,HWFN,FNKC,HFNS ?

Normally with RW-Everything i managed to find which offset changes with Fan Speed while experimenting on Notebook Fan Control but as you said its a 8-bit value which is small to hold the calculation formula.
Offset (0x95) FSP1, 8, = is the one that i found on RW-Everything
Code:
                        Offset (0x74), 
                        Offset (0x76), 
                        HLCL,   8, 
                        Offset (0x78), 
                        Offset (0x79), 
                        Offset (0x80), 
                        Offset (0x81), 
                        Offset (0x82), 
                        Offset (0x83), 
                        Offset (0x84), 
                        Offset (0x86), 
                        Offset (0x88), 
                        HB0S,   7, 
                        HB0A,   1, 
                            ,   7, 
                        Offset (0x8A), 
                            ,   7, 
                        Offset (0x8B), 
                            ,   7, 
                        Offset (0x8C), 
                        DBG0,   8, 
                        DBG1,   8, 
                        Offset (0x92), 
                            ,   3, 
                        KTAF,   1, 
                        Offset (0x95), 
                        FSP1,   8, 
                        Offset (0xA8), 
                        TMP0,   8, 
                        Offset (0xB0), 
                        Offset (0xB4), 
                        Offset (0xB8), 
                        Offset (0xB9), 
                        Offset (0xBA), 
                        Offset (0xBE), 
                        HSUN,   4, 
                        Offset (0xBF), 
                            ,   3, 
                        HSPA,   1, 
                        Offset (0xC0), 
                        MMUT,   1, 
                        Offset (0xC1),

Here i attached my origin folder, maybe you can give me some hints/clues on what to try or do.
 

Attachments

  • origin.zip
    44.9 KB · Views: 49
Last edited:
@RehabMan sorry for bothering you again with same question, but lets take an example the Lenovo ThinkPad T440 ACPI-DSDT:
Code:
 Offset (0x78),
                        TMP0,   8,
                        Offset (0x80),
                        Offset (0x81),
                        HIID,   8,
                        Offset (0x83),
                        HFNI,   8,
                        HSPD,   16,
                        Offset (0x88),
                        TSL0,   7,
                        TSR0,   1,
                        TSL1,   7,
                        TSR1,   1,
                        TSL2,   7,
                        TSR2,   1,
                        TSL3,   7,
                        TSR3,   1,
                        Offset (0x8D),
HSPD, 16 is the Offset that reads FAN RPM on Lenovo ThinkPad T440/T440S/T440P/X240 etc.
I did try to search on DSDT for HSPD if i can find it somewhere else but i couldn't find.

My question is, since this/these laptops have exactly same FAN&/Heatsink, is it possible to debug/dump the code of HSPD, 16 ?

You can add an HSPD at offset 0x84 in your own DSDT in order to access the data at that offset.

It's strange that not a single app does display Fan Speed on this laptop, is it even possible that they didn't implement Fan RPM at all ?

It is quite possible that fan speed is not directly available.
It would not surprise me in the least.

Is it possible that the formula is held on another offset like these above HFNE,HWFN,FNKC,HFNS ?

It could be anywhere.

Normally with RW-Everything i managed to find which offset changes with Fan Speed while experimenting on Notebook Fan Control but as you said its a 8-bit value which is small to hold the calculation formula.

Fan speed can likely be derived by what you place in the registers that control fan speed.
 
@RehabMan i was doing some testing with audio on my laptop and for some reasons the audio icon on menu was staying gray all the time “audio kext -injector not loading”.
So i tried to run:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
Rebooted, but now can’t boot the laptop.
The bar at apple logocharges to max but stops there and doesn’t boot.
Any tip into that issue ?
Tried with fake gpu id,safe mode, none of these options work.
 
@RehabMan i was doing some testing with audio on my laptop and for some reasons the audio icon on menu was staying gray all the time “audio kext -injector not loading”.
So i tried to run:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
Rebooted, but now can’t boot the laptop.
The bar at apple logocharges to max but stops there and doesn’t boot.
Any tip into that issue ?
Tried with fake gpu id,safe mode, none of these options work.

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Nvm, solved the issue by booting single user mode and rebuilding caches with:
Code:
sudo kextcache -i /

It is the best way if kernel cache is damaged or incorrectly created.
 
@RehabMan since HandOff feature seems to be less reliable on High Sierra, i was curious to check and i did a dump of the Bluetooth firmware from Windows, extracted and followed all the steps as explained on your Repo.
I noticed that version is same from the one available from your repo but the hex code inside is slightly different.

I keep trying to build from source but i just can't, it is showing me some errors and i cant manage to solve the problem.
(Beginner Xcode user here).

my Bluetooth Device is 0a5c_216f.

i replaced my firmware there, did the changes on BrcmFirmwareInjector_0a5c_216f.kext & BrcmFirmwareInjector2_0a5c_216f.kext

The only problem is that i have trouble building it.
So the zip is your cloned repo and just replaced the firmware and kexts above, nothing else touched.

I would appreciate if you can spare a minute to build the kext & upload it here.

also uploaded the dump from Windows in case you need a quick look.
 

Attachments

  • OS-X-BrcmPatchRAM-Sniki.zip
    8.5 MB · Views: 79
  • Firmware Dump from Windows 10.zip
    108.6 KB · Views: 65
@RehabMan since HandOff feature seems to be less reliable on High Sierra, i was curious to check and i did a dump of the Bluetooth firmware from Windows, extracted and followed all the steps as explained on your Repo.
I noticed that version is same from the one available from your repo but the hex code inside is slightly different.

I keep trying to build from source but i just can't, it is showing me some errors and i cant manage to solve the problem.
(Beginner Xcode user here).

my Bluetooth Device is 0a5c_216f.

i replaced my firmware there, did the changes on BrcmFirmwareInjector_0a5c_216f.kext & BrcmFirmwareInjector2_0a5c_216f.kext

The only problem is that i have trouble building it.
So the zip is your cloned repo and just replaced the firmware and kexts above, nothing else touched.

I would appreciate if you can spare a minute to build the kext & upload it here.

also uploaded the dump from Windows in case you need a quick look.

If you want to test Windows BT firmware, just do warm boot after running Windows (eg. restart from Windows). BrcmPatchRAM will not load firmware if is already present, so you end up running with the Windows firmware.

You would need to provide more details on your issue building the kext, as "some errors" is simply not enough information to provide any advice.
 
If you want to test Windows BT firmware, just do warm boot after running Windows (eg. restart from Windows). BrcmPatchRAM will not load firmware if is already present, so you end up running with the Windows firmware.

You would need to provide more details on your issue building the kext, as "some errors" is simply not enough information to provide any advice.
I have only macOS High Sierra 10.3.3 Installed.
But i might test that out and see if it makes a difference.

My problem is that it reports something like sdk 10.11 not found and something related to USBDeviceShim.h if im correct.
Will provide screenshots tomorrow as its 1:26 am here.
 
My problem is that it reports something like sdk 10.11 not found and something related to USBDeviceShim.h if im correct.

The current official kexts are built with SDK 10.11 (which you need to obtain from an older Xcode and slipstream into current Xcode).
The SDK can be changed in the project settings if you want to build with a different SDK.
 
Status
Not open for further replies.
Back
Top