Drew Naylor's Website banner image

How to Switch TTYs with the PinePhone Keyboard Case (systemd-only method)


Recently I made a video showing how to switch TTYs with the PinePhone Keyboard Case, so this is a text-based version if that's easier to follow.

These instructions will assume you've already shimmed your keyboard case's connectors and updated your installation. Be sure to check the tips below the instructions if you have any problems with them.

I based my steps off this forum thread here, with some steps taken from replies to the original post: https://forum.pine64.org/showthread.php?tid=16156. Thanks to Rob Johnson for linking me to the thread! My version is influenced by what they wrote, as I looked for the ppkb package since they mentioned it.

These steps should work with the Beta Edition of the original PinePhone, not sure about the Pro when running Tow-Boot or older versions of the original PinePhone. Some or all of these steps may also not work without systemd (I'd like to have instructions for non-systemd distros like postmarketOS, I'm just not aware of any right now).

  1. Run cd /boot.
  2. Run sudo nano boot.txt.
    Note: You can use any text editor you prefer, but it would be easiest to use terminal-based ones.
  3. At the setenv bootargs line, add a space, then type kb151.disable_input.
  4. Press Ctrl+X, lift off the keys, then type y, then press Enter.
  5. Run sudo pp-uboot-mkscr.
    Note: The original tutorial used sudo ./mkscr which may work if the other command doesn't. I don't know what command to run for Tow-Boot, but it may be listed at the top of the boot.txt file in its comments, so be sure to check there if nothing seems to work.
  6. Run sudo pacman -Syu ppkb-tools.
    Note: This command will differ depending on your distro and/or package manager, but this is for Manjaro and should work for Arch and Arch-based distros in general.
  7. Run sudo systemctl enable ppkb-i2c-inputd.service.
    Note: I don't currently know how to make this work on non-systemd distros, sorry.
  8. Reboot.
  9. Test it by pressing Ctrl+Alt+Pine+3, and return to the default TTY (at least for Manjaro Plasma Mobile; may differ by distro) with Ctrl+Alt+Pine+2.

Tip: If you have trouble typing the symbols on the left side of the F# (Function number key) labels, you can use Function+Pine+#, where # is the number you get when you push a top-row key (that isn't Escape or Backspace) without using modifiers. For example, Function+Pine+7 gets you a hyphen.

Tip 2: Add fbcon=rotate:1 to the end of the setenv bootargs line for a TTY that's easier to use with the keyboard case (thanks to Tom Poter for the original comment! I've retyped it slightly differently.)