acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

Thinkpad SSDT(s) need adjustments with your VoodooPS2 kext #418

Closed Sniki closed 4 years ago

Sniki commented 5 years ago

Hi, @vit9696 @usr-sse2

FIrst of all congratulations for the excellent work that you people are doing for the hackintosh community, you are all awesome.

Some time ago we added ThinkPad TrackPoint, Trackpad and ClickPad support into Rehabman VoodooPS2Controller which we ported from Tluck VoodooPS2Controller fork. We were using the two available SSDTs depending on our need / the laptop model:

On my Lenovo Thinkpad L440 i recently tested and i can confirm that the ClickPad buttons and the Trackpoint does work perfect with your kext (using SSDT-Thinkpad_ClickPad). But some of the code inside the SSDT(s) is breaking or has conflicts with the native gestures engine that you added resulting into non working gestures like 2 finger scrolling etc. Im not sure which of these values are not needed anymore with your kext but i assume all the ones having to do with gestures either need to be changed or removed. Im refering to these two: ClickPad (Newer ThinkPads - Haswell+): https://github.com/acidanthera/VoodooPS2/blob/master/SSDT-Thinkpad_Clickpad.dsl TrackPad (Older Thinkpads - Haswell-): https://github.com/acidanthera/VoodooPS2/blob/master/SSDT-Thinkpad_Trackpad.dsl

for example on SSDT-Thinkpad_Clickpad.dsl:

// Example overrides for Thinkpad models with ClickPad
DefinitionBlock ("", "SSDT", 2, "hack", "ps2", 0)
{
    // Change _SB.PCI0.LPC.KBD if your PS2 keyboard is at a different ACPI path
    External(_SB.PCI0.LPC.KBD, DeviceObj)
    Scope(_SB.PCI0.LPC.KBD)
    {
        // Select specific configuration in VoodooPS2Trackpad.kext
        Method(_DSM, 4)
        {
            If (!Arg2) { Return (Buffer() { 0x03 } ) }
            Return (Package()
            {
                "RM,oem-id", "LENOVO",
                "RM,oem-table-id", "Thinkpad_ClickPad",
            })
        }
        // Overrides (the example data here is default in the Info.plist)
        Name(RMCF, Package()
        {
            "Synaptics TouchPad", Package()
            {
                "BogusDeltaThreshX", 800,
                "BogusDeltaThreshY", 800,
                "Clicking", ">y",
                "DragLockTempMask", 0x40004,
                "DynamicEWMode", ">n",
                "FakeMiddleButton", ">n",
                "HWResetOnStart", ">y",
                //"ForcePassThrough", ">y",
                //"SkipPassThrough", ">y",
                "PalmNoAction When Typing", ">y",
                "ScrollResolution", 800,
                "SmoothInput", ">y",
                "UnsmootInput", ">y",
                "Thinkpad", ">y",
                "EdgeBottom", 0,
                "FingerZ", 30,
                "MaxTapTime", 100000000,
                "MouseMultiplierX", 2,
                "MouseMultiplierY", 2,
                "MouseScrollMultiplierX", 2,
                "MouseScrollMultiplierY", 2,
                //"TrackpointScrollYMultiplier", 1, //Change this value to 0xFFFF in order to inverse the vertical scroll direction of the Trackpoint when holding the middle mouse button.
                //"TrackpointScrollXMultiplier", 1, //Change this value to 0xFFFF in order to inverse the horizontal scroll direction of the Trackpoint when holding the middle mouse button.
            },
        })
    }
}
//EOF

So the SSDT does work and enables the TrackPoint and ClickPad (3 physical buttons - right,middle,left click) but it breaks the gestures on your version due to the gestures changes. I couldn't figure out which one(s) of these values is breaking so i could remove them. Maybe you guys can figure/help find them out.

Sincerely, Sniki.

Jpe230 commented 5 years ago

With this kext on my X260, the trackpoint works, albeit very slowly, but the buttons do not work.

Could you please test this build and see if you can see any "IS THINKPAD" in the console app? VoodooPS2Controller.kext.zip

silencer51 commented 5 years ago

Just tested it, no 'IS THINKPAD' in console output, also trackpoint does not work at all with the above kext.

Sniki commented 5 years ago

Just tested it, no 'IS THINKPAD' in console output, also trackpoint does not work at all with the above kext.

Is it possible that you have the Alps or Elan model ?

silencer51 commented 5 years ago

Just tested it, no 'IS THINKPAD' in console output, also trackpoint does not work at all with the above kext.

Is it possible that you have the Alps or Elan model ?

In Windows, the driver that loads is Synaptics and it works normally.

With tluck's VoodooPS2 fork https://github.com/tluck/OS-X-Voodoo-PS2-Controller, the touchpad, trackpoint and buttons all work, however, gestures are very basic and tap to click is erratic.

usman2006 commented 5 years ago

(T440s with T450/t460 Trackpad) it works for me fine, :D. except the middle button. thx

Jpe230 commented 5 years ago

Just tested it, no 'IS THINKPAD' in console output, also trackpoint does not work at all with the above kext.

Is it possible that you have the Alps or Elan model ?

In Windows, the driver that loads is Synaptics and it works normally.

With tluck's VoodooPS2 fork https://github.com/tluck/OS-X-Voodoo-PS2-Controller, the touchpad, trackpoint and buttons all work, however, gestures are very basic and tap to click is erratic.

The code for the ClickPad is virtually the same from tluck's so theorically it also should work for you. As for the trackpoint, I only added a Debug message to know if you were hitting a conditional statement, so the trackpoint should not stopped working.

Apparently your machine is not setting a variable called 'IsThinkpad' which is necessary to be set for the Clickpad to work. According to Acidanthera's, RehabMan's and even Tluck's forks, it should be enabled by default.

My theory is:

Try applying one of the two patches mentioned above (both should set the variable 'IsThinkpad') and see if it works for you.

silencer51 commented 5 years ago

Just tested it, no 'IS THINKPAD' in console output, also trackpoint does not work at all with the above kext.

Is it possible that you have the Alps or Elan model ?

In Windows, the driver that loads is Synaptics and it works normally. With tluck's VoodooPS2 fork https://github.com/tluck/OS-X-Voodoo-PS2-Controller, the touchpad, trackpoint and buttons all work, however, gestures are very basic and tap to click is erratic.

The code for the ClickPad is virtually the same from tluck's so theorically it also should work for you. As for the trackpoint, I only added a Debug message to know if you were hitting a conditional statement, so the trackpoint should not stopped working.

Apparently your machine is not setting a variable called 'IsThinkpad' which is necessary to be set for the Clickpad to work. According to Acidanthera's, RehabMan's and even Tluck's forks, it should be enabled by default.

My theory is:

  • You are loading another Kext (?) check for duplicates in S/L/E, L/E, Clover/Kexts/Extras
  • You applied a patch that is setting to false this variable

Try applying one of the two patches mentioned above (both should set the variable 'IsThinkpad') and see if it works for you.

I'll try it today. I only load kexts from Clover/Kexts/Extras and /L/E. It's weird.

silencer51 commented 5 years ago

I found the issue, I needed to create a new 'X260' string under LENOVO/Platform Profile in Info.plist inside VoodooPS2Trackpad.kext, there are entries for T460, T560, T420 etc. that define each model as Thinkpad_Clickpad or Thinkpad_Trackpad. Keys now work, and trackpoint works as well, although much slower than trackpad.

miskz commented 5 years ago

VoodooPS2Controller.kext.zip @joshuaseltzer @miskz @nicogig and everyone else, please give this kext a try that i have build from @Jpe230

Report back if ClickPad (Left,Middle,Right) physical buttons are working.

X1 Carbon 3rd gen / 2015: buttons work, including middle-click scroll. Thanks!

joshuaseltzer commented 5 years ago

@Sniki @Jpe230 just tested on my T440s. Everything is working perfectly, just as it did before with the Rehabman version (with tluck's updates) except with the new gestures added by acidanthera. In summary: this is amazing and game changing. Thank you so much for putting this together.

As Sniki had mentioned earlier, hopefully you can submit a pull request into the official repository so that we can get this upstream. This will help a lot of Thinkpad users!

nicogig commented 5 years ago

VoodooPS2Controller.kext.zip @joshuaseltzer @miskz @nicogig and everyone else, please give this kext a try that i have build from @Jpe230

Report back if ClickPad (Left,Middle,Right) physical buttons are working.

Sorry for the delay in testing. ClickPad and TrackPoint working flawlessly on my T460s.

vit9696 commented 5 years ago

I found the issue, I needed to create a new 'X260' string under LENOVO/Platform Profile in Info.plist inside VoodooPS2Trackpad.kext, there are entries for T460, T560, T420 etc. that define each model as Thinkpad_Clickpad or Thinkpad_Trackpad. Keys now work, and trackpoint works as well, although much slower than trackpad.

Please submit a pull request in case it is still an issue.

I guess we should close this now that @Jpe230 changes were merged in master.

garronej commented 5 years ago

Hi there,

I will happily PayPal 30$ to anyone who would log in to my machine and got the ClickPad (Left, Middle, Right) physical buttons to work.

I have a Thinkpad Yoga S1 for which I have swiped the Trackpoint by the one of the X250 image I have tried the kext ( in EFI partition ) provided by @Sniki without success. ( The physical buttons aren't working ). I haven't tried with SSDT-Thinkpad_Clickpad.dsl thought.

If someone got it to work for me I will report here.

If interested please contact me at joseph.garrone.gj@gmail.com

Regards

joshuaseltzer commented 4 years ago

It seems as though the latest official release (2.1.0) which should have included these fixes is not working any longer. I can still get the trackpoint + 3 buttons to work as expected, but now my trackpad doesn't work at all.

I've also tried using VoodooInput as well, but that didn't change anything. Reverting to the kext linked above until I can figure out what might be happening.

silencer51 commented 4 years ago

It seems as though the latest official release (2.1.0) which should have included these fixes is not working any longer. I can still get the trackpoint + 3 buttons to work as expected, but now my trackpad doesn't work at all.

I've also tried using VoodooInput as well, but that didn't change anything. Reverting to the kext linked above until I can figure out what might be happening.

Same here.

notthebee commented 4 years ago

It seems as though the latest official release (2.1.0) which should have included these fixes is not working any longer. I can still get the trackpoint + 3 buttons to work as expected, but now my trackpad doesn't work at all.

I've also tried using VoodooInput as well, but that didn't change anything. Reverting to the kext linked above until I can figure out what might be happening.

+1

7Backwards commented 4 years ago

VoodooPS2Controller.kext.zip @joshuaseltzer @miskz @nicogig and everyone else, please give this kext a try that i have build from @Jpe230

Report back if ClickPad (Left,Middle,Right) physical buttons are working.

Everything works on my 450s thank you so much, any way to make the vga port work? only thing left ahahah

treeshateorcs commented 4 years ago

Could someone please help me? I think I'm doing something wrong. So, I opened SSDT-Thinkpad_Clickpad.dsl in MaciASL, clicked Compile, then File -> Save As... and saved it in Desktop, then I copied the aml file into /Volumes/EFI/EFI/CLOVER/ACPI/patched, but I still have this issue.