Macbook keyboard and touchpad not recognised on MacBook Pro

Ubuntu Version: 24.10

Desktop Environment (if applicable): Unsure. Can be provided if I’m told where to look!

Problem Description: When I first got my MacBook, the in-built keyboard and touchpad worked as expected. After installing Ubuntu, neither the keyboard nor the touchpad have ever responded to any presses
Mice and keyboards plugged into external docking stations have always worked as expected
Ctrl+Alt+F3 into a virtual terminal and typing does not result in a working keyboard

I have found https://askubuntu.com/questions/1282260/on-board-keyboard-and-trackpad-not-working-20-04/1282269, but the underlying issue was fixed in 2020?

I have seen https://askubuntu.com/questions/1506951/laptop-keyboard-not-working-when-trying-to-install-ubuntu-23-10

The laptop has been restarted many times. I have upgraded to Ubuntu 24.10 today, but the keyboard and touchpad are still unresponse

Relevant System Information: MacBookPro 16.1

Screenshots or Error Messages:

sudo lshw -businfo does not show any keyboard

lspci does not show any keyboard

cat /sys/class/dmi/id/chassis_type returns 9, rather than 10, 31, or 32

sudo lshw | grep product >file:

    product: MacBookPro16,1
          product: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
          product: Intel Corporation
             product: 6th-10th Gen Core Processor PCIe Controller (x16)
                product: Navi 10 XL Upstream Port of PCI Express Switch
                   product: Navi 10 XL Downstream Port of PCI Express Switch
                      product: Navi 14 [Radeon RX 5500/5500M / Pro 5500M]
             product: Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8)
                product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                      product: JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                      product: JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018]
                         product: xHCI Host Controller
                         product: xHCI Host Controller
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
             product: Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x4)
                product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                      product: JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
                      product: JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018]
                         product: xHCI Host Controller
                         product: xHCI Host Controller
                            product: USB3.2 Hub
                               product: USB3.2 Hub
                               product: USB 10/100/1000 LAN
                   product: JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018]
             product: CoffeeLake-H GT2 [UHD Graphics 630]
             product: Cannon Lake PCH Thermal Controller
             product: Cannon Lake PCH USB 3.1 xHCI Host Controller
                product: xHCI Host Controller
                   product: USB2.1 Hub
                      This lists the external keyboard and mouse, which I know works
                product: xHCI Host Controller
             product: Cannon Lake PCH Shared SRAM
             product: Cannon Lake PCH HECI Controller
             product: Cannon Lake PCH PCI Express Root Port #17
                product: APPLE SSD AP1024N
                product: T2 Bridge Controller
                product: T2 Secure Enclave Processor
                product: Apple Audio Device
             product: Cannon Lake PCH PCI Express Root Port #1
                product: BCM4364 802.11ac Wireless Network Adapter
             product: Cannon Lake PCH Serial IO UART Host Controller
             product: Intel Corporation
                product: PnP device PNP0c02
                product: PnP device APP000b
                product: PnP device PNP0c02
             product: Cannon Lake PCH SMBus Controller
             product: Cannon Lake PCH SPI Controller
       product: Lid Switch
       product: Power Button
       product: Sleep Button
       product: Power Button
       product: Video Bus
       product: Video Bus

Try Ubuntu 22.04.
At my computer it is running.
The problems start from 24.04.

Tried a downgrade to 22.04. No joy :frowning:

Please keep the ideas coming!

I don’t have one of those Macs handy, which I believe was manufactured in 2019, and so may have a T2 chip.

The T2 chip is particularly relevant here. On MacBook Pro models with the T2 security chip, additional drivers and configuration are often needed to get the internal keyboard and trackpad working properly.

The applespi module may be required for this (again, I don’t have access to the machine, so can’t be sure).

Available module parameters:

modinfo applespi | grep ^parm
parm:           fnmode:Mode of Fn key on Apple keyboards (0 = disabled, [1] = fkeyslast, 2 = fkeysfirst) (uint)
parm:           fnremap:Remap Fn key ([0] = no-remap; 1 = left-ctrl, 2 = left-shift, 3 = left-alt, 4 = left-meta, 6 = right-shift, 7 = right-alt, 8 = right-meta) (uint)
parm:           iso_layout:Enable/Disable hardcoded ISO-layout of the keyboard. ([0] = disabled, 1 = enabled) (bool)
parm:           touchpad_dimensions:The pixel dimensions of the touchpad, as XxY+W+H . (string)

Let’s try the basic setup first:

  1. Remove any existing module:
sudo modprobe -r applespi
  1. Load the module:
sudo modprobe applespi
  1. Check kernel logs for any relevant messages:
sudo dmesg | grep -i apple

The driver should automatically handle the SPI interface initialization through ACPI methods (SIEN and SIST). If there are any specific errors in the kernel logs, please share them and we can investigate further.

Also worth noting that this driver requires proper ACPI support for the device (APP000D ACPI device ID). Could you check if this device is present in your ACPI tables?

sudo apt update
sudo apt install acpica-tools
sudo acpidump | grep -A 5 APP000D
2 Likes

Thank you

No visible responses in Terminal for

sudo modprobe -r applespi

or

sudo modprobe applespi

I see responses for these:

sudo apt update
sudo apt install acpica-tools

And run

sudo apt autoremove

on Ubuntu’s recommendation

Finally,

sudo dmesg | grep -i apple

results in the following things mentioning errors:

[    0.324169] apple-properties: device path parse error -19 at 0x14:
...
[    1.999568] apple_gmux: Found gmux version 5.0.0 [T2]
[    2.280914] brcmfmac 0000:05:00.0: Direct firmware load for brcm/brcmfmac4364b3-pcie.apple,bali-HRPN-u-7.7-X0.bin failed with error -2
[    2.281084] brcmfmac 0000:05:00.0: Direct firmware load for brcm/brcmfmac4364b3-pcie.apple,bali-HRPN-u-7.7.bin failed with error -2
[    2.281450] brcmfmac 0000:05:00.0: Direct firmware load for brcm/brcmfmac4364b3-pcie.apple,bali-HRPN-u.bin failed with error -2
[    2.281732] brcmfmac 0000:05:00.0: Direct firmware load for brcm/brcmfmac4364b3-pcie.apple,bali-HRPN.bin failed with error -2
[    2.281875] brcmfmac 0000:05:00.0: Direct firmware load for brcm/brcmfmac4364b3-pcie.apple,bali-X0.bin failed with error -2
[   54.923227] applesmc: probe of applesmc.768 failed with error -5
[  110.595150] applesmc: driver init failed (ret=-5)!
[  164.944103] applesmc: probe of applesmc.768 failed with error -5
[  220.795841] applesmc: driver init failed (ret=-5)!

Try giving us the output of xinput (or at least the relevant parts) and sudo libinput list-devices (you’ll probably need to install the libinput-bin package first). I’m a little surprised nothing is in lshw but what you might want to do is just run it without the grep and excise out the important parts.

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer:15                     	id=6	[slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:15            	id=7	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:15            	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ xwayland-keyboard:15                    	id=9	[slave  keyboard (3)]

Sorry, I should have added, after you run:

sudo modprobe applespi

Run:

lsmod | grep apple

And please paste the results, to show if the module was loaded.

Yep it’s not there. What about the fuller lshw?

sudo lshw shows my keyboard and mouse plugged into my USB hub, but not the built-in keyboard or touchpad

sudo modprobe applespi
lsmod | grep apple
returns
applespi 49152 0