physical keyboard doesn't work; initramfs hook script doesn't properly copy /usr/share/X11/xkb

Bug #2101167 reported by Simon Sievert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unl0kr (Ubuntu)
New
Undecided
Unassigned

Bug Description

Dear maintainer,

Unl0kr doesn't take any input from a physical keyboard.

The device I'm using is a StarLabs StarLite Mk V (an x86_64 tablet that ships with a Linux distribution by default) with the official keyboard cover accessory.

Unl0kr is configured as a keyscript in /etc/crypttab to allow entering the LUKS encryption password for the main drive. (",keyscript=/usr/share/initramfs-tools/scripts/unl0kr-keyscript" appended to /etc/crypttab)

So to reproduce, reboot, wait for unl0kr to prompt for the encryption password and try to use a physical keyboard.

Expected behaviour:
- can use physical keyboard to enter the password

Actual behaviour:
- cannot use physical keyboard to enter the password (no characters appear)

The touchscreen works fine though.

Possible cause:
The initramfs hook script "/usr/share/initramfs-tools/hooks/unl0kr" doesn't seem to properly copy "/usr/share/X11/xkb" to the initramfs, and thus some keyboard stuff is not available to unl0kr.

Possible fix (that I've successfully been using):
Change the initramfs hook script "/usr/share/initramfs-tools/hooks/unl0kr" to properly copy "/usr/share/X11/xkb".
The last line needs to be changed from:
cp -pPr /usr/share/X11/xkb ${DESTDIR}/usr/share/X11

to:
mkdir -p ${DESTDIR}/usr/share/X11/
cp -pPr /usr/share/X11/xkb ${DESTDIR}/usr/share/X11/

(Notice the trailing slash after "X11".)

Kind regards,
Simon Sievert

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: unl0kr 2.0.3+dfsg-1 [modified: usr/share/initramfs-tools/hooks/unl0kr usr/share/initramfs-tools/scripts/unl0kr-keyscript]
ProcVersionSignature: Ubuntu 6.8.0-55.57-generic 6.8.12
Uname: Linux 6.8.0-55-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 7 16:44:52 2025
InstallationDate: Installed on 2024-06-28 (252 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
SourcePackage: unl0kr
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.unl0kr.conf: [modified]
mtime.conffile..etc.unl0kr.conf: 2025-03-01T12:34:50.562615

Revision history for this message
Simon Sievert (ssievert) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.