Xiashangning/BigSurface

Catalina on Surface Laptop 1. Keyboard or Mouse intermittent issue

Closed this issue · 10 comments

Everything works, but only some of the time.

30-50% of the time, either keyboard or mouse will not work. Sometimes both dont work. I reboot a couple of times and suddenly both work. Any ideas how I can debug this issue? Do you need some kind of log?

Load DebugEnhancer.kext, boot into macOS and attach the output of sudo dmesg | grep -E "VoodooUART|SurfaceS|SurfaceB|SurfaceH"

@Xiashangning
Archive.zip
I retrieved logs as requested for all 3 scenarios. I only had to restart about 5 times to get these so its happening pretty frequent.

Scenarios:

  1. Trackpad works but no keyboard
  2. Keyboard works but no trackpad
  3. Keyboard and track both work flawlessly

See attached archive, thanks. Let me know if there are additional debugging steps I can do.

It is also worth noting that once it is booted with keyboard and trackpad both working, they will continue to work until reboot.

I installed Ventura to see if it would be any better. Similar issue. The battery charge icon takes about 10 seconds before it shows in the top right corner. The keyboard starts working only AFTER the battery icon appears in top right corner. (some times) What could explain this behaviour? Maybe load order of something is bad?? I double checked your instructions and I am loading BigSurface in the order specified. @Xiashangning

config.zip

It is also worth noting that once it is booted with keyboard and trackpad both working, they will continue to work until reboot.

While I am looking into this issue, I will try to explain a little how and why this happens. Or just for reference.

Whether or not a component will work depends on its driver being correctly loaded or not. For your trackpad (SL1/2), it is driven by VoodooI2C. For battery and keyboard, it is BigSurface and depends on VoodooUART. As you can see in your output, there are a lot of errors regarding SurfaceSerialHubDriver send message to UART hardware. This issue is however known already for last gen UART hardware. Maybe I have missed some necessary settings (the code was ported from linux). As a result, the behaviour is not as stable as that on SP7 or SL3, especially for the first 20-30 seconds (the transmission is almost unusable for large data). The problem might come from that I have moved forward the publishing time for hid nub (responsible for your keyboard) because I was trying to solve another issue back then. So there are too many errors produced and overwhelmed the driver so it fails to load itself.

Please try this build
BigSurface.kext.zip

Thanks for the explanation. So it seems like the initial communication is what it causes the problem? Can we somehow implement a delay or delay before devices go live?

Your posted kext does not seem to make any difference. Although I have noticed since upgrading to ventura, trackpad now always works. I have not booted once with trackpad not working.

Now it is just the keyboard and battery indicator that work intermittently.

Something that seems to work is waiting before using keyboard. Wait for about 10 seconds or so after welcome screen show until the battery icon renders in the corner. (This takes about 10 seconds). When the battery icon loads, I can use the keyboard. If i try to use the keyboard before the icon shows, it is doomed and wont load, reboot is required.

Is it normal for battery icon to take 10 seconds + to show?

Can you attach the output after waiting battery icon to show up?
Copy the output directly from the terminal
sudo dmesg | grep -E "SurfaceS|SurfaceH|SurfaceB"

Can we somehow implement a delay or delay before devices go live?

Yes, it is already implemented and the delay is 20 seconds.

Is it normal for battery icon to take 10 seconds + to show?

Not normal. For example, SP6 which has the same hardware as SL1, with 20s delay, does not produce too many errors. And the battery can show up before the welcome screen shows. Maybe the initialization config for the hardware is different? If you would like to solve this with me, please install Ubuntu and follow the instructions here #21 (comment)

Hey @Xiashangning sorry for not responding quicker. I have given the laptop to my wife and she is actually using it now daily, so I have not had some time to spend with it.

I will try today to assist in this. Do I need to install ubuntu internally or can it be booted from USB?

You can install it on the USB drive. But you do need to install it. After that you can proceed with the instructions in the link