Contribute
Register

Lenovo V330 - 15ikb

Status
Not open for further replies.
@RehabMan Here are problem reporting files attached with the script.

Problems:
-Touchpad not working:
Tried the Closed source kext, no keyboard, no touchpad, (which I believe is expected since it hasn't been updated for High Sierra.
Installed the VoodooI2C and did the required changes, Pinned the GPIO and IOREG shows no more controllers related stuff on ACPIPlane but still no input

Probably best to get help in the I2C thread.
But the change you made to TPD0._CRS looks wrong.

- HDMI Port working, however when i unplug the monitor cable, the screen stays black on the laptop. Hard reboot to work

Read here regarding display override:
https://www.tonymacx86.com/threads/readme-common-problems-in-10-13-high-sierra.233582/

- Not sure if Power Management is ok, maybe you can check if its ok and point out a issue if theres a problem.

X86PlatformPlugin loaded due to config.plist/ACPI/SSDT/Generate/PluginType=true.

- USB port injector created (will disable the fingerprint reader on it later as theres no support for it) and also injected power properties as described per guide, but you can take a lot a confirm if its ok now.

The only thing strange regarding EC/EC0 is that AppleACPIEC is not loaded against EC0...

- FN Buttons & Brightness keys to be mapped, it should be easy i think (from past experience).
Had no previous experience on new generations so i would be glad if you can take a look overall and point out the problems.

You will find _Q1C and _Q1D are your EC brightness methods.
But such EC callbacks might not work without the EC driver loaded (see note above).
 
Probably best to get help in the I2C thread.
But the change you made to TPD0._CRS looks wrong.
So what is actually the wrong part ?
The only thing strange regarding EC/EC0 is that AppleACPIEC is not loaded against EC0...
If I try to rename EC0 to EC via clover I get panic at boot which I think it shouldn't be done since I have an ECDT, what could the problem be then ?
 
So what is actually the wrong part ?

I think you need to re-read the I2C guide.

If I try to rename EC0 to EC via clover I get panic at boot which I think it shouldn't be done since I have an ECDT, what could the problem be then ?

Yes,... you definitely cannot do EC0->EC rename (well, you might be able to with patched ECDT, but not necessary anyway... SSDT-EC works just fine).

As for why AppleACPIEC is not loading, maybe there are clues in the kernel log.

Also, EC reset might be a good idea.
 
I think you need to re-read the I2C guide.



Yes,... you definitely cannot do EC0->EC rename (well, you might be able to with patched ECDT, but not necessary anyway... SSDT-EC works just fine).

As for why AppleACPIEC is not loading, maybe there are clues in the kernel log.

Also, EC reset might be a good idea.
From what I found from the logs I believe USBX is either not loading or doesn't work and need to inject the other one from the guide ? is that correct ?

EC Reset is painful as laptop only has internal battery, not sure if disabling internal battery for service on bios (which can't turn on unless you plug adapter) would do the same trick as removing it from connector ?

These are the things that I guess might have to do something with it ?:
Code:
2018-04-24 22:41:41.029387+0200 0x425      Default     0x0                  0      0    kernel: (AppleIntelKBLGraphicsFramebuffer) [IGFB][INFO   ] FB0: Panel Fitter modeset
2018-04-24 22:41:41.045907+0200 0x425      Default     0x0                  0      0    kernel: kPEEnableScreen 1

2018-04-24 22:41:36.839428+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839423 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS01 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839470+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839467 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS02 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839530+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839527 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS01 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839579+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839576 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS02 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839777+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839774 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for USR1 of 500 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839832+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839829 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for USR2 of 500 mWWakePower and 0 mWSleepPower

2018-04-24 22:41:36.730204+0200 0x103      Default     0x0                  0      0    kernel: (IOAHCIFamily) [AHCI][PML][00000000]-IOAHCIPortMultiplierGlobals::IOAHCIPortMultiplierGlobals
2018-04-24 22:41:36.731828+0200 0x101      Default     0x0                  0      0    kernel: (AppleIntelLpssI2C) AppleIntelLpssI2C-1::initI2CGpio: no ISOL, validateObject returned 0xe00002bc
2018-04-24 22:41:36.733012+0200 0x10e      Default     0x0                  0      0    kernel: (AppleIntelLpssI2CController) AppleIntelLpssI2CController-1::_notificationPublishedHandler: getChannelNumber failed

2018-04-24 22:41:36.686836+0200 0xe8       Default     0x0                  0      0    kernel: (IOUSBFamily) 000000.686833 AppleUSBLegacyRoot@(null): AppleUSBLegacyRoot::init: enabling legacy matching
2018-04-24 22:41:36.698448+0200 0xb1       Default     0x0                  0      0    kernel: initialize_screen: b=7F80000000, w=00000780, h=00000438, r=00001E00, d=00000001
 
From what I found from the logs I believe USBX is either not loading or doesn't work and need to inject the other one from the guide ? is that correct ?

EC Reset is painful as laptop only has internal battery, not sure if disabling internal battery for service on bios (which can't turn on unless you plug adapter) would do the same trick as removing it from connector ?

These are the things that I guess might have to do something with it ?:
Code:
2018-04-24 22:41:41.029387+0200 0x425      Default     0x0                  0      0    kernel: (AppleIntelKBLGraphicsFramebuffer) [IGFB][INFO   ] FB0: Panel Fitter modeset
2018-04-24 22:41:41.045907+0200 0x425      Default     0x0                  0      0    kernel: kPEEnableScreen 1

2018-04-24 22:41:36.839428+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839423 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS01 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839470+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839467 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS02 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839530+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839527 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS01 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839579+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839576 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for SS02 of 750 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839777+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839774 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for USR1 of 500 mWWakePower and 0 mWSleepPower
2018-04-24 22:41:36.839832+0200 0x117      Default     0x0                  0      0    kernel: (AppleBusPowerController) 000000.839829 AppleBusPowerController: AppleBusPowerController::requestStaticServicePowerLocked: power supply unavailable, assuming successful power for USR2 of 500 mWWakePower and 0 mWSleepPower

2018-04-24 22:41:36.730204+0200 0x103      Default     0x0                  0      0    kernel: (IOAHCIFamily) [AHCI][PML][00000000]-IOAHCIPortMultiplierGlobals::IOAHCIPortMultiplierGlobals
2018-04-24 22:41:36.731828+0200 0x101      Default     0x0                  0      0    kernel: (AppleIntelLpssI2C) AppleIntelLpssI2C-1::initI2CGpio: no ISOL, validateObject returned 0xe00002bc
2018-04-24 22:41:36.733012+0200 0x10e      Default     0x0                  0      0    kernel: (AppleIntelLpssI2CController) AppleIntelLpssI2CController-1::_notificationPublishedHandler: getChannelNumber failed

2018-04-24 22:41:36.686836+0200 0xe8       Default     0x0                  0      0    kernel: (IOUSBFamily) 000000.686833 AppleUSBLegacyRoot@(null): AppleUSBLegacyRoot::init: enabling legacy matching
2018-04-24 22:41:36.698448+0200 0xb1       Default     0x0                  0      0    kernel: initialize_screen: b=7F80000000, w=00000780, h=00000438, r=00001E00, d=00000001

USBX properties loaded just fine... Look at your ioreg under EC.
 
USBX properties loaded just fine... Look at your ioreg under EC.
VoodooI2C finally working, I did read the guide again and noticed that my DSDT was wrong as you mentioned.
Now it works, the other problem was kext injection, the guide says to add it on EFI/Clover/kexts/other instead of L/E, but it wasn't injecting the kext, when I booted with boot with injected kexts it worked.

Anyway

Now if i want to hotpatch this, since my device is TPD0, I assume I should rename it to like XTPD0 or something that it doesn't interfere with ACPI, then copy the original patched one into clean SSDT-I2C and add the Externals, correct ?

Im happy for tonight & ready to go gift myself with some sleep...

Tomorrow to do list:
The only thing strange regarding EC/EC0 is that AppleACPIEC is not loaded against EC0...
  • Fix this issue that you specified up there.
  • Boot Ubuntu from USB, do a codec dump, patch it, build Audio Injector, remove AppleALC.kext
  • Inject EDID to fix black screen after HDMI Cable Unplugged
  • Test VGA Port & Probably disable uneccesary Framebuffer Ports
  • Debug ACPI to Find Fan RPM reading code
  • Disable FingerPrint on Custom USB port Injector (SSDT-USB).
  • Enable Discrete GPU on Bios and disable it with ACPI.
  • Do a final deep check if everything is working correctly
  • Merge ACPI into a single SSDT via Hotpatch #include into SSDT-RMCF (SSDT-V330)
  • Write the guide.


Keyboard Map:
  • Fix Fn+F8 (camera on/off) assign a FXX key
  • Fix Fn+F4 Mic on/off toggle (assign Fxx) key to map it to Siri shortcut
  • Fix Fn+F7 (airplane mode) to map it to Notification Center
  • Fix Fn+F5 (Refresh "f5") assign a Fxx key to assign to something later (probably spotlight search)
  • Fix Fn+F9 (Lock PC/lockscreen) assign Fxx to map System Preferences
  • Fix FN+F10 (projector) to video mirror toggle
Touchpad via VoodooI2C:
  • Left and Right click area to small (I have to press near the edges in order to work), need to change that to left & click surface area have the bottom part of touchpad left to right 50/50 or 40%/40% for left and right click.
 
VoodooI2C finally working, I did read the guide again and noticed that my DSDT was wrong as you mentioned.
Now it works, the other problem was kext injection, the guide says to add it on EFI/Clover/kexts/other instead of L/E, but it wasn't injecting the kext, when I booted with boot with injected kexts it worked.

I think some Apple I2C kexts must be deleted if you want to use VoodooI2C from /L/E.
Or you could try the disabler kext I mentioned a while back.

Now if i want to hotpatch this, since my device is TPD0, I assume I should rename it to like XTPD0 or something that it doesn't interfere with ACPI, then copy the original patched one into clean SSDT-I2C and add the Externals, correct ?

As always, with hotpatch, you start by doing static patch (just for the change you're focused on), then use diffmerge to see the differences. Then determine the best way to hotpatch it. You didn't attach any files, so I have no way to answer your question (no way for me to do the diffmerge).

Im happy for tonight & ready to go gift myself with some sleep...

Probably a good idea...
 
I think some Apple I2C kexts must be deleted if you want to use VoodooI2C from /L/E.
Or you could try the disabler kext I mentioned a while back.
Ok, but which kexts are exactly needed to be deleted ?
Also is there a way to block them from clover "ensuring update proof" system.

Or if that kext disabler does that job, which one did you refer to ?
because as for now, I have them on EFI/Clover/kexts/other & on config.plist I set /SystemParameters/InjectKexts=Yes.

As always, with hotpatch, you start by doing static patch (just for the change you're focused on), then use diffmerge to see the differences. Then determine the best way to hotpatch it. You didn't attach any files, so I have no way to answer your question (no way for me to do the diffmerge).
Obviously the "Device (TPD0)" is my ELAN touchpad on DSDT, what I did is rename it to TPDX "no such name on DSDT"
so I renamed TPD0 to TPDX via config.plist /DSDT/Patches/
Built a new SSDT called "SSDT-I2C" and added the patched TPD0 for VoodooI2C, added externals.
Removed DSDT.aml from /EFI/Clover/ACPI/Patched and added the SSDT-I2C.aml, rebooted, Excellent, now it works :thumbup:

Audio:
Took most of my time today patch the codec & I did complete it at last, but while looking at your Lenovo repos to check for a possible discovery of a Fan reading code available I noticed the Lenovo Z50 forked from brave knight had the exact same audio codec and all the same configuration... could've saved myself 3 hours but whatever, the learning was more valuable i believe.

To be done: there was a layoutID from the vanilla AppleHDA.kext that his SignalProcessing elements for Speakers had Excellent Sound Quality & Volume "from a project that I was doing" with Audio on my Lenovo Thinkpad L440, from all the layouts on AppleHDA I tried 50% of them, I believe I went till layout 70 trying them 1 by 1.
Unfortunately, External HDD got corrupted and lost all of my data. "had listed the Layouts that work on patched codecs and listed each one with description".

Will have to redo that after I fix the rest of the problems...

Keyboard Map:
- I fixed brightness keys, usually they are Q1C/Q1D as you mentioned, also the other variant on some thinkPads Q14/Q15
but on this laptop,for me it was Q1C/Q1D.
Now my question about hotpatch method, how do I instrument EC Queries to find other FN buttons ?
on static patch It was easy by just adding the patch to instrument EC Queries on DSDT and install acpidebug.kext
But for hotpatch, aside from ACPIDebug.kext & SSDT-RMDT do I need something else ?

IGPU:
is "-disablegfxfirmware" still required on Kaby Lake R & on latest IntelGraphicsFixup.kext ?

HDMI Audio:
Need to inject EDID as for now its only causing issues after I disconnect the HDMI cable, no issues after wake from sleep.
 
Ok, but which kexts are exactly needed to be deleted ?

lpss kexts (you will find it documented in the i2c thread..)


Or if that kext disabler does that job, which one did you refer to ?
because as for now, I have them on EFI/Clover/kexts/other & on config.plist I set /SystemParameters/InjectKexts=Yes.

The kext disabler that I attached to the I2C thread is also causing the latest VoodooI2C to be disabled, so not workable at present.

Obviously the "Device (TPD0)" is my ELAN touchpad on DSDT, what I did is rename it to TPDX "no such name on DSDT"
so I renamed TPD0 to TPDX via config.plist /DSDT/Patches/
Built a new SSDT called "SSDT-I2C" and added the patched TPD0 for VoodooI2C, added externals.
Removed DSDT.aml from /EFI/Clover/ACPI/Patched and added the SSDT-I2C.aml, rebooted, Excellent, now it works :thumbup:

I would probably do something different, but I can see how this manages to work... since TPDX is controlled by module level conditionals that aren't working, it is effectively disabled anyway, no matter the name.

And probably the TPD0 name is not sacred... so . you probably could have just named your replacement in the SSDT something other than TPD0 (such as TPDX).

There are other ways you could patch too... the module level conditionals could probably be disabled or changed to If(1).

Audio:
Took most of my time today patch the codec & I did complete it at last, but while looking at your Lenovo repos to check for a possible discovery of a Fan reading code available I noticed the Lenovo Z50 forked from brave knight had the exact same audio codec and all the same configuration... could've saved myself 3 hours but whatever, the learning was more valuable i believe.

Definitely.

To be done: there was a layoutID from the vanilla AppleHDA.kext that his SignalProcessing elements for Speakers had Excellent Sound Quality & Volume "from a project that I was doing" with Audio on my Lenovo Thinkpad L440, from all the layouts on AppleHDA I tried 50% of them, I believe I went till layout 70 trying them 1 by 1.

This SignalProcessing data is in the layout XML? Or are you referring to something in Platforms XML?

Keyboard Map:
- I fixed brightness keys, usually they are Q1C/Q1D as you mentioned, also the other variant on some thinkPads Q14/Q15
but on this laptop,for me it was Q1C/Q1D.
Now my question about hotpatch method, how do I instrument EC Queries to find other FN buttons ?

For instrumentation purposes no reason go through the trouble to use hotpatch... it is temporary, so just use static patch.

IGPU:
is "-disablegfxfirmware" still required on Kaby Lake R & on latest IntelGraphicsFixup.kext ?

There are some options in IntelGraphicsFixup.kext that allow you to eliminate -disablegfxfirmware. But last I read, doing so causes performance issues. I haven't experimented with it myself.

HDMI Audio:
Need to inject EDID as for now its only causing issues after I disconnect the HDMI cable, no issues after wake from sleep.

Or EDID override via display override file. Some claim the EDID doesn't work for fixing various problems if injected in ioreg, but others claim it works fine... You can test both and decide.
 
lpss kexts (you will find it documented in the i2c thread..)
Will check the thread in more details.
I would probably do something different, but I can see how this manages to work... since TPDX is controlled by module level conditionals that aren't working, it is effectively disabled anyway, no matter the name.

And probably the TPD0 name is not sacred... so . you probably could have just named your replacement in the SSDT something other than TPD0 (such as TPDX).

There are other ways you could patch too... the module level conditionals could probably be disabled or changed to If(1).
Will post problem reporting files tonight and after taking a look at the DSDT you could propably give an idea for a simpler hotpatch for that, it would be also even better if we can come up with a simple patch that we can sent a pull request so maybe other can get good use of it, but since most of the people are still on static patch, its maybe not that much contributing for others.
This SignalProcessing data is in the layout XML? Or are you referring to something in Platforms XML?
Yes, the SignalProcessing data in the layout XML file, from layout1 till layout70 there were like 7-8 layouts that worked very well and picked 3 best of them but lost track after external hdd corruption.
Will check that again.
For instrumentation purposes no reason go through the trouble to use hotpatch... it is temporary, so just use static patch.
Yes, it would definitely better since it’s something that i need to do only once, i can do that only to find the EC queries generated and remove DSDT.
Or EDID override via display override file. Some claim the EDID doesn't work for fixing various problems if injected in ioreg, but others claim it works fine... You can test both and decide.
Will test both variants and see how they work.
I also noticed that the cursor does get a bit laggy when i connect the hdmi display
Could it be the edid problem or something else.

After if fix those remaining issues, will post problem reporting files again so you can maybe point into improvements that could be done to simplify/remove unnecessary patches, or also point a problem that I couldn’t find or that i did in the process of patching.
 
Status
Not open for further replies.
Back
Top