Macbook: enable internal keyboard at LUKS
This fix allows MacBooks with a T1 security chip to use the built-in keyboard at LUKS (no external keyboard required as currently is the case):
- Detect T1 models (MacBookPro13,2/13,3 and 14,2/14,3)
- Add mkinitcpio drop-in: MODULES+=(applespi intel_lpss_pci spi_pxa2xx_platform)
- Add HOOKS+=(keyboard) for early input
- Prefer in-kernel applespi; fallback to DKMS via AUR helper if needed
Tested and confirmed it fixes the issue on 2016 MacBook Pro 13,3.
Brilliant! This is exactly the kind of out-of-the-box configuration I'd love to see for the entire MacBook range. I believe some models also need the broadcom-wl drivers for wifi?
I can confirm macbook Pro 12 needs broadcom-wl driver for wifi.
Thanks! Yep, I'm pretty sure my 13,3 model needs the broadcom drivers as well, possibly some graphics items, too.
Would you like me to try to add that to this PR or make a separate one?
Would be great with a PR that brings us all up on everything needed by pre-M Macs. Although maybe tackling T2 is too much inside of this?
Let me try to see if I can figure out the T1 and earlier Mac issues and add those in here. Maybe a separate PR for T2?..
@joelgaff @vikks A PR for inclusion of WiFi firmware for macs is in progress here https://github.com/basecamp/omarchy/pull/1143
My 2012 also needs broadcom-wl, and seems like some older models need the opensource b43 package. Let's test your models as part of the other PR if you want.
I'm happy to leave the wifi stuff for 1143, and I'll see if it's necessary to extend my PR to other Mac models for the keyboard stuff.
I'll try testing the WiFi fix from 1143, too.
After more research into what other MacBooks may have this keyboard issue at LUKS, I added one more model (12,1), and clarified that this issue isn't just related to T1 macs, but rather those that need SPI keyboard support.
- Added MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Renamed configuration from T1-specific to SPI-keyboard-specific terminology
- Updated mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Improved detection: covers all models with SPI keyboards needing applespi
- Updated comments and messages to reflect broader hardware support scope
just to confirm: MBP 13,1 (2016, without touchbar) also suffers from the keyboard issue. During install, however, it worked well.
I was able to confirm that the fix works with MBP 13,1 after updating so that it not only matches 13,2 and 13,3... so the statement in the headers is not correct.
just to confirm: MBP 13,1 (2016, without touchbar) also suffers from the keyboard issue. During install, however, it worked well.
Do you mean that during install you could select your timezone, enter your name/email/etc. just fine with the internal keyboard, but then at the login screen (LUKS) it didn't work?
exactly. installed everything with the laptop's keyboard. then tried several reboots, and the LUKS screen didn't work. then plugged external keyboard to boot, applied the modified script, and after a reboot I could use the laptop's keyboard in the LUKS screen.
I can confirm this work on a MacbookPro 14,1 so go ahead and change MacBookPro14,[23] to MacBookPro14,[123]. Sorry, I don't really know how github works so can't do it myself, I'm no coder.
Thanks for the feedback @omygolly and @flozano !
@joelgaff just tested Omarchy 3.0.1 on my 12-inch MacBook (2015) and the issue with the internal keyboard not working at the LUKS password prompt still exists, even though the keyboard worked fine during installation
@grin what model MBP do you have? (ie. 13,1)
@joelgaff It's 9,1.
I got confused by this line in your commit:
- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
My MacBook is this one: https://support.apple.com/en-us/112033 (Retina, 12-inch, Early 2016). So the model identifier in the commit is off.
The 2015 model is 8,1
mine (2016) is 9,1
and I believe the 2017 is 10,1.
Gotcha. Off the top of my head, I believe those models use a different method of initiating the keyboard at boot, it will look into this!
@joelgaff hmm I’m a bit confused. In the commit message you wrote you're adding support for the 2015–2017 range of 12-inch MacBooks (which I think were the first to use SPI keyboards and are the only MacBooks with 12-inch screens). But their model identifiers aren't included in the SPI check:
if [[ "$(cat /sys/class/dmi/id/product_name 2>/dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
Is MacBook12,1 actually a valid identifier? I wasn’t able to find it on Apple’s support site by googling:
"MacBook12,1" site:support.apple.com
and it also doesn’t show up in EveryMac lookup tool: https://everymac.com/ultimate-mac-lookup/?identify=MacBook12%2C1
Man, you're making me double guess myself on that 12,1. I'd have to dig back through my notes to see why I added it in there.
Regarding your original comment above, what I wasn't recalling was that the "MacBook" and "MacBookPro" have different identifiers. Since you said that your MacBook8,1 needs support, I added that (along with MacBook9,1 and MacBook10,1 is already in the pipeline via another PR).
See https://github.com/basecamp/omarchy/pull/1957. And let me know if you see any gaps there.