Pine64-Arch
Pine64-Arch copied to clipboard
Add ttyescape
I'd like to help add TTYescape to Arch. TTYescape is available in PostmarketOS and enables switching to a TTY on the pinephone with hotkeys. The TTY has a touchscreen keyboard. It's pretty useful. https://wiki.postmarketos.org/index.php?title=TTYescape https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2309/diffs
I'm not great at PKGBUILDs so these are not working yet. I could use some help. It's based on modified APKBUILDs from Alpine/pmos.
https://pkgs.alpinelinux.org/package/edge/testing/aarch64/hkdm https://pkgs.alpinelinux.org/package/edge/testing/aarch64/buffyboard https://pkgs.postmarketos.org/package/master/postmarketos/aarch64/triggerhappy https://pkgs.postmarketos.org/package/master/postmarketos/aarch64/ttyescape and the following AUR PKGBUILD: https://aur.archlinux.org/packages/triggerhappy/
Right now, buffyboard, triggerhappy, and hkdm are working. Still working on ttyescape.
ttyescape seems to be working if I remove hkdm as a dependency. hkdm is the one that's giving me problems.
hkdm: /usr/sbin exists in filesystem (owned by filesystem)
Not sure what I'm doing wrong.
(figured it out - sbin was a symlink on arch)
I've built the packages and they're here: https://server.elagost.com/arch/
Steps to test this out:
- Download or build the packages yourself
- Install the packages -
pacman -U <packages>
(for ttyescape, triggerhappy, and buffyboard; hkdm doesn't need to be here) - enable
triggerhappy.socket
andtriggerhappy.service
- ensure
hkdm.service
is disabled - reboot
- hold Volume Down key and tap Power key 3 times, let go of Volume Down key
- you should see tty2 with a large font and a keyboard (if the font isn't large, repeat the previous step, twice)
A few issues so far:
- how to make this work with the bootsplash - I attempted to add
[email protected]
to triggerhappy.service but that did not work. I ended up regenerating my initramfs after removingdanctnix-bootsplash
from the hooks and runningmkinitcpio -p linux-megi
and rebooting. - this might need the uinput module loaded?
echo uinput | sudo tee /etc/modules.load.d/uinput.conf
will enable it but I think thetogglevt.sh
script does it automatically if needed.
Other than that, it's working great!
Marked ready for review since I've been running packages built off these PKGBUILDs for a few days with no cost to stability. They seem to work well, with the one caveat being I've disabled the bootsplash.
just another "+1" comment, works great for me and doesn't conflict with sxmo's unusual power-key bindings. i already had the bootsplash disabled
Hey! it's cool to see an interest in my software being used elsewhere :D
right now the togglevt script is the only part of TTYEscape, and i somewhat lazily included it directly in pmaports, this has the limitation that you basically need to kang the whole script.
this is bad because it means any upstream fixes require manual intervention (more than simply bumping the pkgver), I'll try and get TTYEscape moved to it's own repo soon so we dont potentially have to deal with breaking changes in the future.
@ArenM Thank you so much for the extensive review. It might be a bit before I can get to it - my family is in the middle of moving right now. But I will get it cleaned up.
I've moved TTYEscape to it's own repo so it can be packaged without having to vendor any scripts: https://gitlab.com/postmarketOS/ttyescape, you can upgrade you package to use this as the source (See https://gitlab.com/postmarketOS/pmaports/-/commit/be91c62136804b84b0dd2062ac9f29d3548f2a8d)
@calebccff my sincere thanks for making TTYEscape in the first place. It's a lifesaver! @ArenM I've fixed a few things; had some spare time.
Ok. Still needs the bootsplash removed (sudo sed -e 's/bootsplash-danctnix//g' -i /etc/mkinitpcio.conf && sudo mkinitcpio -p linux-megi
), but where it's at now should be better.
diff.txt I needed these changes to make it work on my pinephone.
- the PKGBUILD depends on files not existing in this repository (I have copied the one from postmarketos and fixed the path to the font for archlinux)
- since it is depending on hkdm, there is no need to configure triggerhappy
- on my system, and I do not remember modifying it so must be the default terminal 1 is the gui not 7, so removed that Otherwise it seems to work perfectly. Tested on sxmo/swmo.
Hey there @elagost , just wondering if you were planning on implementing the changes in @manner82 's comment above. they make sense to me and i'd love to see ttyescape merged into the repos. thanks!
@hamblingreen1 thanks for reminding me. I've not really used Arch on my pinephone for a while; mainly been running pmOS which is why this has sat untouched. Addressing the changes from @manner82 :
- I will remove the triggerhappy config
- It's possible that sxmo/swmo run on different ttys than phosh. I only tested on phosh. I can test out both (hopefully sometime soon) and update the PR.
Ok, ttyescape now has customizable VTs, and those can be set in the config file, without editing the togglevt.sh script. I've not yet had time to build or test these packages yet but it should be a little more flexible now.
I've put the current exact pkgbuilds on the AUR if anyone wants to use them from there while waiting on this. hkdm
is rust so it is more complicated to build.
the pkgbuild from the aur works well, uninstalled my old version of ttyescape and it's dependencies and after reinstalling using the newest version it works great out of the box.
Updated and improved PKGBUILDs now added to the Manjaro ARM repos (unstable for now). I've tested on my PinePhone running Manjaro Phosh.