You are not logged in.

#1 2020-05-22 08:44:13

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Tablet/Laptop mode at decrypt prompt (Get ACPI running before decrypt)

I hope this is the right subform and title, if not please let me know.
Device: Dell XPS 13 2-in-1 7390

I set up root encryption and I am booting via EFI-Stub from a signed UKI.
I often use the device in tablet mode to draw on it while using a bluetooth keyboard for typing. When I shut it down / put it in hybernate and turn it back on I have to enter the decryption password. Now, when I forgot to put the device in laptop mode before powering it on, the built in keyboard is not comming back to live and the bluetooth keyboard also isn't connected, so I either have to power cycle the device (defeating hybernate) or plug in my backup usb keyboard (annoying).
In fact, before installing and activating acpid, I would end up having to reboot or re-hybernate the machine to get the keyboard and touchpad working at all.

So for clarity:
Without acpid:
When booting/waking up from hybernation in laptop mode: (1)
Everything works as expected.

When booting/waking up in tablet mode:
Keyboard and touchpad unavailable until I performed (1)

With acpid:
When booting/waking up from hybernation in laptop mode:
Everything works as expected.

When booting/waking up in tablet mode:
Built in keyboard not available in decrypt prompt. <- This is what I would like to change.
Everything works as expected AFTER decrypting.

Maybe it is worth noting that installing acpid also made the device react to lid-close/open, which it didn't before.

Now my actual question: Do I have to somehow bake acpid into the intiramfs for this to work or is there an easier workaround, that I am unaware of? Maybe a kernel hook? If the former is the case, is there important considerations beyond whats in the Wiki page on Mkinitcpio? Having the keyboard on at the decrypt prompt even if the device is in tablet mode would be acceptable.

Here are the acpi_listen outputs when fliping the lid beyound 180 degrees, in case they are relevant:

9DBB5994-A997- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000

Kernel command line:

BOOT_IMAGE=/boot/vmlinuz-linux root=/dev/mapper/... rw cryptdevice=UUID=... :cryptlvm resume=UUID=... loglevel=3 quiet

Mkinitcpio.conf:

MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect keyboard keymap modconf block encrypt lvm2 filesystems resume fsck)

Last edited by LoNaAleim (2020-05-22 09:00:46)

Offline

#2 2020-05-24 13:07:02

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: Tablet/Laptop mode at decrypt prompt (Get ACPI running before decrypt)

Updates:
After digging into this discussion: https://bugs.launchpad.net/ubuntu/+sour … ug/1822394 I added intel-vbtn and intel-hid (individually and both at the same time) to my /etc/mkiniticpio.conf rebuilt my initramfs and uki and rebooted. Sadly it didn't take me anywhere.
What I found out in the process is the following:
When the device is in laptop mode at boot, the keyboard is available at the decryption prompt, no matter how much I fold / unfold the device once the prompt is there. (I can even type when the device is entirely folded back) So apparently whatever manages the keyboard in the initramfs only checks for this keyboard once and depending on the state it has then, it will be available or not. However, I can plug in my usb keyboard any time I want and it will work for the decryption prompt.
Now sadly, I am not having any luck finding out which piece of software is responsible for turning the keyboard on / off depending on the hinge position. Most posts on the internet only read: "Its not working" or "It just worked" or they are dealing with it in the scope of the X session. Any advice as to where I can start digging about this mechanism would be amazing!

Offline

#3 2020-05-24 16:09:50

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: Tablet/Laptop mode at decrypt prompt (Get ACPI running before decrypt)

Another thing I just tried to no avail:

 lsinitcpio /boot/initramfs-linux.img | grep acpi 

showed nothing, whereas:

 lsmod | grep acpi 

showed:

snd_soc_acpi_intel_match 40960 2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_acpi 16384 3 snd_soc_acpi_intel_match,snd_sof_intel_hda_common,snd_sof_intel_byt
ucsi_acpi 16384 0
typec_ucsi 36864 1 ucsi_acpi
acpi_thermal_rel 16384 1 int3400_thermal
acpi_tad 20480 0

I added all those modules to the initramfs but sadly it didn't bring about any change. So I guess that makes tablet mode / laptop mode a userspace thing?

Offline

Board footer

Powered by FluxBB