SkyrilHD / VoodooPS2-ALPS

Refined macOS driver for ALPS TouchPads
Other
24 stars 5 forks source link

Dell E7470 system freeze after using the computer for a few minutes #16

Closed teddy2104 closed 2 years ago

teddy2104 commented 2 years ago

OC: 0.7.7 OS: Monterey 12.2 alps.log System Report

SkyrilHD commented 2 years ago

Can you send a panic log with the attached kext? Also, is it easy to reproduce? If so, how (e.g. touching the corner of the touchpad)?

VoodooPS2Controller-1.0.7-DEBUG.zip

teddy2104 commented 2 years ago

Can you send a panic log with the attached kext? Also, is it easy to reproduce? If so, how (e.g. touching the corner of the touchpad)?

VoodooPS2Controller-1.0.7-DEBUG.zip

Do I need to use the DEBUG version and when it panic I compress and send you that kext? Sorry, I’m new to Hackintosh.

SkyrilHD commented 2 years ago

Basically you replace the current kext with this one and use it normally. The functionality does not change. Debug kexts are used to output more information for logging. When the laptop panics, just send the kernel panic log.

teddy2104 commented 2 years ago

System log Boot log system-report-1.0.7-DEBUG.log

quynkk1 commented 2 years ago

I have same problem with macOS Monterey 12.2. In macOS 11.6.x this kext is working very well. I'm using Dell Latitude E5570 with ALPS Trackpad V8 Panic Log: panic log.txt EDIT: Sometime cursor randomly jump and I need to wait few seconds before I can use trackpad again.

SkyrilHD commented 2 years ago

Can you try the kext attached below? In addition, can you get real-time logging and save it to a file? This command should be enough: log stream | grep 'ALPS' > alps.log. Let the logging run in background and use the trackpad as usual.

VoodooPS2Controller-1.0.7-DEBUG.zip

SkyrilHD commented 2 years ago

@teddy2104 @quynkk1 Can you try the fix and report back with feedback? https://github.com/SkyrilHD/VoodooPS2/actions/runs/2385031854

Multitouch gestures should work even better, as there are no virtual fingers.

quynkk1 commented 2 years ago

I have tried the fix, keyboard works fine but trackpad and trackpoint don't work anymore. system.log

boot.log

SkyrilHD commented 2 years ago

hmm the boot log only shows that the packets are dropping. But the log looks very empty, did you use the debug version?

Also, the trackstick should work fine, as I did no changes to it. Can you try cold booting? (shutdown and start the laptop)

quynkk1 commented 2 years ago

I tested this version (You have built this before) and it worked well, but I noticed that when you tapped 2 finger at same time (nah I mean right-click) I need to wait 1-2 seconds for menu show up

SkyrilHD commented 2 years ago

Try disabling Smart Zoom in the trackpad settings.

SkyrilHD commented 2 years ago

Can you try this commit? I changed the code for trackstick, but I cannot test as my E7250 has no trackstick. To avoid multiple IOHIDPointing, I removed the code from the ALPS code to use VoodooTrackpoint from VoodooInput.

https://github.com/SkyrilHD/VoodooPS2/actions/runs/2440514063

quynkk1 commented 2 years ago

Tested with DEBUG variant on macOS 12.4. Only keyboard work, trackpad and trackpoint both stopped working (although I have cold-restarted laptop and pressed Reset NVRAM). This is my log, you can check here: Debug_Log.zip

SkyrilHD commented 2 years ago

Hmm, nothing about VoodooPS2 at all. Try adding DebugEnhancer to your EFI to allow more log entries. Then use this command in Terminal to grab the logs: sudo dmesg > ps2.log Also, if you have SMCDellSensors, remove it as it causes issues with trackpad communication.

SkyrilHD commented 2 years ago

@quynkk1 Can you test the latest build of VoodooPS2? https://github.com/SkyrilHD/VoodooPS2/actions/runs/2524741295

quynkk1 commented 2 years ago

I have tested lastest build with SMCDellSensor disabled and added DebugEnhancer, keyboard working well but both trackpad and trackstick still nothing. I found that x and y coordinate are very high. image This is my boot log: Boot.txt

SkyrilHD commented 2 years ago

Can you try setting the IOProbeScore larger than 6000? (e.g. 6500 or 7000) Can be found in VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Trackpad.kext/Contents/Info.plist/IOKitPersonalities/ALPS GlidePoint

image

Also, does it not work every boot or every after x-times boot? I find it weird that the touchpad is reporting just fine, but VoodooInput fails to pass the input to macOS. Furthermore, I see A LOT of packets dropping. Probably due to the failed mouse reset (?)

quynkk1 commented 2 years ago

It doesn't work in every boot.

quynkk1 commented 2 years ago

I have set IOProbeScore from 6000 to 1500 and it worked perfectly. Screen Shot 2022-06-28 at 12 01 12

SkyrilHD commented 2 years ago

Hmm, thanks for testing. Now we have a problem xD: V3 touchpad only works when IOProbeScore is set to 6000 and V8 touchpad only works when IOProbeScore is set to 1500. My V7 touchpad works on both perfectly. I wonder what the issue is...

realizelol commented 2 years ago

You both on monterey? I am actually on Catalina. This evening I'll do an backup and start upgrading to monterey. I'll give it a test with IOProbeScore 1500. If it's not working we should try adding more IOKitPersonalities keys:

        <key>ALPS GlidePoint V1_V5</key>
        <dict>
            (...)
            <key>IONameMatch</key>
            <array>
                <string>pciXXXX,XXX1</string>
                <string>pciXXXX,XXX2</string>
            </array>
            <key>IOProbeScore</key>
            <integer>6000</integer>
            (...)
        </dict>
        <key>ALPS GlidePoint V6_V8</key>
        <dict>
            (...)
            <key>IONameMatch</key>
            <array>
                <string>pciXXXX,XXX3</string>
                <string>pciXXXX,XXX4</string>
            </array>
            <key>IOProbeScore</key>
            <integer>1500</integer>
            (...)
        </dict>

I think V1-V5 are older touchpads and they need more time.

If it's just the OS we could try something like:

                    <key>Darwin 16+</key>
                    <dict>
                        (...)
                        <key>IOProbeScore</key
                        <integer>6000</integer>
                    </dict>
                    <key>Darwin 20+</key>
                    <dict>
                        (...)
                        <key>IOProbeScore</key
                        <integer>1500</integer>
                    </dict>

PS: I don't know what I am doing, it's just an idea.

best regards realizelol

realizelol commented 2 years ago

Ah this is totally crazy. I don't get it working correctly. E.g. 9000 will break it completely (Touch/Stick/Keyboard). 6000 ans 1500 are "working" but not fully recognized, as in Catalina with IOProbeScore 1500.

I'll hope I can do a furrher invest on it tomorrow.

SkyrilHD commented 2 years ago

Thank you for your investigation. If that's OK, I will change the IOProbeScore back to 1500 as default to support V8 touchpads since they are the newest PS2 device and V3 users have to change the IOProbeScore back to 6000 until a fix has been found.

SkyrilHD commented 2 years ago

@quynkk1 Is it possible to test this kext? VoodooPS2Controller-2.2.9-DEBUG.zip

I added a new property (V8RegisterTime; will need to find a better name) which will V8 touchpads wait 4,5s (by default) before continuing setting protocols.

If the touchpad does not work, try increasing/decreasing the value and check if that helps. image

Try to avoid changing the IOProbeScore since that is our goal right now.

realizelol commented 2 years ago
[    0.407431]: Refusing new kext me.kishorprins.VoodooInput, v1.1.3: a prelinked copy with a different executable UUID is already present.
[    0.407553]: Refusing new kext me.kishorprins.VoodooInput, v1.1.3: a prelinked copy with a different executable UUID is already present.
[    1.029291]: VoodooPS2Elan: Version 2.2.9 starting on OS X Darwin 21.5.
[    1.452125]: VoodooPS2Elan: send magic knock to the device.
[    1.473682]: VoodooPS2Elan: unexpected magic knock result 0x00, 0x02, 0x64.
[    1.473685]: VoodooPS2Elan: elan touchpad not detected
[    1.473701]: VoodooPS2SynapticsTouchPad: Version 2.2.9 starting on OS X Darwin 21.5.
[    1.473742]: VoodooPS2Trackpad: sending final init sequence...
[    1.586393]: VoodooPS2Trackpad: Identify bytes = { 0x0, 0x0, 0xc8 }
[    2.586780]: VoodooPS2Trackpad: Identify TouchPad command returned incorrect byte 2 (of 3): 0x00
[    3.799731]: ApplePS2ALPSGlidePoint: Version 2.2.9 starting on OS X Darwin 21.5.
[    3.799745]: ApplePS2ALPSGlidePoint: probe entered...
[    6.736884]: ApplePS2ALPSGlidePoint: e6 report: [0x00 0x00 0x64]
[    6.757971]: ApplePS2ALPSGlidePoint: e7 report: [0x73 0x03 0x0a]
[    6.776314]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    6.776317]: ApplePS2ALPSGlidePoint: exit command mode
[    6.778764]: ApplePS2ALPSGlidePoint: Touchpad with Signature { 115, 3, 10 }
[    6.778768]: ApplePS2ALPSGlidePoint: Found a V3 Rushmore TouchPad with ID: E7=0x73 0x03 0x0a, EC=0x88 0x08 0x22
[    6.778780]: ApplePS2ALPSGlidePoint: enter command mode
[    6.792241]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    6.818674]: ApplePS2ALPSGlidePoint: exit command mode
[    6.821123]: ApplePS2ALPSGlidePoint: TrackStick detected...
[    6.821134]: ApplePS2ALPSGlidePoint: logical_max 2047x1535 physical_max 8188x6907 upmm 50x50
[    6.821140]: ApplePS2ALPSGlidePoint: TouchPad driver started...
[    6.821154]: VoodooPS2Mouse: Version 2.2.9 starting on OS X Darwin 21.5.
[    6.826900]: ApplePS2ALPSGlidePoint: passthrough mode enable=1
[    6.826904]: ApplePS2ALPSGlidePoint: enter command mode
[    6.840294]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    6.872937]: ApplePS2ALPSGlidePoint: exit command mode
[    6.904592]: ApplePS2ALPSGlidePoint: e7 report: [0x42 0x02 0x3c]
[    6.945500]: ApplePS2ALPSGlidePoint: Sent magic E6 sequence
[    6.945504]: ApplePS2ALPSGlidePoint: enter command mode
[    6.969345]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    6.996365]: ApplePS2ALPSGlidePoint: exit command mode
[    6.998831]: ApplePS2ALPSGlidePoint: passthrough mode enable=0
[    6.998837]: ApplePS2ALPSGlidePoint: enter command mode
[    7.013612]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    7.046440]: ApplePS2ALPSGlidePoint: exit command mode
[    7.048906]: ApplePS2ALPSGlidePoint: enter command mode
[    7.062332]: ApplePS2ALPSGlidePoint: ec report: [0x88 0x08 0x22]
[    7.259128]: ApplePS2ALPSGlidePoint: exit command mode
[    7.267956]: ApplePS2Controller: Notification consumer published: ApplePS2ALPSGlidePoint
[    7.268628]: VoodooInputSimulatorDevice:0x10000036c start
[    7.269643]: VoodooInputActuatorDevice:0x10000036e start
[    7.269814]: VoodooInputSimulatorDevice:0x10000036c creating interfaces
[    7.269980]: VoodooInputActuatorDevice:0x10000036e creating interfaces
[   13.553473]: VoodooInputSimulatorDevice:0x10000036c Matching has vendor DeviceUsagePage : ff0c bundleIdentifier com.apple.AppleUserHIDDrivers ioclass AppleUserHIDEventService but transport and vendorID is missing
[   13.685456]: VoodooInputSimulatorDevice:0x10000036c Matching has vendor DeviceUsagePage : ff0c bundleIdentifier com.apple.AppleUserHIDDrivers ioclass AppleUserHIDEventService but transport and vendorID is missing
[   18.987643]: VoodooInputSimulatorDevice:0x10000036c new user client

With IOProbeScore 1500. I'll do some more testing after work.

But somehow my keyboard has a strange behaviour: e.g. cmd + shift + 3 or 4 (for screenshots) will not work. 4 output = h/H/- 3 output = f/F/ΓΌ

I do get a lot of these unhandled Keycodes:

VoodooPS2Keyboard: Unhandled keycode: 0xF
VoodooPS2Keyboard: Unhandled keycode: 0x38
VoodooPS2Keyboard: Unhandled keycode: 0x148

is it abnormal? Or is it because I'm swapped CMD with ALT in Systemsettings? Or having this SSDT:

DefinitionBlock ("", "SSDT", 2, "ACDT", "PS2K", 0x00000000)
{
    External (_SB_.PCI0.LPCB.PS2K, DeviceObj)

    Name (_SB.PCI0.LPCB.PS2K.RMCF, Package (0x02)
    {
        "Keyboard", 
        Package (0x04)
        {
            "Swap command and option", 
            ">n", 
            "Custom ADB Map", 
            Package (0x06)
            {
                Package (0x00){}, 
                "1d=3b", 
                "e05b=37", 
                "38=3a", 
                "e038=3d", 
                "e01d=3e"
            }
        }
    })
}

(This is some leftover of older versions.)

In Catalina 1500 IOProbeScore there was the same behaviour. With 6000 This was ok.

SkyrilHD commented 2 years ago

Try disabling the SSDT. I have no issues with the keyboard.

quynkk1 commented 2 years ago

@SkyrilHD Trackpad and trackstick don't work in your lastest build. It reported too much "an invalid or bare packet has been dropped..." This is my log: Boot.txt

SkyrilHD commented 2 years ago

Have you tried changing the V8RegisterTime value? E.g. instead of 4500 do 6000 or 1500

quynkk1 commented 2 years ago

I tried to change V8RegisterTime from 4500 to 1500 and 6000 but both trackpad and trackstick don't work. So I changed V8RegisterTime to original value (I mean 4500) and replace value of IOProbeScore from 7000 down to 1500 and trackpad and trackstick worked again.

realizelol commented 2 years ago

I think going back to 1500 is definitively okay. I'm not having any issue with trackpad in Monterey also I tried a Fresh bootstick with Catalina, in recovery (installer) there were also no problem. I think I had have a misconfigured Catalina. It was an old install of a previous Fujitsu (10.13) 1:1 copy to E6540 Upgrade to 10.14 + 10.15.

[    5.761203]: ApplePS2ALPSGlidePoint: Touchpad with Signature { 115, 3, 10 }
[    5.761208]: ApplePS2ALPSGlidePoint: Found a V3 Rushmore TouchPad with ID: E7=0x73 0x03 0x0a, EC=0x88 0x08 0x22
[    5.803820]: ApplePS2ALPSGlidePoint: TrackStick detected...
[    5.803854]: ApplePS2ALPSGlidePoint: TouchPad driver started...
[    6.257280]: ApplePS2Controller: Notification consumer published: ApplePS2ALPSGlidePoint


Yeah what should my debugging say about the funny keyboard? It's a fu##ing debug thing?!?!! I tried different kext versions/publishers - always the debug version - but none was working in "Monterey" also not in Big Sur or Catalina Recovery. Then I took an old EFI folder -> OMG it's working -> assembled both configs -> not working -> tried my old compile of VoodooP2Controller.kext (without VoodooInput/-Mouse) -> GOSH it's working -> downloaded the latest RELEASE of VoodooPS2: https://dortania.github.io/builds/?product=VoodooPS2&viewall=true&version=2.2.9&sha=2f7dac28602c490641c0cefd592bdf9e596e4538 -> HOLY s##t it's also working <- changed value of IOProbeScore manually in Info.plist to 1500 .. Also working πŸ‘πŸ» I also don't need any SSDT-P2K modification as in my previous post. 😎

It has something to do, that the unicode stuff won't move away from alt or altgr isn't detected and it stuck on alt and the number keys will have a strange behaviour 2a(L SHIFT), 38(L ALT), 5(Keyboard 4 -> should have been also 15 on pressing the key down and not 0[DEADKEY]):

[ 1144.432853]: ApplePS2Keyboard: sending key 2a=38 down
[ 1144.436136]: ApplePS2Keyboard: sending key 38=3a down
[ 1145.408073]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1145.482349]: ApplePS2Keyboard: sending key 5=15 up
[ 1145.579784]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1145.644360]: ApplePS2Keyboard: sending key 5=15 up
[ 1145.740498]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1145.802251]: ApplePS2Keyboard: sending key 5=15 up
[ 1145.902773]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1145.958087]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.061631]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1146.118739]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.216152]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1146.277421]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.383811]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1146.458079]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.561741]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1146.609316]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.695878]: ApplePS2Keyboard: sending key 5=0, 0=80 down
[ 1146.784503]: ApplePS2Keyboard: sending key 5=15 up
[ 1146.842899]: ApplePS2Keyboard: sending key 38=3a up
[ 1146.847625]: ApplePS2Keyboard: sending key 2a=38 up


That was my funny weekend. I also would have go to sleep about 1 1/2 hours ago but while I was brushing my tooth I had this idea of my old EFI. 🫣

best regards realizelol

PS: Sorry for my moaning and a good night to you guys.

SkyrilHD commented 2 years ago

As always, I appreciate your testing. I am happy that we have come to a happy end (Maybe not, since we are dealing with Alps Alpine :P)

realizelol commented 2 years ago

Yes, it's an up and down like driving in the Alps. ;)

But, sorry: After cleanup I recognized that I must have misclicked the SSDT-P2K.aml trigger. I thought it was disabled but on cleanup I recognized it was left enabled. But the funny part is that I previously tested some curious thing and downloaded sth. for the T460s (SSDT-BKRD.aml). This was tested successful with the newest VoodooPS2 6000 + 1500. After disabling the SSDT-P2K.aml the nightmare was back in place and also deleting the _DSM part result in nonfunction. Just keeping it as it is (seems like my keyboard somehow couldn't be determined correctly): SSDT-KBRD.aml.zip

quynkk1 commented 2 years ago

Yeh I tested on Dell Latitude E6330 (which has ALPS v3) and it's worked perfectly, but I clicked into trackpad setting in System Preferences, it shown No trackpad found and I needed to add SSDT-MouseAsTrackpad.dsl to get trackpad preferences back ? Log for V3 here: image

realizelol commented 2 years ago

You've tested the latest VoodooPS2 with IOProbeScore 1500 or you also had have these keyboard problems with the E6330? This is a V3 Pinnacle not a V3 Rushmore, maybe this would help:

L2358 Maybe like the V1 and V4 it also need a 0x64 before 0x28 byte. Which is the original byte of the Linux version.

    ps2_command(0x64, kDP_SetMouseSampleRate);
    ps2_command(0x28, kDP_SetMouseSampleRate);
SkyrilHD commented 2 years ago

Yeh I tested on Dell Latitude E6330 (which has ALPS v3) and it's worked perfectly, but I clicked into trackpad setting in System Preferences, it shown No trackpad found and I needed to add SSDT-MouseAsTrackpad.dsl to get trackpad preferences back ? Log for V3 here: image

You need to have battery status working otherwise trackpad settings will not be shown.

L2358 Maybe like the V1 and V4 it also need a 0x64 before 0x28 byte. Which is the original byte of the Linux version.

    ps2_command(0x64, kDP_SetMouseSampleRate);
    ps2_command(0x28, kDP_SetMouseSampleRate);

I noticed this too but did not change it as the base driver is by Dr. Hurt and I guess there is a reason why he did that? That's why I added a comment as well.

SkyrilHD commented 2 years ago

Also, will be closing this issue as VoodooPS2 2.2.9 has now been released.