On boot a keyboard prompt appears on which I can type a password to decrypt the device.
What's the current behaviour?
The prompt appears, however the keys are not responsive. Tapping further up on the screen can cause some random key presses. Hard to figure out what they do though.
Furthermore, once I fixed this, decrypting still failed, always claimed wrong password.
How to reproduce your issue?
What device are you using?
asus-grouper
On what postmarketOS version did you encounter the issue?
What's the build date of the image? (in yyyy-mm-dd format)
2021-10-04
Additional information
Done some troubleshooting; figured out root causes are:
Missing pointer calibration file for grouper
For some reason aes_generic.ko is on the initfs but libaes.ko is not, which makes cryptsetup luksOpen fail.
I managed to fix it by hacking around locally as follows:
increased pkgver of device-asus-grouper APKBUILD
added a pointercal file to its directory with contents "41811 0 -771172 220 39984 -1046512 65536 800 1280 0" generated by running ts_calibrate.
added deviceinfo_modules_initfs="libaes" to deviceinfo (modprobe aes_generic told me that this is what's missing)
The pointercal part can probably be added as is; my deviceinfo change pretty sure isn't the proper way to fix this, but rather --fde should make sure to always include this module on every device. Not sure how to do that though.
Patch attached anyway so others with the same problem can already use it.
It uses AES, based on my finding that adding this module fixes cryptsetup.
LUKS default is aes-xts-plain64, and I would assume/hope that's what
we're using.
...
On Mon, Oct 4, 2021 at 8:45 AM Alexey Min (@minlexx) gitlab@mg.gitlab.com wrote:
Alexey Min commented:
--fde should make sure to always include this module on every device
or maybe libaes and aes_generic just should be built-in? are we sure that FDE uses AES at all? I don't remember..
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
Could you try use postmarketos grate kernel? Just point the device to the grate package name, it should have all necessary build options to cover grouper/tilapia devices. It could work out-of-box but hasn't been fully tested.
Is this something one can just install on an existing install e.g. via
apk add, or do I need to reinstall for that? Sorry, but I haven't used
postmarketos much yet and basically just got my homedir setup OK; as a
known issue with grouper is lack of hardware graphics acceleration, is
the grate kernel expected to fix that?
...
On Mon, Oct 4, 2021 at 10:03 AM jenneron (@jenneron) gitlab@mg.gitlab.com wrote:
jenneron commented on a discussion:
you also need deviceinfo_modules_initfs="lvds-codec panel-lvds bq27xxx-battery bq27xxx-battery-i2c smb347-charger elants-i2c", but it is not tested
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
OK, so first of all, tried if the kernel boots at all using pmbootstrap boot with the old root fs; pmbootstrap flasher boot does show something, and unlocks the disk (despite me having removed libaes from the module list, but instead added the deviceinfo_modules_initfs provided by jenneron).
So this part is fixed with the new kernel. I still need my pointercal file though.
WiFi didn't work when booted this way, but that's expected as I didn't install the rootfs yet so it clearly couldn't load extra modules (now doing that).
The grate kernel has the libaes missing module bug fixed.
Looking for possible other regressions now.
/etc/pointercal file remains necessary - the exact parameters from above (41811 0 -771172 220 39984 -1046512 65536 800 1280 0) remain correct with the grate kernel, although I don't like them (there's clearly a skew - the 4th number should be a zero otherwise). I probably should calibrate many times and take average.
Still on grate. No regrets, no visible regressions.
Still can't use 3D acceleration - seems like Mesa simply has no driver for this Tegra 3 chip? Anyway, fine by me. xorg opentegra driver does recognize the chip.
XVIDEO does seem supported, so kinda good enough.
USB, screen, touchpad, Wifi, backlight control all still work. Can't get any sound out but wow has this one many ALSA mixer channels - maybe can be fixed there (but I'll wait and see if pulseaudio happens to already know what to do there, also IIRC my headphones socket has turned mono anyway so I may have to use Bluetooth anyway). Have NOT tested Bluetooth yet.
So, the full extent of this bug is:
We either need to put the libaes module in the initfs or kernel whenever --fde is used, or maybe always. This part is fixed in grate.
We need /etc/pointercal added to the initfs. Unchanged with grate.
As I see no reason not to go with the grate kernel, sticking with it now. Scrolling in Firefox seems better, but still can't play YouTube in it directly (but I am aware of workarounds).
Could you open MR for switching to -grate kernel (since this was original goal, I just haven't time to fully test it yet) and supplying pointercal for grouper and tilapia? (since they're 99.9% same).
EDIT: also 3D* is WIP, but it'll take at least some months I assume. Feel free to drop by on Matrix #tegra:libera.chat or on IRC #tegra channel on libera.
Bluetooth - scans fine, didn't try actually playing sound through it
yet but it probably works fine.
I should receive my BT keyboard tomorrow, then I'll open the MRs.
...
On Mon, Oct 4, 2021 at 11:43 PM David Heidelberg (@okias) gitlab@mg.gitlab.com wrote:
David Heidelberg commented:
great work Rudolf.
Could you open MR for switching to -grate kernel (since this was original goal, I just haven't time to fully test it yet) and supplying pointercal for grouper and tilapia? (since they're 99.9% same).
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
if it scanning, it should working, for "simple" alsa test, just max volume for few alsautils mixers, I think it should be enough. I think someone worked on alsa-ucm configuration, but I know little about UCM.
Speaking of sound the easiest way is to use pulseaudio and just select needed output in pavucontrol or some another mixer. Although if the religion doesn't allow, you still can use alsa for that, but you should consider that some apps may not work with alsa-only. It would be something like this:
For further info check ucm configs of nexus 7, they are already upstreamed and are in /usr/share/alsa/ucm2. If this directory doesn't exist, install alsa-ucm-conf package (mandatory for both alsa-only and alsa + pulseaudio cases). It should be a dependency of device-asus-grouper (and device-asus-tilapia as well), but it is not.
Thanks - alsaucm was indeed what I missed (and with alsa-ucm-conf installed, pulseaudio also works fine). Now only remaining issue is the BT keyboard and I'll call it done and send a bunch of MRs.
Issue is, I can pair with the keyboard but never type. Keyboard works fine on another Linux box with the same bluetoothctl commands, namely "power on", "scan on", "pair ", "trust ", "connect ". Anything obvious I could be missing, like some userspace program I didn't install (for now only installed bluez)?
The one "suspicious" log message is:
Oct 6 15:22:02 asus-grouper daemon.err bluetoothd[1316]: profiles/input/device.c:ioctl_is_connected() Can't get HIDP connection infoOct 6 15:22:08 asus-grouper daemon.err bluetoothd[1316]: profiles/input/device.c:control_connect_cb() connect to <device-address>: Host is down (112)
I'm gonna try booting the other kernel, seeing no other obvious option yet.
We probably need CONFIG_UHID enabled. You can make sure by running lsmod on your PC where keyboard works and comparing to lsmod without connected keyboard. I will enable it on the next kernel update
Confirmed CONFIG_UHID is missing. Recompiled kernel with it enabled.
Did not fix the issue though; also, same keyboard on another computer
doesn't cause the uhid module to get loaded.
...
On Wed, Oct 6, 2021 at 12:52 PM jenneron (@jenneron) gitlab@mg.gitlab.com wrote:
jenneron commented on a discussion:
We probably need CONFIG_UHID enabled. You can make sure by running lsmod on your PC where keyboard works and comparing to lsmod without connected keyboard. I will enable it on the next kernel update
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
On another computer, the modules loaded or refcount-incremented when I
connect the keyboard are: hidp cmac algif_hash algif_skcipher af_alg
hid bluetooth evdev aesni_intel cryptd. dmesg message for the keyboard
also mentions hidraw, which it did NOT on the tablet. So I'll see if I
can enable all that.
So, adding CONFIG_HIDRAW and CONFIG_CRYPTO_CRYPTD now; all else seems
already in.
Confirmed CONFIG_UHID is missing. Recompiled kernel with it enabled.
Did not fix the issue though; also, same keyboard on another computer
doesn't cause the uhid module to get loaded.
On Wed, Oct 6, 2021 at 12:52 PM jenneron (@jenneron) gitlab@mg.gitlab.com wrote:
jenneron commented on a discussion:
We probably need CONFIG_UHID enabled. You can make sure by running lsmod on your PC where keyboard works and comparing to lsmod without connected keyboard. I will enable it on the next kernel update
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
On another computer, the modules loaded or refcount-incremented when I
connect the keyboard are: hidp cmac algif_hash algif_skcipher af_alg
hid bluetooth evdev aesni_intel cryptd. dmesg message for the keyboard
also mentions hidraw, which it did NOT on the tablet. So I'll see if I
can enable all that.
So, adding CONFIG_HIDRAW and CONFIG_CRYPTO_CRYPTD now; all else seems
already in.
Confirmed CONFIG_UHID is missing. Recompiled kernel with it enabled.
Did not fix the issue though; also, same keyboard on another computer
doesn't cause the uhid module to get loaded.
On Wed, Oct 6, 2021 at 12:52 PM jenneron (@jenneron) gitlab@mg.gitlab.com wrote:
jenneron commented on a discussion:
We probably need CONFIG_UHID enabled. You can make sure by running lsmod on your PC where keyboard works and comparing to lsmod without connected keyboard. I will enable it on the next kernel update
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.
Hmm, I have feeling on linux-asus-grouper keyboard worked some long time ago (I tried).
Anyway, I just tested FDE on asus-tilapia and it worked with your linux-pmos-grate patch (just missing pointercal, so I had to enter data encryption key over telnet).
Adding libaes.ko doesn't seems like a requirement.
Yes; libaes module is built-in in grate but separate in linux-asus-grouper.
So depending on merge order of the two MRs, I'll have to do some deconflicting. If we do !2575 (closed) first, we need libaes added; if we do !2576 (merged) first, libaes will be gone when I rebase !2575 (closed).
You can edit the commits in your !2575 (closed) to not add libaes module, just add a pointercal file. After that add a comment that this MR depends on !2576 (merged) being merged. But you still will have to deal with conflicts due to pkgvers
You can edit the commits in your !2575 (closed) to not add libaes module, just add a pointercal file. After that add a comment that this MR depends on !2576 (merged) being merged. But you still will have to deal with conflicts due to pkgvers
—
Reply to this email directly or view it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can unsubscribe from this thread or adjust your notification settings.