tctien342 / Dell-Inspiron-7591-Hackintosh

MacOS running in dell 7591
160 stars 28 forks source link

Trackpad issues #25

Closed lvs1974 closed 4 years ago

lvs1974 commented 4 years ago

Hello, first of all I want to say "thank you" for gathering/developing into one repository many useful fixes and maintaining them. I open this issue since I want to share my experience and collect here feedbacks from other users.

So, I have Inspiron 7590 and I use Catalina 10.15.3. Below my observations:

Trackpad buttons: Trackpad left and right buttons do the same - just simulate click on left mouse button. I know - original Macs have only one button, but can we get two? Sometimes happens that left/right button does not work for some reason, and I have to press a few times (to select file in Finder, for example). And this is very annoying bug. But if I keep any finger on trackpad and click button - it works always!

Trackpad and text selection If I need to select more than 10 lines of text - it is a pain, since selection is reset for some reason. It is reproducible very often, but at some (rare) moments it works without any issues.

Below I put my questions:

  1. Why in SSDT-I2C.dsl in method SBFG "Pin list" is different from value in original DSDT (0x0023 instead of 0x001B)? Why cannot we use method SBFG from original DSDT?
  2. Is there any difference between GPIO and Polling mode for trackpad?
  3. How to turn off GPIO and try only Polling mode? 4. I still use buggy (and unsupported in macOS) Samsung PM991 OEM SSD, it is slow and sometime raises kernel panics. Can it be the reason of my bad experience with trackpad? - Replaced with Samsung EVO 970 Plus, but trackpad issues still here.
tctien342 commented 4 years ago
  1. It patched to GPIO Mode
  2. GPIO is known as better power managerment
  3. Disable all patch I2C in config and ACPI, left only two kext will make it in polling mode
  4. My current built will use trackpad button as "force click", why you dont use touch to click? you can enable drag on Accessibility Screen Shot 2020-03-01 at 21 56 14

If you want to use the stock ver then go here: https://github.com/alexandred/VoodooI2C

lvs1974 commented 4 years ago

@tctien342, thank you very much for your answers! I will try everything what I can. Probably I will found a workaround. It seems quite strange for me: there are many repositories related to Inspiron 7590/7591, and nobody mentioned any issues with trackpad. Am only I "lucky"?

tctien342 commented 4 years ago

@lvs1974 i use touch to click and two finger to right click so dont care much about it, you can select text by using shift! just click the begin of block text and hold shift then click the end of block text then you done.

lvs1974 commented 4 years ago

@tctien342, thank you for your suggestions! If you or anybody else experience similar issues with trackpad, I am in the same boat. I can use workarounds, and I will get use to do it. If you agree, we can close this issue. May be VoodooI2C team will fix it in the feature, it seems it the only driver which we can use for our I2C-only trackpad.

tctien342 commented 4 years ago

@lvs1974 Yep, hope Voodooi2c team will optimize this on feature, enjoy your hackintosh

lvs1974 commented 4 years ago

@tctien342, could you probably try this fork from VoodooI2C & VoodooI2CHID, please? I made many fixes, and with updated VooodoPS2 from acidanthera I don't have any panics, even when I wake my laptop with a lid (this feature is turned off in BIOS, but lidwake=1 in pmset). Sources you can find on my github page. I also had to turn off CPUFriend, since it also produces rare panics (NMI).

VoodooI2C.zip

tctien342 commented 4 years ago

EFI.zip Please try this, everything work well in this built i ported from https://github.com/xxxzc/xps15-9570-macos

lvs1974 commented 4 years ago

@tctien342, the EFI folder you attached in previous post seems to be very stable! I am really surprised!

tctien342 commented 4 years ago

@lvs1974 glad that you like it, can you take a look in HDMI audio? Try patch Framebuffer but that blink screen still exist

lvs1974 commented 4 years ago

@tctien342, you are right, when FakePCIID is loaded, video is blinking, but in my case audio is also "blinking" with the same frequency, I mean only very short portions of sound are audible. When I disabled FakePCIID - video is ok, audio via HDMI is missing. As far as I remember - AppleALC is responsible for audio via HDMI, int't it?

tctien342 commented 4 years ago

Yep, AppleALC is responsible for HDMI audio. Can't find any info about this problem, this maybe an complete new situation

tctien342 commented 4 years ago

@lvs1974 as what i found if HDMI audio enabled, when plug-in HDMI the internal screen will become 30bit instead of 24bit color

lvs1974 commented 4 years ago

@tctien342, I was wrong: for Intel HD digital audio HDMI, DP, Digital DVI WhateverGreen is responsible. I discovered stange thing in FakePCIID_Intel_HDMI_Audio.kext: Intel cards like 0x9d748086 0x9d718086 0x9d708086 0xa1718086 are faked to 70A10000 (actually this is HDEF in Intel HD 630 which is installed in out laptops). But our HDEF 0xa1708086 is faked to 709D0000!!! Probably video is also must be faked to corresponding HDEF. But I am not an expert.

lvs1974 commented 4 years ago

@tctien342, this approach (fake HDEF to 709D0000) seems to be very strange. Is there anybody with fully working audio via HDMI and this FakePCIID?

PS: observations related to the newest EFI folder:

  1. Trackpad has the same issues (buttons and text selection)
  2. Audio also disappears intermittently. But from stability (panics) perspective it works great so far.
tctien342 commented 4 years ago

@tctien342 new research, after sleep, the HDMI will usable even the audio, both work perfectly

lvs1974 commented 4 years ago

@tctien342, Wah! No blinking and with audio!!! Without FakePCIID or with?

tctien342 commented 4 years ago

@lvs1974 with FakePCIID!

lvs1974 commented 4 years ago

@tctien342, yes, I can confirm - this trick works! BTW: I've got one kernel panic on wake (wake via keyboard).

tctien342 commented 4 years ago

@lvs1974 maybe some bug with voodoops2

I got two IOreg state of HDMI when it work or not: HDMI test.zip

lvs1974 commented 4 years ago

@tctien342, did you find any difference between these two ioregs? And when does not it work?

tctien342 commented 4 years ago

Screen Shot 2020-03-04 at 01 11 46

@lvs1974 this will show up after sleep, even without hdmi plug-in

lvs1974 commented 4 years ago

I replaced VoodooI2C and VoodooI2CHID with fixed versions, and any panics! It is definitely VoodoI2C issues. Regarding audio issues: workaround is in master, AppleALC supports boot-arg alcdelay=500 (where 500 - delay in milliseconds), and DeviceProperty key alc-delay, format is the same, data type is Number. Currently I am adding fake-id functionality into AppleALC, so via device property we can add alc-device-id=709D0000 (data) and alc-vendor-id=86800000. FakePCIID is not needed any more. I attached debug version: AppleALC-1.4.8-DEBUG.zip

tctien342 commented 4 years ago

@lvs1974 so far so good, thing left:

tctien342 commented 4 years ago

As @xxxzc say, two mode of trackpad will have different power usage: Screen Shot 2020-03-04 at 10 54 35

lvs1974 commented 4 years ago

@tctien342, thank you for the info. Now I will have to reimplement a HDMI audio support for our sound card, it has been found there is a support for specific cards in Apple Alc, but nobody added these cards.

tctien342 commented 4 years ago

@lvs1974 i have some bug on HDMI that if we disconnect the hdmi, macos still have still recognize it an show in setting, it we plug back, only black screen and mouse! This problem is there from the first built!

lvs1974 commented 4 years ago

@tctien342, I saw this, but it can be easily fixed:

  1. You can choose a proper audio output and sound will work
  2. If you see black screen and mouse pointer after plugging back - change resolution for TV, it will work again.
xxxzc commented 4 years ago

GPIO mode will suck our battery but will better if we use mouse

@tctien342 it depends. 9570's cpu usage in GPIO mode is abnormal, for 9550, kernel task is always under 20% in use.

tctien342 commented 4 years ago

@lvs1974 currently using that trick

@xxxzc My 7591 in GPIO mode can up to 60% of cpu

xxxzc commented 4 years ago

@tctien342 (꒪ꇴ꒪(꒪ꇴ꒪ ;) which pin number are u using? a bad pin number will cause high cpu usage

tctien342 commented 4 years ago

@xxxzc current use your old TDPX, will revert to mine SSDT and test again

tctien342 commented 4 years ago

@lvs1974 @xxxzc , dell 7591 should use polling mode, alway <10% cpu

lvs1974 commented 4 years ago

@tctien342, I suppose in the EFI archive uploaded in this topic there is nothing for GPIO, so it should be polling mode. Is it right?

tctien342 commented 4 years ago

@lvs1974 disable SSDT-TPDX.aml, that file for enable GPIO

lvs1974 commented 4 years ago

@tctien342, I see the difference, thank you!

lvs1974 commented 4 years ago

@tctien342, could you give attached version a try, I tried to reduced cpu usage in polling mode. VoodooI2C.zip

tctien342 commented 4 years ago

@lvs1974 as i know, if u increase INTERRUPT_SIMULATOR_TIMEOUT , the report of trackpad per seccond will decrease too. as default we got 5 in config so the report can up to 200/s, increase to 14 will be ~71/s, so it not smooth when using

Default config only suck about 7% cpu on kernel_task, so it may not an big problem to have smoother trackpad

lvs1974 commented 4 years ago

@tctien342, it is a good idea to check whether ac adapter is connected. I will check.

lvs1974 commented 4 years ago

@tctien342, I made some major optimisations in code for polling mode, could you check it again, please? I don't think we need to detect AC adapter, now I set timer interval INTERRUPT_SIMULATOR_TIMEOUT to 3 ms, and it cannot be less than 1 ms. I think current version is a good balance between performance and smoothness. VoodooI2C.zip

tctien342 commented 4 years ago

@lvs1974 okay, will test an report you late

lvs1974 commented 4 years ago

In this attached version I implemented adaptive timer interval for polling mode: if we touchpad is used - interval 3 ms, in idle mode - 15 ms. VoodooI2C.zip

tctien342 commented 4 years ago

@lvs1974 much better now, all test in battery mode:

tctien342 commented 4 years ago

@lvs1974 seem like this kext not working in clover, can you test it ? INSPIRON-759x-CLOVER-200308.zip

lvs1974 commented 4 years ago

@lvs1974 seem like this kext not working in clover, can you test it ? INSPIRON-759x-CLOVER-200308.zip

But how can it be so? Did you disable GPIO and interrupt mode in Clover? I will check later.

tctien342 commented 4 years ago

@lvs1974 revert to my old voodooi2c it work well

lvs1974 commented 4 years ago

@lvs1974 revert to my old voodooi2c it work well

With this Clover I don't have even keyboard. Strange.

lvs1974 commented 4 years ago

I fixed this. It is related to possibility of kext VoodooI2CHID to be loadable via recovery. VoodooI2C.zip

tctien342 commented 4 years ago

@lvs1974 okay, it work well now

lvs1974 commented 4 years ago

@tctien342, please update all VoodooI2C and CpuTscSync binaries, previous ones will work only under Catalina. https://github.com/lvs1974/VoodooI2C/releases https://github.com/lvs1974/CpuTscSync/releases

lvs1974 commented 4 years ago

@tctien342, could you possibly test a new version of VoodooI2C: https://github.com/lvs1974/VoodooI2C/releases Fix kernel panics after wake I think I have managed to improve a bit text selection and dragging (when touchpad button is pressed).