plumbing for a new FDE unlocker, unl0kr, has been merged (!2687 (merged)), and the intention is to replace osk-sdl with this new thing.
Since FDE is a requirement for community and edge devices, we need maintainers of community and edge devices to test that this fde unlocker app works on their hardware. It's possible there might be bugs related to display, input, which might result in you being unable to unlock a device. So do not test this on a device with data you care about
To test it, fetch the latest pmaports master branch, and build an image that uses unl0kr with:
$ pmbootstrap install --fde --add unl0kr
flash/install that to your device using whatever device-specific instructions/methods exist for it
Please test that you're able to unlock using the touch onscreen keyboard, as well as a hardware keyboard if your device includes one (N900, pinebook, pinephone keyboard, etc). unl0kr looks noticeably different than osk-sdl, so make sure that osk-sdl did not install/run when you are testing. It shouldn't if you followed step 1 closely, but let us know if there are problems.
Start a new thread below in this issue for each device, indicate whether testing was successful or, if there were problems, state them there
ODROID-HC2 doesn't have a display... FDE was never really 'tested' with osk-sdl.
It probably just works with cryptsetup over serial, but using it like that is horrible.
samsung-gt58 works fine, can handle the funny aspect ratio. Would expect all other msm8916 devices to work as well.
Interestingly, mkinitfs said:
...2022/02/04 15:56:59 == Generating initramfs extra ==2022/02/04 15:56:59 - Including extra binaries2022/02/04 15:56:59 - *NOT* including FDE support...
yeah it's probably best to just clean up the confusing mkinitfs message once we pull osk-sdl, to avoid having to make multiple possibly-risky changes to the initfs stuff.
unable to unlock with vkb, as keyboard is not correctly mapped to the touchscreen, i.e. seems to be inverted about the center
the keys are rather small. one will need to type slowly or use the stylus. if the top bar could be reduced in size, the keys could possibly become a more comfortable size
The N900's display is 800x480 pixels, right? Does the UI generally look like in this screenshot?
The "breezy" theme has a little less padding than the default pmOS theme which results in slightly larger keys. Maybe we could decrease the padding in the pmOS theme as well. CC @dylanvanassche
About the touch screen, is it just the on-screen keyboard that doesn't properly register touches or all of the UI? And when you say "inverted about the center" does that mean you tap at (midX + x, midY + y) and the touch is registered at (midX - x, midY - y)?
@sicelo thanks for testing. the touch input issue sounds like maybe a calibration problem, and the input driver used by unl0kr/lvgl probably needs some info to correct it. in osk-sdl, tslib is used for input, and can accept calibration info to adjust input accordingly.
display is 800x480 yes, with 3.5" diagonal. So the more space keyboard can be allocated, the better.
touch screen, in the pmos theme, the touch is inverted around that green horizontal line running through the screen. i.e. if you click around the 'backspace' or 'Enter' key, you're actually activating the power 'button'. when you try to change theme (dark/light), you actually activate Shift or the 123 button
Unl0kr uses libinput which in turn uses udev. The rules are copied into the initfs but only from /lib/udev/rules.d/. It looks like the rules you mentioned are in /etc/udev/rules.d/ though.
I didn't realize there was another rules directory, sorry.
But chances are we'll just have to copy all the rules from this folder, too.
Unl0kr is currently using the orientation reported by the framebuffer itself. It looks like for the Pinetab we explicitly specify deviceinfo_framebuffer_landscape="true" which is then evaluated when generating the splash image.
I guess to make unl0kr use the same orientation it'd need a dedicated CLI argument which is then set based on the value of deviceinfo_framebuffer_landscape.
Doesn't receive input neither from the touchscreen nor a USB keyboard.
I thought this would close #1268 (closed), but it looks like it won't be as easy as I expected. I'll try to find out what's wrong. It would be great if someone has an idea on where I should start looking.
Thanks for testing @Tooniis! And sorry it doesn't seem to work at all.
Unl0kr uses libinput for reading from /dev/input/event... nodes for both hardware keyboards and the touchscreen. I think the first thing to try is running something like evtest in the debug shell to see what event nodes are there and then checking which ones unl0kr picked (which should be logged to STDERR).
I have never actually debugged unl0kr in the debug shell myself though so I'd have to try this out, too.
This device doesn't have any udev rules in /etc/udev/rules.d, does it? Just asking because those files are currently not yet copied into the initfs (see #1411 (comment 832955979)).
Tested on samsung-serranove using on-screen keyboard and a rather simple passphrase - worked very well for me. High-contrast mode and showing password worked fine as well.
tested on the pinebook pro, the UI size was fine (osk hidden by default because it found the physical keyboard as expected)
the only real problem I found was that it wasn't registering key presses when I typed 'normally'. I had to type my passphrase slowly/deliberately for all the presses to register correctly. @cherrypicker have you seen this in your testing?
Hm, I did see key presses being dropped occasionally when testing it with my Ergodox EZ but only with the dual function keys (where the trigger time is longer than with normal keys). The key handling happens within LVGL. I wonder if maybe it's not able to keep up with the events due to load.
For samsung-espresso3g, as unl0kr is added to initramfs, the boot.img becomes bigger than the boot partition so until it is moved to initramfs-extra, cannot test it/
ya basically I think postmarketos-mkinitfs should have a directory for collecting lists of files that should be installed in the -extra archive. then unl0kr's package could add its list file to that dir.
Did a fresh build on edge and the boot.img I get is of 11mb, so it still seems to be an issue. Reason being MR#19 has those changes and we need to create a new release as pmaports uses 1.4.1 which doesnt include it
Installed unl0kr on a running device with apk and that works fine, here's the log
samsung-espresso3g:~$ sudo unl0kr[sudo] password for user:unable to add device to libinput context: No such file or directorylibinput error: event1 - MELFAS MMS136 Touchscreen: client bug: event processing lagging behind by 29ms, your system is too slowlibinput error: event1 - MELFAS MMS136 Touchscreen: client bug: event processing lagging behind by 26ms, your system is too slowlibinput error: event1 - MELFAS MMS136 Touchscreen: client bug: event processing lagging behind by 29ms, your system is too slowlibinput error: event1 - MELFAS MMS136 Touchscreen: client bug: event processing lagging behind by 33ms, your system is too slowlibinput error: event1 - MELFAS MMS136 Touchscreen: client bug: event processing lagging behind by 29ms, your system is too slowlibinput error: event1 - MELFAS MMS136 Touchscreen: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.147147
Everything from input to themes works perfectly fine.
I suppose we'll also need a new version of the unl0kr package that actually puts its files hook file into the extra directory?
We can just define it in /etc/postmarketos-mkinitfs/files-extra as the MR suggests and it should work. There's no need of making changes in unl0kr from what I understand.
@cherrypicker I tried this in qemu, and input seems to be broken, I get these messages in the kernel log... IIRC vaguely that you mentioned something like this before but I don't remember what the fix was, or if this is even exactly what you mentioned, heh.
libinput error: libinput bug: udev device never initialized (/dev/input/event1)
I checked our Matrix conversation from last year and that seems like what I was seeing, too:
libinput error: libinput bug: udev device never initialized (/dev/input/event0)libinput error: client bug: Invalid path /dev/input/event0unable to add device to libinput context: No such file or directory
The fix I made back then is this which still seems to be in place. I'm not for sure why this could have stopped working.
Adding further context from a private conversation: Running udevadm / unl0kr manually from the debug shell worked for @craftyguy so this smells like a timing issue during boot. Adding a 5s delay before and after the udevadm call in init_functions did not help though. I'm unable to reproduce the issue at all in Qemu on my laptop so far.
@craftyguy in the aftermath of fixing this issue I fleshed out https://wiki.postmarketos.org/wiki/Unl0kr a little more and added a section for how to debug input devices. Maybe we could add the link to this page in the issue description?
@cherrypicker Does not seem to work on asus-me176c sadly. Nothing shows up at all. It looks like it cannot handle very simple framebuffer drivers like efifb or simplefb that do not implement FBIOBLANK. When running it from debug-shell I get:
I've just tried it on Oneplus 6T (fajita). During booting, after pmOS logo I only see black screen and nothing else, though phone can be pinged over USB.
When I click the place where "Enter" button is supposed to be, screen refreshes once and goes black again. I can repeat pressing "OK" again after some time, and I see the same - single frame drawn, followed by black screen.
I don't see anything really suspicious when running unl0kr from debug-shell
/ #find_root_partition/dev/mapper/sda14p2/ #CRYPTTAB_SOURCE=/dev/mapper/sda14p2 CRYPTTAB_TRIED=0 unl0kr -vunl0kr 0.1.0Found theme: pmos-darkFound theme: pmos-lightunable to add device to libinput context: No such file or directoryunable to add device to libinput context: No such file or directoryConnecting touchscreen device /dev/input/event3libinput error: event3 - Synaptics S3706B: client bug: event processing lagging behind by 29ms, your system is too slowlibinput error: event3 - Synaptics S3706B: client bug: event processing lagging behind by 31ms, your system is too slowlibinput error: event3 - Synaptics S3706B: client bug: event processing lagging behind by 32ms, your system is too slowlibinput error: event3 - Synaptics S3706B: client bug: event processing lagging behind by 25ms, your system is too slowlibinput error: event3 - Synaptics S3706B: client bug: event processing lagging behind by 26ms, your system is too slowlibinput error: event3 - Synaptics S3706B: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.edfcgyvc
I see the same result, as soon as unl0kr starts, screen goes black. I tried to randomly tab buttons on the invisible keyboard, then pressed "Enter" on bottom right corner, and I guess "edfcgyvc" on stdout is what I typed blindly.
Just gave it a spin on my OnePlus 6 and it seemed to work fine, looks great! The scaling is a bit off, animations are very laggy and the key-popup doesn't always appear when typing fast, but nothing making it unusable.
I just installed it, stopped tinydm and ran it manually over SSH.
@cherrypicker can scaling be configured per-device?
@cherrypicker can scaling be configured per-device?
I've made a change recently that uses the screen's DPI value for measurements which might help a little. That's not yet included in the pmOS package though.
The textarea / disclosure button container is set to scale up to at most 512 pixels. It looks like that's not enough maybe. Unfortunately, my laptop's resolution is lower than the device's resolution, so I'll have to think about how to test this.
@cherrypicker hmm maybe you could run it in qemu and then just scale down the qemu window?
regarding the 6T, the only difference between it and the OnePlus 6 is the resolution and some stuff in the panel driver. theres some quirks with it which i guess are coming in to play here.
Pinephone with Keyboard attachment works great. It shows up in portrait mode and the virtual keyboard does not appear, just like osk-sdl does currently.