lenovo y520 laptop cant fix the last final fixes..

Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#1
hello good day. i got a lenovo y520 here running big sur

(might downgrade to catalina tho because.. idk.. big sur doesn't "feel" like a mac os...)

after 4 weeks of work i finally managed to fix the intel hd 630 (it wasn't as straight forwards as reading guides..)


but I've got 3 rather annoying problems...

1. the usb ports stay engaged during sleep. so that means if a usb drive is plugged in. or removed during sleep. the device wakes up and does not go back to sleep unless manual user intervention and putting it to sleep myself again.

keeping a usb tester plugged in. it does go to sleep. and it keeps the usb device powered ..

2 the trackpad.

this laptop has the more uncommon "ELAN" trackpad.

whatever i try i cannot get it to run 100% correctly.

way 1


using the SmartPS2Touchpad kext i get multi touch. and it works to a acceptable degree.
the problem is..

if the device comes out of sleep. the left click and right click both act as a right click.

quickly pressing ctrl on the keyboard fixes this (so basically it's like the ctrl key is pressed after sleep till i press it once)

way 2

it only works as a mouse pointer and multi touch is broken.

i use this modified kext https://github.com/BAndysc/VoodooPS2

it works perfectly after sleep.


the 3rd small problem is keyboard ish... for some reason.. the brightness adjustment keys for the Display do not work.

i had them working once before. but then the numlock key didnt work causing me to not be able to turn it on and off.


the full specs of this machine is

a core i7 7700hq.

16 gb ddr4 ram

intel hd 630 as igpu and 1050 ti as dgpu. (non used. not sure if it's disabled in the dsdt yet though)

currently working on trying to patch the usb ports using hackintool. but any other tips would be greatly appreciated
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#2
I would recommend that you have a look at the VoodooI2C kexts and patches etc.

The older versions seem to support a number of Elan trackpads, including a Lenovo Yoga 720 Laptop which uses an Elan trackpad.

https://github.com/VoodooI2C/VoodooI2C

You need to know which Elan device your laptop uses in order to tell if the VoodooI2C kexts will work with your laptop. You probably need to use Windows to confirm which device your laptop contains.
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#3
update. managed to fix sleep. manually mapped ports. and added a usb wake patch that stopped it from waking opun usb disconnect.

the keyboard and trackpad issue stil remain


I would recommend that you have a look at the VoodooI2C kexts and patches etc.

The older versions seem to support a number of Elan trackpads, including a Lenovo Yoga 720 Laptop which uses an Elan trackpad.

https://github.com/VoodooI2C/VoodooI2C

You need to know which Elan device your laptop uses in order to tell if the VoodooI2C kexts will work with your laptop. You probably need to use Windows to confirm which device your laptop contains.

how would i properly check this in windows? the elan software in windows seems obscure. i'll try to run adia64 engineer to see more details..
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#4
The page I linked for the VoodooI2C kexts lists a number of different devices that are reported to work with the kexts, check to see if your I2C device and Elan trackpad device is among them.

Kaby Lake devices:
  • pci8086,a160
  • pci8086,a161
  • pci8086,a162
  • pci8086,a163
Look in your IOReg to see if which device your system uses.

IF it is one of the devices listed then you should remove all the other Keyboard and Trackpad kexts you have added and use the VoodooI2C kexts and patch.

If it isn't listed among the Kaby Lake devices then you will need to see if anyone with a similar Lenovo laptop has posted a fix for the trackpad issue, someone like this gent on GitHub - https://github.com/gasperTheGhost/Yoga-520-Hackintosh

He seems to be using a few of the VoodooI2C kexts, alongside a version of VoodooPS2Controller and claims his trackpad has full functionality in macOS Catalina.

Or have a look at this guide by MaLd0n over at the Olarila site - https://www.olarila.com/topic/7791-...ouchscreen-mojave-catalina-full-dsdt-patches/
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#5
The page I linked for the VoodooI2C kexts lists a number of different devices that are reported to work with the kexts, check to see if your I2C device and Elan trackpad device is among them.

Kaby Lake devices:
  • pci8086,a160
  • pci8086,a161
  • pci8086,a162
  • pci8086,a163
Look in your IOReg to see if which device your system uses.

IF it is one of the devices listed then you should remove all the other Keyboard and Trackpad kexts you have added and use the VoodooI2C kexts and patch.

If it isn't listed among the Kaby Lake devices then you will need to see if anyone with a similar Lenovo laptop has posted a fix for the trackpad issue, someone like this gent on GitHub - https://github.com/gasperTheGhost/Yoga-520-Hackintosh

He seems to be using a few of the VoodooI2C kexts, alongside a version of VoodooPS2Controller and claims his trackpad has full functionality in macOS Catalina.

Or have a look at this guide by MaLd0n over at the Olarila site - https://www.olarila.com/topic/7791-...ouchscreen-mojave-catalina-full-dsdt-patches/
alright i'll take a look tomorrow morning as it's quite late here. like i said.. 1 kext does make the trackpad work but weird glitches after sleep so i'll give a look with ioreg
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#6
alright i've tried to find out what to do more.

but it's a small bit unclear for me at the moment.

i've found out in windows that there is also a "SMBUS ELAN driver"

i've pulled up and saved my ioreg and i've attached it incase you know more about it...

this is the info i've managed to dig up by looking at adia 64 and device manager regarding the hardware

ELAN Pointing Device ETD067C
ACPI\VEN_ETD&DEV_067C
ELAN touchpad
PCI\VEN_8086&DEV_A123&SUBSYS_381717AA&REV_31
ELAN SMBUS driver

ACPI\VEN_MSFT&DEV_0001
ps2 keyboard


a small side note. i've noticed sleep in windows seems to be screwed up. the computer freezes after wake up if i am booted into windows from opencore.

what could possibly cause this?
 

Attachments

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#7
Your IOREG is corrupted and I can't open the file.

Some of the newer releases of IORegistryExplorer application can corrupt the exported file, so you need to use version 2.1, which can be downloaded via this link over at Tonymacx86 - https://www.tonymacx86.com/threads/guide-how-to-make-a-copy-of-ioreg.58368/

Can you save and post a copy of the IOREG, but this time don't save it with a file extension .ioreg, as this also corrupts the exported/saved file. IORegistry Explorer files don't need a file extension, so just save it as IORegistryExplorer names the file.

From the information above your Elan Touchpad is not among those listed as being supported - 8086,a123 seems to be the vendor, device name for your touchpad, which is not one of the four Kaby Lake devices listed above. That doesn't mean it won't work, just that we may need to work a bit harder to get it working.

Don't worry what drivers Windows uses, macOS won't be using the same or even similar drivers, the two OS's have nothing in common when it comes to drivers/kexts.
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#8
Your IOREG is corrupted and I can't open the file.

Some of the newer releases of IORegistryExplorer application can corrupt the exported file, so you need to use version 2.1, which can be downloaded via this link over at Tonymacx86 - https://www.tonymacx86.com/threads/guide-how-to-make-a-copy-of-ioreg.58368/

Can you save and post a copy of the IOREG, but this time don't save it with a file extension .ioreg, as this also corrupts the exported/saved file. IORegistry Explorer files don't need a file extension, so just save it as IORegistryExplorer names the file.

From the information above your Elan Touchpad is not among those listed as being supported - 8086,a123 seems to be the vendor, device name for your touchpad, which is not one of the four Kaby Lake devices listed above. That doesn't mean it won't work, just that we may need to work a bit harder to get it working.

Don't worry what drivers Windows uses, macOS won't be using the same or even similar drivers, the two OS's have nothing in common when it comes to drivers/kexts.
alright i think this works now

and i didnt mean drivers for windows.

i just noticed if i boot windows via opencore. sleep is broken in windows..

if i boot windows using the normal windows boot menu it works as it should.

someone said that's because of a improperly patched acpi/ssdt. thing is now that sleep for once works in mac os.. idek how i could fix this besides just using 2 seperate drives for the bootloader.
 

Attachments

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#9
The IOReg you attached above looks OK, for mouse and keyboard entries. Using Acidanthera's VoodooPS2Controller.kext.

The IOReg has a lot of HID entires (common for Keyboard/Mouse/Trackpad/Webcam devices) but there not too many I2C entries, just three IGPU Framebuffer i2C interfaces, which have nothing to do with the Trackpad.

You may need to play with the VoodooPS2Controller.kext if your trackpad is still not behaving as it should.

You might need to remove the VoodooPS2Mouse.kext or VoodooPS2Trackpad.kext from the /VoodooPS2Controller.kext/Contents/PlugIns folder, save a copy of the edited kext and use that in place of the full kext. I had to do this on a couple of laptops, otherwise I had a barely functioning trackpad.
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#10
alrighty i'll give that a shot. so far the trackpad works fine.

the keyboard is only half working.

the keys

7 and + on the numpad are for the brightness.

and the numlock key does not work and is set to off. so the entire numpad is unusable.

i have been able to fix this before by swapping another/older kext into it's place. but that causes the touchpad to bug out after sleep.


sometimes it thinks the ctrl key is permanently pressed and or the CMD/win key.

tried asking a few friends but they never had this weird behavior happen before. i'll shoot a video to show the weird issue after i get the kexts swapped
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#11
You may need to create some custom keystrokes for some keyboard functions, as the default function keys don't usually work in macOS. They are programmed for Windows to interpret not macOS.

You may need to invest in a can of compressed air, to clear any debris stuck under the keys. As this may be pressing on the internal part of the control key.

Have you set the NumLock to be 'on' when the system boots, i.e. set this in the bios?

You may have a defective keypad, does the keyboard react the same way in Windows or on another PC/Laptop/Hack?
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#12
You may need to create some custom keystrokes for some keyboard functions, as the default function keys don't usually work in macOS. They are programmed for Windows to interpret not macOS.

You may need to invest in a can of compressed air, to clear any debris stuck under the keys. As this may be pressing on the internal part of the control key.

Have you set the NumLock to be 'on' when the system boots, i.e. set this in the bios?

You may have a defective keypad, does the keyboard react the same way in Windows or on another PC/Laptop/Hack?
The keyboard is alright there's no debris the keys aren't stuck.

I found a kext that makes the numpad work. But using that kext the ctrl key bug after sleep comes

Using the other kext the numpad button does not work but the ctrl key bug does not appear.

Give me a moment I'll check the kext names
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#13
actually. i just found something weird out.

if i use only the ps2 voodoo kext.

the keyboard and trackpad work. but the numpad button is non functioning.

but if i add appleps2smarttouchpad.kext to with it..

the numpad starts working. i can enable and disable the numpad with the numlock key.

but this also makes the trackpad alot more in accurate. multi touch works like it does with only the voodoo kext.

but it has a weird acceleration to it making it very hard to make minor movements...

aswel as sleep being broken along with the ctrl key being pressed after sleep (wake up after 30 seconds)

but appleps2smarttouchpad.kext somehow makes the keyboard function as it should
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#14
You shouldn't be using those two kexts at the same time. They both provide similar functions and will cause issues when used together.

See if the ApplePS2SmartTouchpad.kext works on its own, i.e. remove the VoodooPS2Controller.kext. It may not provide the functionality you require with the Trackpad, but may get the number pad working alongside the rest of the keyboard.
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#15
using only applePS2smarttouchpad.kext.

keyboard and touchpad works.

but like before small movements makes the mouse pointer feel like it's on ice.

aswel as sleep being broken again.

checking the logs in mac os.

i see this as wake up reason

2021-01-20 01:54:16 +0100 Sleep Entering Sleep state due to 'Software Sleep pid=123':TCPKeepAlive=active Using AC (Charge:100%) 61 secs

is going to sleep


2021-01-20 01:55:17 +0100 Wake Wake from Normal Sleep [CDNVA] : due to RTC/UserActivity Assertion Using AC (Charge:100%)

and this is the wake up.

i opened the contents of the kext. and noticed a ps2 keyboard kext. i'm going to try to keep only the appleps2keyboard kext and remove the keyboard related kext from voodoops2 hoping i can make a "hybrid" working



EDIT further testing.

even though the keyboard works with ApplePS2SmartTouchpad.kex

the keyboard mapping is just a bit screwed up....

the alt key is the windows key. and vice versa.

the f12 and f11 control brightness as it should.

but disabling the numlock. so does the 4 and + keys on the numpad.

at this point.

how hard would it be to make my own/alter keyboard kexts to make it work for this laptop?

is it as simple as saying A is A and B is B ?
 
Last edited:

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#16
Sorry I’ve never had to map a keyboard layout, so have no idea how hard or easy this would be to do.
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#17
Alright no issues. I'll dig into it a bit.

Do you happen to know how I can prevent opencore from injecting ALL ssdt/acpi patches when booting windows?

They work for mac os but they ruin windows. Sure i can use bios boot picker but that's a bit impractical.

Iirc clover used to do it but opencore is different
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#18
Your SSDT's need to have the setting that they only work when used with 'Darwin' kernel.

This is what a standard non-'Darwin' SSDT-EC.aml looks like:

Screenshot 2021-01-20 at 19.03.14.png


This is what an SSDT-EC.aml created using corpnewt's SSDTTime script shows:

Screenshot 2021-01-20 at 19.04.15.png


As I understand things, the section in the red rectangle sets the SSDT to work only if it is running with macOS. It doesn't work with Windows. There is probably a better explanation somewhere online, which shows you how to add this feature to any given SSDT.

Which SSDT's are you using? How did you generate them, or rather where did you get them?
 
Joined
Jan 28, 2020
macOS
10.14.6
Mobo
dell e6540
CPU
4800mq i7
GPU
intel hd 4600
#19
Your SSDT's need to have the setting that they only work when used with 'Darwin' kernel.

This is what a standard non-'Darwin' SSDT-EC.aml looks like:

View attachment 10820

This is what an SSDT-EC.aml created using corpnewt's SSDTTime script shows:

View attachment 10821

As I understand things, the section in the red rectangle sets the SSDT to work only if it is running with macOS. It doesn't work with Windows. There is probably a better explanation somewhere online, which shows you how to add this feature to any given SSDT.

Which SSDT's are you using? How did you generate them, or rather where did you get them?

i am using 6 SSDT's

SSDT-EC-USBX-LAPTOP.AML
SSDT-GPI0-AML
SSDT-GPRW.AML
SSDT-PLUG-DRTNIA.AML
SSDT-PNLF.AML
SSDT-Y520.AML

besides usbx (made myself) and gprw (got from the post install guide due to usb sleep issues)

i got the files from someone on reddit.

mostly due to the fact that the intel hd was unfixable for me and a guy with the same laptop managed to fix it. but

as far as i can see y520 came from
https://www.tonymacx86.com/threads/guide-lenovo-legion-y520-y720-using-clover-uefi.261009/

i'm very new when it comes to ssdt patching and i am already happy i managed to fix usb sleep wake problems :p
 

Edhawk

Moderator
Joined
Apr 10, 2018
macOS
10.15.7
Mobo
GA-Z97X-UD5H
CPU
i7-4790K
GPU
Powercolor RX 580 8GB
#20
Looks like a well written guide, if a bit convoluted with the use of the different config.plists.

I now see why you are having trouble with your Elan trackpad, the guide author didn't include the ELAN kext.

Screenshot 2021-01-21 at 15.50.16.png


Not really helpful in my opinion, he should at least provide a link to the kext.

The section on the Trackpad setup will be worthless, as it is only going to relate to the Synaptics trackpad in his system, again not really helpful.

Screenshot 2021-01-21 at 15.14.01.png


It appears that the Y720 laptop is the only model with an I2C Trackpad. Your Y520 laptop shouldn't need the i2C kexts in that case.

SSDT's:
The SSDT-Y520.aml should, if you built it as instructed, include these SSDT Hotpatches:
  • SSDT-IGPU.dsl
  • SSDT-PNLF.dsl
  • SSDT-SATA.dsl
  • SSDT-GPRW.dsl
  • SSDT-XCPM.dsl
  • SSDT-XOSI.dsl
  • SSDT-HDEF.dsl
  • SSDT-PS2K.dsl
  • SSDT-USBX.dsl
  • SSDT-DGPU.dsl
You therefore shouldn't need the separate SSDT-GPRW.aml, SSDT-Plug-DRTNIA.aml, SSDT-PLNF.aml or the SSDT-EC-USBX-LAPTOP.aml, as these aspects seem to be included in the Hotpatch fixes in the SSDT-Y520.aml.

In fact the only SSDT it doesn't include is the SSDT-GPIO.aml. Using the separate SSDT's alongside the customised SSDT-Y520.aml may cause unnecessary conflicts when booting your system.

Any 'Fixes' you have applied in the config.plist may also conflict with the settings in the SSDT-Y520.aml.

Can you post a copy of your Clover/OC boot folder, so I can see exactly what you are using to boot your system. You may want to redact your SMBIOS serial number, board serial number, SmUUID, MLB and ROM codes.