LuletterSoul / Dell-XPS15-9570-macOS

let macOS Mojave/macOS Catalina run on Dell XPS 9570 4K
402 stars 75 forks source link

Found the reason for the high occupancy of ternal_task #47

Closed smallssnow closed 5 years ago

smallssnow commented 5 years ago

Hi,after uninstalling the two kexts of VoodooI2C.kext VoodooI2CHID.kext, the occupancy rate is only 2%. I think it is because of the high occupancy caused by the error caused by this kext, and also solves the problem of frequency locking of 0.8ghz. During the period, the console continuously outputs "surface testing disallowed updated", but the disadvantage is that multi-gesture operation cannot be used, which inevitably causes inconvenience.If this problem can be solved, I think this is a perfect efi .

LuletterSoul commented 5 years ago

Thanks for your feedback.The recent release has enabled GPIO interrupt mode for VoodooI2C.kext.The kernel_task CPU usage should be lower a little bit.But as you said, we can not have it both ways.

smallssnow commented 5 years ago

The latest version of voodooPS2controller supports all three-finger gestures, but after I observed his code, it seems that I didn't add 4 fingers. If I start from the source code and add 4 fingers, it may solve this problem completely, but this project seems to be difficult. .

LuletterSoul commented 5 years ago

Actually, the reason why VoodooI2C causes high CPU usage is that it works on Pooling Mode.

At previous release, I have enabled GPIO Interrupt Mode of trackpad successfully but not touchscreen, ie. touchscreen still works on Pooling Mode which requires more CPU resources.

Once I enable GPIO mode of touchscreen, the system will be stuck on busy time out TPL1 when boots, it will cash and spend long time on entering system UI.

Maybe it's a bug of VoodooI2C or I make a mistake during building hotpatch.But the two I2C devices ACPI object named TPD0 and TPL1 has almost the same structure from low level source code view.Using the same return way should work on TPL1 with TPD0.But the result shows failed thing and cashes the system.

One compromise is to close touchscreen and use trackpad only.(I don't use touchscreen usually.)It gains low CPU usage from now.I will share hotpatch to disable it if someone need.

smallssnow commented 5 years ago

This is a very serious bug, I really need your hotpatch, because I use the touch screen very few times, thank you for your guidance, because "mac" is no touch screen, if you turn off the touch screen to bring smooth, I will like this change

eamigo86 commented 5 years ago

@LuletterSoul could you share your hotpatch? or launch a new release with it?

andresandiah commented 5 years ago

By default, XPS 1080p users dont benefit of the touchscreen enable by default. Maybe in the next EFI revision, make it default to be disabled on the config_1080.plist : and make it optional dor the 4k model. Thanks in advance

LuletterSoul commented 5 years ago

@eamigo86 @smallssnow @andresandiah A new release has been launched.The touchscreen is disabled.The kernel_task CPU usage is lower than 5% now.The trackpad works very well.But it's not perfect that I can't use touchscreen.Hope someone provide a better solution.

The CPU frequency is locked at 800MHz seems to be irrelevant to this bug.