getsolus / packages

Solus Package Monorepo & Issue Tracker
62 stars 78 forks source link

Laptop keyboard does not work on LUKS password screen #1326

Closed jomyc closed 7 months ago

jomyc commented 8 months ago

Summary

After installing Solus on a Fujitsu Lifebook T938 laptop and choosing to encrypt the drive during installation I am unable to enter the LUKS password using the built-in keyboard. I am able to enter the password if I attach a USB keyboard. The built-in keyboard works as expected once I get past the LUKS password screen. Other distros I've tested on the computer don't encounter this issue.

Steps to reproduce

  1. Choose to encrypt drive during installation.
  2. Reboot and try entering LUKS password using laptop keyboard.

Expected result

Laptop keyboard works on LUKS password screen.

Actual result

Keyboard is not recognized. Plugging in a USB keyboard is required.

Environment

Repo

Shannon (stable)

Desktop Environment

GNOME

System details

Operating System: Solus 4.5 Resillience Hardware Model FUJITSU LIFEBOOK T938 Processor: Intel® Core™ i5-8250U x 8 Memory 16.0 GiB

Other comments

No response

ReillyBrogan commented 8 months ago

Most likely the kernel driver for the keyboard, or one of it's dependencies, is not ending up in the initramfs.

Can I please get the output of the following? inxi -F and lsmod?

jomyc commented 8 months ago
$ inxi -Fz
System:
  Kernel: 6.6.11-270.current arch: x86_64 bits: 64 Desktop: GNOME v: 45.2
    Distro: Solus 4.5 resilience
Machine:
  Type: Convertible System: FUJITSU product: LIFEBOOK T938 v: N/A
    serial: <superuser required>
  Mobo: FUJITSU model: FJNB2BD v: G3 serial: <superuser required>
    UEFI: FUJITSU // Insyde v: Version 1.09 date: 09/12/2018
Battery:
  ID-1: CMB1 charge: 35.9 Wh (84.1%) condition: 42.7/50.3 Wh (85.0%)
CPU:
  Info: quad core model: Intel Core i5-8250U bits: 64 type: MT MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 401 min/max: 400/3400 cores: 1: 400 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 415 8: 400
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
  Device-2: Chicony FJ Camera driver: uvcvideo type: USB
  Device-3: Realtek FJ 5M Camera driver: uvcvideo type: USB
  Display: wayland server: X.Org v: 23.2.3 with: Xwayland v: 23.2.3
    compositors: 1: gnome-shell 2: Mutter v: 45.2 driver: gpu: i915
    resolution: 1366x768~60Hz
  API: EGL v: 1.5 drivers: iris,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.3
    renderer: Mesa Intel UHD Graphics 620 (KBL GT2)
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel
  API: ALSA v: k6.6.11-270.current status: kernel-api
  Server-1: PipeWire v: 1.0.1 status: active
Network:
  Device-1: Intel Ethernet I219-LM driver: e1000e
  IF: enp0s31f6 state: down mac: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 8.07 GiB (1.7%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: PM951 NVMe 512GB
    size: 476.94 GiB
Partition:
  ID-1: / size: 467.39 GiB used: 8.07 GiB (1.7%) fs: ext4 dev: /dev/dm-0
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 241 Uptime: 0m Memory: total: 16 GiB available: 15.46 GiB
  used: 1.14 GiB (7.4%) Shell: Bash inxi: 3.3.31
$ lsmod
Module                  Size  Used by
binfmt_misc            28672  1
snd_seq_dummy          12288  0
snd_hrtimer            12288  1
snd_seq               131072  7 snd_seq_dummy
snd_seq_device         16384  1 snd_seq
qrtr                   57344  4
rfkill                 40960  3
intel_rapl_msr         20480  0
snd_hda_codec_hdmi     94208  1
snd_soc_avs           176128  0
mei_hdcp               24576  0
mei_pxp                16384  0
iTCO_wdt               12288  0
iTCO_vendor_support    12288  1 iTCO_wdt
snd_soc_hda_codec      24576  1 snd_soc_avs
snd_soc_skl           208896  0
snd_soc_hdac_hda       24576  1 snd_soc_skl
intel_rapl_common      36864  1 intel_rapl_msr
snd_hda_ext_core       36864  4 snd_soc_avs,snd_soc_hda_codec,snd_soc_hdac_hda,snd_soc_skl
x86_pkg_temp_thermal    16384  0
snd_soc_sst_ipc        20480  1 snd_soc_skl
intel_powerclamp       20480  0
snd_soc_sst_dsp        45056  1 snd_soc_skl
snd_soc_acpi_intel_match    98304  1 snd_soc_skl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_soc_skl
coretemp               16384  0
snd_soc_core          442368  4 snd_soc_avs,snd_soc_hda_codec,snd_soc_hdac_hda,snd_soc_skl
snd_hda_codec_realtek   196608  1
kvm_intel             421888  0
snd_hda_codec_generic   114688  1 snd_hda_codec_realtek
snd_compress           28672  1 snd_soc_core
ac97_bus               12288  1 snd_soc_core
ledtrig_audio          12288  1 snd_hda_codec_generic
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_intel          61440  1
snd_intel_dspcfg       36864  3 snd_soc_avs,snd_hda_intel,snd_soc_skl
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
kvm                  1363968  1 kvm_intel
snd_hda_codec         225280  8 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda,snd_soc_skl
uvcvideo              151552  0
snd_hda_core          147456  10 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_hdac_hda,snd_soc_skl
irqbypass              12288  1 kvm
uvc                    12288  1 uvcvideo
snd_hwdep              16384  1 snd_hda_codec
videobuf2_vmalloc      20480  1 uvcvideo
rapl                   24576  0
snd_pcm               212992  9 snd_soc_avs,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_compress,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
intel_cstate           24576  0
videobuf2_memops       16384  1 videobuf2_vmalloc
e1000e                368640  0
snd_timer              53248  3 snd_seq,snd_hrtimer,snd_pcm
videobuf2_v4l2         40960  1 uvcvideo
intel_uncore          262144  0
snd                   159744  16 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
videodev              368640  2 videobuf2_v4l2,uvcvideo
ptp                    40960  1 e1000e
i2c_i801               36864  0
intel_wmi_thunderbolt    16384  0
psmouse               212992  0
soundcore              16384  1 snd
videobuf2_common       77824  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
hid_sensor_accel_3d    16384  1
pps_core               28672  1 ptp
mei_me                 57344  2
i2c_smbus              20480  1 i2c_i801
i2c_designware_platform    12288  0
hid_sensor_trigger     20480  3 hid_sensor_accel_3d
i2c_designware_core    40960  1 i2c_designware_platform
industrialio_triggered_buffer    12288  1 hid_sensor_trigger
mc                     94208  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
mei                   180224  5 mei_hdcp,mei_pxp,mei_me
kfifo_buf              12288  1 industrialio_triggered_buffer
industrialio          135168  5 industrialio_triggered_buffer,hid_sensor_trigger,kfifo_buf,hid_sensor_accel_3d
hid_sensor_iio_common    20480  2 hid_sensor_trigger,hid_sensor_accel_3d
joydev                 24576  0
apple_mfi_fastcharge    16384  0
fujitsu_laptop         28672  0
sparse_keymap          12288  1 fujitsu_laptop
acpi_pad               24576  0
evdev                  28672  12
sch_fq_codel           20480  2
fuse                  196608  3
configfs               65536  1
zram                   45056  2
zsmalloc               36864  1 zram
wacom                 131072  0
hid_sensor_hub         28672  3 hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_accel_3d
intel_ishtp_hid        24576  0
hid_apple              20480  0
usbhid                 65536  1 wacom
i915                 3551232  4
drm_buddy              16384  1 i915
ttm                    86016  1 i915
i2c_algo_bit           12288  1 i915
drm_display_helper    184320  1 i915
cec                    69632  2 drm_display_helper,i915
xhci_pci               20480  0
rtsx_pci_sdmmc         28672  0
crc32_pclmul           12288  0
mmc_core              208896  1 rtsx_pci_sdmmc
nvme                   49152  1
polyval_clmulni        12288  0
drm_kms_helper        212992  2 drm_display_helper,i915
polyval_generic        12288  1 polyval_clmulni
xhci_hcd              286720  1 xhci_pci
ghash_clmulni_intel    12288  0
nvme_core             172032  2 nvme
nvme_common            20480  1 nvme_core
t10_pi                 16384  1 nvme_core
rtsx_pci              102400  1 rtsx_pci_sdmmc
drm                   724992  7 drm_kms_helper,drm_display_helper,drm_buddy,i915,ttm
intel_ish_ipc          28672  0
usbcore               339968  5 xhci_hcd,usbhid,apple_mfi_fastcharge,uvcvideo,xhci_pci
intel_ishtp            65536  2 intel_ishtp_hid,intel_ish_ipc
usb_common             12288  1 usbcore
video                  69632  2 fujitsu_laptop,i915
wmi                    32768  2 video,intel_wmi_thunderbolt
serio_raw              16384  0
joebonrichie commented 8 months ago

Possibly?

fujitsu_laptop         28672  0
sparse_keymap          12288  1 fujitsu_laptop
ReillyBrogan commented 8 months ago

Can I get the output of dmesg too?

jomyc commented 8 months ago

dmesg_output.txt

ReillyBrogan commented 8 months ago

The next kernel will add psmouse to the initrd, based on an Arch Linux tip that the keyboard could be connected through that bus. Your dmesg seems like it's unlikely that that is the case, but you can try unloading kernel modules until your keyboard stops working as a test case.

Steps:

  1. Get through the LUKS screen
  2. Keep your secondary keyboard plugged in
  3. Switch to a different TTY
  4. Run sudo modprobe -vr module_name with different modules from your lsmod output until your internal keyboard stops working, but your external one stays working. Note that if your system becomes unusable reboot it. You may want to do this from a live USB just in case, not having LUKS shouldn't make any difference for this testing.

You can run modinfo module_name before removing a module to see a description (hopefully) of what it is. Things like filesystem, block, and crypto drivers are obviously not going to be the correct module. psmouse, fujitsu_laptop, sparse_keymap are going to be likely offenders, I'd start with those first.

Once we know which module makes the keyboard stop working when unloaded we can try adding a kernel argument to prevent that kernel module from being loaded in the first place which will give us an additional confirmation that we have the right one. Once that's figured out I can add the kernel module to our initrd builds so it'll be included for everyone with similar hardware in the future.

ReillyBrogan commented 8 months ago

I pasted the kernel modules that are in our initrd here. You can search this list for kernel modules in your lsmod output and then skip it if it's present in that list as it can't be the culprit. The list is slightly old but should be updated enough for our purposes here.

jomyc commented 8 months ago

No luck so far. I've managed to disable every input device except the keyboard. Removing fujitsu_laptop and sparse_keymap didn't seem to have any obvious impact. Here's a list of modules loaded after turning off as many hardware devices as possible in the BIOS. I added an X next to modules I tried unloading and an A next to ones I assumed wouldn't be necessary to test or was unable to unload:

A - binfmt_misc
A - snd_seq_dummy
A - snd_hrtimer
A - snd_seq
A - snd_seq_device
A - snd_timer
A - snd
A - soundcore
A - qrtr
A - rfkill
A - intel_rapl_msr
A - intel_rapl_common
A - x86_pkg_temp_thermal
A - intel_powerclamp
A - coretemp
A - kvm_intel
A - iTCO_wdt
A - iTCO_vendor_support
A - kvm
A - irqbypass
A - rapl
A - intel_cstate
A - intel_uncore
A - intel_wmi_thunderbolt
A - evdev
A - sch_fq_codel
A - fuse
A - configfs
A - zram
A - zsmalloc
A - i915
A - drm_buddy
A - ttm
A - i2c_algo_bit
A - drm_display_helper
A - cec
A - crc32_pclmul
A - nvme
A - polyval_clmulni
A - polyval_generic
A - drm_kmx_helper
A - nvme_core
A - nvme_common
A - ghash_clmulni_intel
A - t10_pi
A - drm
A - video
A - wmi
X - psmouse
X - i2c_i801
X - i2c_designware_platform
X - i2c_smbus
X - i2c_designware_core
X - joydev
X - fujitsu_laptop
X - sparse_keymap
X - acpi_pad
X - hid_apple
X - wacom
X - xhci_pci
X - usbhid
X - usbcore
X - usb_common
X - mei_pxp
X - mei_hdcp
X - mei_me
X - mei
X - serio_raw
jomyc commented 8 months ago

Of the remaining modules evdev seems like the most likely candidate, but I haven't been able to unload it.

ReillyBrogan commented 7 months ago

Would you be willing to run unstable for a while and hop on Matrix to help us debug this? This is going to require many kernel rebuilds to figure out and it'll be much easier if we can coordinate over chat.

jomyc commented 7 months ago

Sure. Just joined the Solus Matrix room and added/enabled the unstable repo on a test drive.

ReillyBrogan commented 7 months ago

What's your username? Are you in the packaging or the development channels?

jomyc commented 7 months ago

Same as my GitHub username. I've joined the development channel.