Skip to content

Macbook: enable internal keyboard at LUKS - #1313

Merged
dhh merged 12 commits into
omacom:devfrom
joelgaff:fix-macbook-keyboard
Sep 14, 2025
Merged

dhh merged 12 commits into
omacom:devfrom
joelgaff:fix-macbook-keyboard

Conversation

@joelgaff

@joelgaff joelgaff commented Aug 30, 2025 •

Copy link
Copy Markdown
Contributor

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.

@dhh

dhh commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

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?

@dhh
dhh changed the base branch from master to dev August 30, 2025 05:47
@vikks

vikks commented Aug 30, 2025

Copy link
Copy Markdown

I can confirm macbook Pro 12 needs broadcom-wl driver for wifi.

@joelgaff

Copy link
Copy Markdown
Contributor Author

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?

@dhh

dhh commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

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?

@joelgaff

joelgaff commented Aug 30, 2025 •

Copy link
Copy Markdown
Contributor Author

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?..

@brink-lab

brink-lab commented Aug 31, 2025 •

Copy link
Copy Markdown
Contributor

@joelgaff @vikks
A PR for inclusion of WiFi firmware for macs is in progress here #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.

@joelgaff

joelgaff commented Sep 1, 2025 •

Copy link
Copy Markdown
Contributor Author

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.

@joelgaff joelgaff changed the title T1 Macbook: enable internal keyboard at LUKS Macbook: enable internal keyboard at LUKS Sep 2, 2025
@joelgaff

joelgaff commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

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

@flozano

flozano commented Sep 2, 2025

Copy link
Copy Markdown

just to confirm: MBP 13,1 (2016, without touchbar) also suffers from the keyboard issue. During install, however, it worked well.

@flozano

flozano commented Sep 2, 2025

Copy link
Copy Markdown

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.

@joelgaff

joelgaff commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

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?

@flozano

flozano commented Sep 3, 2025

Copy link
Copy Markdown

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.

@omygolly

omygolly commented Sep 3, 2025

Copy link
Copy Markdown

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.

@joelgaff

joelgaff commented Sep 3, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @omygolly and @flozano !

@joelgaff
joelgaff force-pushed the fix-macbook-keyboard branch from 3582cd9 to 77e6302 Compare September 5, 2025 15:11
@dhh
dhh requested a review from ryanrhughes September 9, 2025 18:03
@ryanrhughes
ryanrhughes changed the base branch from dev to offline-iso-installer September 13, 2025 00:09
@ryanrhughes
ryanrhughes changed the base branch from offline-iso-installer to dev September 14, 2025 04:27
ryanrhughes and others added 6 commits September 14, 2025 00:33
…ramfs

- 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
- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope
joelgaff and others added 4 commits September 14, 2025 00:33
- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution
from “omarchy” to “macbook” which is more appropriate.
@dhh
dhh merged commit e018692 into omacom:dev Sep 14, 2025
ryanrhughes added a commit that referenced this pull request Sep 14, 2025
* macbook: enable internal keyboard at LUKS by loading applespi in initramfs

- 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

* macbook: expand SPI keyboard support to include 12-inch MacBook

- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope

* Integrate MacBook SPI keyboard detection into limine-snapper.sh

- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution

* Add support for MacbookPro13,1 and 14,1 models

* change log tags

from “omarchy” to “macbook” which is more appropriate.

* Slim down and rearrange code

* Unrelated change

* More specific naming and make sure its actually run

---------

Co-authored-by: Ryan Hughes <[email protected]>
Co-authored-by: David Heinemeier Hansson <[email protected]>
manuel1618 pushed a commit to manuel1618/omarchy that referenced this pull request Sep 15, 2025
* macbook: enable internal keyboard at LUKS by loading applespi in initramfs

- 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

* macbook: expand SPI keyboard support to include 12-inch MacBook

- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope

* Integrate MacBook SPI keyboard detection into limine-snapper.sh

- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution

* Add support for MacbookPro13,1 and 14,1 models

* change log tags

from “omarchy” to “macbook” which is more appropriate.

* Slim down and rearrange code

* Unrelated change

* More specific naming and make sure its actually run

---------

Co-authored-by: Ryan Hughes <[email protected]>
Co-authored-by: David Heinemeier Hansson <[email protected]>
hamidriaz1998 pushed a commit to hamidriaz1998/omarchy that referenced this pull request Sep 18, 2025
* macbook: enable internal keyboard at LUKS by loading applespi in initramfs

- 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

* macbook: expand SPI keyboard support to include 12-inch MacBook

- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope

* Integrate MacBook SPI keyboard detection into limine-snapper.sh

- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution

* Add support for MacbookPro13,1 and 14,1 models

* change log tags

from “omarchy” to “macbook” which is more appropriate.

* Slim down and rearrange code

* Unrelated change

* More specific naming and make sure its actually run

---------

Co-authored-by: Ryan Hughes <[email protected]>
Co-authored-by: David Heinemeier Hansson <[email protected]>
dhcrzf pushed a commit to dhcrzf/omarchy that referenced this pull request Sep 18, 2025
* macbook: enable internal keyboard at LUKS by loading applespi in initramfs

- 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

* macbook: expand SPI keyboard support to include 12-inch MacBook

- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope

* Integrate MacBook SPI keyboard detection into limine-snapper.sh

- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution

* Add support for MacbookPro13,1 and 14,1 models

* change log tags

from “omarchy” to “macbook” which is more appropriate.

* Slim down and rearrange code

* Unrelated change

* More specific naming and make sure its actually run

---------

Co-authored-by: Ryan Hughes <[email protected]>
Co-authored-by: David Heinemeier Hansson <[email protected]>
@grin

grin commented Sep 25, 2025

Copy link
Copy Markdown

@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

@joelgaff

Copy link
Copy Markdown
Contributor Author

@grin what model MBP do you have? (ie. 13,1)

@grin

grin commented Sep 26, 2025 •

Copy link
Copy Markdown

@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.

@joelgaff

Copy link
Copy Markdown
Contributor Author

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!

@grin

grin commented Sep 26, 2025 •

Copy link
Copy Markdown

@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

@grin

grin commented Sep 26, 2025

Copy link
Copy Markdown

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

@joelgaff

Copy link
Copy Markdown
Contributor Author

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 #1957. And let me know if you see any gaps there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants