dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
599 stars 397 forks source link

Enter key "injected" when USB-C with power supply plugged in and being passed "Starting password query" for LUKS #2273

Open Peter-Ries opened 1 year ago

Peter-Ries commented 1 year ago

Describe the bug After migrating two laptops from mkinitcpio to dracut one laptop gets two "ghost-enter-key pressed" when an USB-C plug is connected that delivers power. The USB-C device is then deactivated and I need to enter the password on laptop keyboard. Even a dumb USB-C powersupply connected "presses enter" two times while waiting for LUKS password. Weird. I have tried 3 different kernels. All the same behaviour.

Distribution used EndeavourOS more see at the end of text.

Dracut version dracut-056-2

Init system systemd

To Reproduce Couldn't even reproduce on second laptop

Expected behavior Prevent pseudo inputs from devices on USB-C

Additional context Really hard to explain all that, as it took me 1 day goind through MB of logs a.s.o. and it was hard to compare both laptops where one is working fin (lenovo x270) and the other (lenovo t14 amd) doing weird stuff that appeared first after converting to dracut.

It would help if I could adjust dracut to delay ask-for-password for some seconds to test. But I don't know how I can achieve this.

I also have two journalctl logs from bootprocess with rd.debug, rd.udev.debug kernel parameters set to compare working against faulty device. But they are some 10000 lines and I don't knwo if they can help. I can provide then on demand.

Operating System: EndeavourOS 
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.15-1-lts (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
System Version: ThinkPad T14 Gen 1

### kernel cmdline:
initrd=\39be9dbeb3be4e40984ae6a70e2a07f7\6.1.15-1-lts\initrd root=UUID=a68cec36-3cda-4c58-b52a-b7b94bcf2ed5 rw cryptdevice=UUID=91386e25-1e7b-4df5-819d-96198a54eb82:luks-91386e25-1e7b-4df5-819d-96198a54eb82 root=/dev/mapper/luks-91386e25-1e7b-4df5-819d-96198a54eb82 loglevel=3 nowatchdog nvme_load=YES resume= resume_offset=119984128 resume=/dev/mapper/luks-91386e25-1e7b-4df5-819d-96198a54eb82 resume_offset=119984128 amd_pstate.shared_mem=1 systemd.machine_id=39be9dbeb3be4e40984ae6a70e2a07f7 rd.debug rd.udev.debug

### uuids
/dev/nvme0n1p1: LABEL_FATBOOT="NO_LABEL" LABEL="NO_LABEL" UUID="B725-D1B6" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="9025384b-e621-6042-bed5-147dc40b854a"
/dev/nvme0n1p2: UUID="91386e25-1e7b-4df5-819d-96198a54eb82" TYPE="crypto_LUKS" PARTLABEL="root" PARTUUID="e31da825-ed42-4040-9a1c-12dac7970400"
/dev/mapper/luks-91386e25-1e7b-4df5-819d-96198a54eb82: UUID="a68cec36-3cda-4c58-b52a-b7b94bcf2ed5" BLOCK_SIZE="4096" TYPE="ext4"

### fstab:
UUID=B725-D1B6                                           /efi                            vfat    umask=0077         0       2
/dev/mapper/luks-91386e25-1e7b-4df5-819d-96198a54eb82    /                           ext4    defaults,noatime   0       1
/swapfile                                                none                        swap    defaults           0       0
Peter-Ries commented 1 year ago

For testing purposes I switched back to mkinitcpio: everything works fine again Back to dracut: error comes back

So finally returned back to working mkinitcpio.

I kept the debug log files if of interest, but I will stay with the working mkinitcpio...