Bug 2166209
Summary: | MacBookPro14,1 Keyboard Non-Working During Boot | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Steffan <jonathansteffan> | ||||||||
Component: | dracut | Assignee: | Pavel Valena <pvalena> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 37 | CC: | acaringi, adscvr, airlied, alciregi, bskeggs, dracut-maint-list, hdegoede, hpa, jamacku, jarodwilson, jglisse, josef, kernel-maint, lgoncalv, linville, lnykryn, ludek.smolik, masami256, mchehab, ptalbert, pvalena, steved | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2023-03-28 11:06:21 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Jonathan Steffan
2023-02-01 07:23:19 UTC
Created attachment 1941475 [details]
hardware specifics
`lshw` running the rawhide kernel
Thank you for your detailed bugreport. I see that you have already found the dracut.conf workaround yourself. I believe that the right fix for this is to make dracut treat the spi_pxa2xx_platform module the same as the i8042 driver for ps2 keyboards and make dracut include it in the initrd when either hostonly=n, or when it is loaded on the machine. I'll attach a quick test patch for this, to apply run: cd / sudo patch -p0 < dracut-test-patch Drop your custom /etc/dracut.conf.d./spi_pxa2xx_platform.conf file and then regenerate an initrd, and see if that initrd still works. If you can confirm that this change works, then I'll submit it to upstream dracut and coordinate with the Fedora dracut maintainer about getting this change into Fedora. Created attachment 1941480 [details]
dracut patch which should fix this
Hans, Thanks for the quick reply. I'm currently re-installing the hardware with the release live image, but unfortunately I don't have access to the patch you are suggesting. (In reply to Jonathan Steffan from comment #4) > Thanks for the quick reply. I'm currently re-installing the hardware with > the release live image, but unfortunately I don't have access to the patch > you are suggesting. The patch is attached to this bug, see the attachment list near the top of the bugzilla page. Hans, I get the following message when accessing https://bugzilla.redhat.com/attachment.cgi?id=1941480 ``` Sorry, you are not authorized to access attachment #1941480 [details]. ``` My bad, bugzilla has new defaults where it marks attachments as private by default and I remove the private mark from the comment assuming that would make the attachment non private, but it has its own private flag... You should be able to access it now. Hans, It works as expected. Thanks. (In reply to Jonathan Steffan from comment #8) > Hans, > > It works as expected. Thanks. Sorry if it was not clear. The patch to /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh does fix the keyboard input issues. Thank you for testing. When I can make some time for this I'll submit a pull-request to dracut upstream and see if I can get this included as a downstream Fedora patch for now. Changing component to dracut. Fedora dracut maintainers see the attached patch (which directly patches an installed dracut) for a fix for this. The logic behind the patch is that just like the i8042 module which is needed for ps/2 keyboards found on many PCs on some MacBooks the spi_pxa2xx_platform module is necessary because it is the driver for the bus (SPI in this case) to the keyboard. The patched section honors the hostonly flag, so the module will only be included when necessary. I think it would be good to add this as a downstream patch to Fedora for now. I plan to submit a pull-req for this upstream, but I'm quite swamped with work. So if you have time I would not mind if you submit it upstream instead :) Dracut maintainers, I tried applying this as a patch and have not yet understood how %autosetup works. %autosetup -S git_am seems to not like my patch. ``` diff --git a/dracut.spec b/dracut.spec index 0f89845..f0c31c0 100644 --- a/dracut.spec +++ b/dracut.spec @@ -7,7 +7,7 @@ %global __requires_exclude pkg-config # rpmdev-bumpspec and releng automation compatible variable -%global baserelease 6 +%global baserelease 7 Name: dracut Version: 057 @@ -45,6 +45,10 @@ Patch2: 1991-feat-dmsquash-live-add-new-dmsquash-live-autooverlay.patch # https://github.com/dracutdevs/dracut/pull/2037 Patch3: 2037-Add-sysctl-to-initramfs-to-handle-modprobe-files.patch +# Add spi-pxa2xx-platform for luks unlock input support for apple hardware +# https://bugzilla.redhat.com/show_bug.cgi?id=2166209 +Patch4: rhbz-attachment-1941480-add-spi-pxa2xx-platform.patch + BuildRequires: bash BuildRequires: git-core BuildRequires: pkgconfig(libkmod) >= 23 @@ -444,6 +448,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Fri Feb 17 2023 Jonathan Steffan <jsteffan> - 057-7 +- Add spi-pxa2xx-platform for luks unlock input support for apple hardware + * Thu Jan 19 2023 Fedora Release Engineering <releng> - 057-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild ``` Created attachment 1944926 [details]
gendiff dracut-057 against rawhide source
Checking patch test/container/Dockerfile-Fedora-latest... Checking patch test/container/Dockerfile-OpenSuse-latest... Applied patch man/dracut.cmdline.7.asc cleanly. Applied patch modules.d/90dmsquash-live-autooverlay/create-overlay-genrules.sh cleanly. Applied patch modules.d/90dmsquash-live-autooverlay/create-overlay.sh cleanly. Applied patch modules.d/90dmsquash-live-autooverlay/module-setup.sh cleanly. Applied patch pkgbuild/dracut.spec cleanly. Applied patch test/TEST-16-DMSQUASH/create-root.sh cleanly. Applied patch test/TEST-16-DMSQUASH/test-init.sh cleanly. Applied patch test/TEST-16-DMSQUASH/test.sh cleanly. Applied patch test/container/Dockerfile-Arch cleanly. Applied patch test/container/Dockerfile-Debian cleanly. Applied patch test/container/Dockerfile-Fedora-latest cleanly. Applied patch test/container/Dockerfile-OpenSuse-latest cleanly. + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/2037-Add-sysctl-to-initramfs-to-handle-modprobe-files.patch + /usr/bin/git am --reject -q Checking patch modules.d/90kernel-modules/module-setup.sh... Hunk #1 succeeded at 156 (offset 9 lines). Applied patch modules.d/90kernel-modules/module-setup.sh cleanly. + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/rhbz-attachment-1941480-add-spi-pxa2xx-platform.patch + /usr/bin/git am --reject -q Checking patch modules.d/90kernel-modules/module-setup.sh... Applied patch modules.d/90kernel-modules/module-setup.sh cleanly. fatal: empty ident name (for <>) not allowed error: Bad exit status from /var/tmp/rpm-tmp.fdnlur (%prep) Bad exit status from /var/tmp/rpm-tmp.fdnlur (%prep) RPM build errors: DEBUG: Child return code was: 1 Hello, I've created an upstream PR: https://github.com/dracutdevs/dracut/pull/2218 as well as prepared upgrade with the change for Rawhide: https://src.fedoraproject.org/rpms/dracut/pull-request/29 (Note: MODIFIED usually means the change is commited in dist-git) With the merge for Rawhide I'll build for F38 as well as for F37 (& will inform in devel ML). Pavel, I can confirm the rawhide build fixes the issue with this hardware. Testing process was: 1) usb boot rawhide live on the affected hardware https://koji.fedoraproject.org/koji/taskinfo?taskID=97742383 2) install w/enabling luks full disk encryption 3) first boot, no keyboard working; add usb external keyboard and finish boot 4) add copr pvalena/dracut and update dracut, dracut -f [...], reboot 5) keyboard is working as expected. lsinitrd confirms spi-pxa2xx-platform is included Thanks for checking! There were further questions in the upstream PR: https://github.com/dracutdevs/dracut/pull/2218 Pavel, dracut-059-3 has landed in the Rawhide live composes. I can report that Fedora-Workstation-Live-Rawhide-20230225.n.0 (https://koji.fedoraproject.org/koji/buildinfo?buildID=2159709) installs and the keyboard works for LUKS passphrase input. Fedora-Workstation-Live-38-20230225.n.0 (https://koji.fedoraproject.org/koji/buildinfo?buildID=2159762) still has the issue, but dracut was not yet listed in the Fedora 38 compose report. I'll keep an eye on the F38 compose for when dracut-059-3+ lands and report back. I'm also glad to see upstream merged the change. Pavel, I'm glad to report that Fedora-Workstation-Live-38-20230326.n.1 (https://koji.fedoraproject.org/koji/buildinfo?buildID=2175839) installs and the keyboard works for LUKS passphrase input. Thanks for the verification! It still doesn't work for me (I have to use an external usb keyboard). Macbook Pro 16"(2019), 6.7.6-201.fsync.fc39.x86_67 |