hieplpvip / Asus-Zenbook-Hackintosh

Run macOS on Asus Zenbook with OpenCore
199 stars 44 forks source link

Change in SSDT-ELAN (and more) to have a working touchpad in interrupt mode #29

Closed Vmonheros closed 5 years ago

Vmonheros commented 5 years ago

What is your laptop? UX430UA = I have an ELAN 1300

Which version of macOS are you using? OS X 10.14.2

Describe the problems Touchpad don't work in interrupt mode with current SSDT-ELAN

Attach output from gen_debug

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Problem is corrected. I just put it here for tracking.

If you look of our I2C devices yet declared in DSDT, you will see that these ones root pinned. So, we don't need any _CRS method. If I declared it, touchpad don't work.

So only

DefinitionBlock ("", "SSDT", 2, "hack", "elan", 0x00000000) { External (SB.PCI0.GPI0, DeviceObj) External (SB.PCI0.I2C1.ETPD, DeviceObj)

Scope (_SB.PCI0.I2C1.ETPD)
{
    Name (SBFG, ResourceTemplate ()
    {
        GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault, 0x0000,
            "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
            )
            {   // Pin list
                0x0055
            }
    })
}

}

And also, no need to patch DSDT with clover (the 2 last lines of your config file that are disable by default are not needed).

Have a try with your ELAN 1200. I know you said you have a buggy Asus firmware for ELAN 1200 with GPIO mode, but perhaps it's just this _CRS definition not needed !

hieplpvip commented 5 years ago

@Vmonheros You mean your touchpad can work in interrupt mode?

Vmonheros commented 5 years ago

Yes, with 'GPIO", no 'polling"

hieplpvip commented 5 years ago

What makes you think you're running in interrupt mode?

I'm pretty sure you're still running in polling mode, since you only added SBFG. You need to patch _CRS too if you want to switch to GPIO interrupt, and as I see you didn't.

Vmonheros commented 5 years ago

Is it something that I can check with IOreg ?

hieplpvip commented 5 years ago

Run this in Terminal: log show --predicate 'process == "kernel"' --last 10m

Search for VoodooI2C, there should be an error saying interrupt mode is not available.

Vmonheros commented 5 years ago

I've got plenty errors from AppleSmartBatteryManager but nothing from VoodooI2C...

Will check again.

hieplpvip commented 5 years ago

My bad, you need to restart first, then run that command, because it only shows log in last 10min

Vmonheros commented 5 years ago

You're right.

2019-01-16 20:21:19.195046+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Publishing device nubs 2019-01-16 20:21:19.195055+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Found I2C device: ELAN1300 2019-01-16 20:21:19.195063+0100 0x106 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d60 Publishing device nubs 2019-01-16 20:21:19.195116+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::VoodooI2CDeviceNub Warning: Incompatible APIC interrupt pin (0x6d > 0x2f) and no GPIO interrupts found; if your chosen satellite implements polling then VoodooI2CDeviceNub will run in polling mode.

I will test again ;)

Vmonheros commented 5 years ago

If I add _CRS, Touchpad is recognized in PGIO but doesn't work. Any idea ?

2019-01-17 08:32:42.125203+0100 0xdb Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d61 Starting I2C controller 2019-01-17 08:32:42.125487+0100 0xdb Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d61 Set PCI power state D0 2019-01-17 08:32:42.125792+0100 0xdb Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d61 Publishing nub 2019-01-17 08:32:42.128130+0100 0xda Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d60 Starting I2C controller 2019-01-17 08:32:42.128391+0100 0xda Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d60 Set PCI power state D0 2019-01-17 08:32:42.128482+0100 0xda Default 0x0 0 0 kernel: (kernel) VoodooI2CPCIController::pci8086,9d60 Publishing nub 2019-01-17 08:32:42.131337+0100 0xfd Default 0x0 0 0 kernel: (AppleFSCompressionTypeZlib) com.apple.AppleFSCompressionTypeZlib kmod start 2019-01-17 08:32:42.140193+0100 0xfd Default 0x0 0 0 kernel: (AppleFSCompressionTypeDataless) com.apple.AppleFSCompressionTypeDataless kmod start 2019-01-17 08:32:42.158944+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Probing controller 2019-01-17 08:32:42.158950+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Found valid Synopsys component, continuing with initialisation 2019-01-17 08:32:42.160460+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d60 Probing controller 2019-01-17 08:32:42.160473+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d60 Found valid Synopsys component, continuing with initialisation 2019-01-17 08:32:42.160800+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerNub::pci8086,9d60 SSCN not implemented in ACPI tables 2019-01-17 08:32:42.160805+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerNub::pci8086,9d60 FMCN not implemented in ACPI tables 2019-01-17 08:32:42.161051+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d60 Warning: Error getting bus config, using defaults where necessary 2019-01-17 08:32:42.161076+0100 0x105 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d60 Publishing device nubs 2019-01-17 08:32:42.161177+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerNub::pci8086,9d61 SSCN not implemented in ACPI tables 2019-01-17 08:32:42.161184+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerNub::pci8086,9d61 FMCN not implemented in ACPI tables 2019-01-17 08:32:42.161189+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Warning: Error getting bus config, using defaults where necessary 2019-01-17 08:32:42.161208+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Publishing device nubs 2019-01-17 08:32:42.161217+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CControllerDriver::pci8086,9d61 Found I2C device: ELAN1300 2019-01-17 08:32:42.161541+0100 0x102 Default 0x0 0 0 kernel: (kernel) VoodooI2CDeviceNub::Got GPIO Controller! VoodooGPIOSunrisePointLP

hieplpvip commented 5 years ago

There's no way to do it now