January 1, 2019

TinkPhone: KDE Plasma Mobile on a Raspberry Pi

TinkPhone: KDE Plasma Mobile on a Raspberry Pi

As part of my TinkPhone project (see: TinkPhone: Project Synopsis - Raspberry Pi Smart Phone), I want to test out various mobile operating systems.

My current favorites are KDE Plasma Mobile and Ubuntu Touch. For this blog post, I'll focus on KDE Plasma Mobile.

KDE Plasma Mobile

KDE Plasma Mobile is a mobile operating system built on top of GNU/Linux, with privacy and open sourced technology in mind. Based on KDE, a desktop environment, it is configured and tailored for cell phones with touchscreens. It has a solid and dedicated community supporting it.

More information can be found on the main website (https://www.plasma-mobile.org) and in their documentation (https://docs.plasma-mobile.org/).

Loading Plasma Mobile onto an RPi

I followed the how-to posted at https://community.kde.org/Raspberry_Pi. It's fairly straightforward. I've tweaked the instructions a bit and posted what I did below. I've also pointed to a new PM Tools repo, as suggested by it's maintainer. Note: I'm using a Raspberry Pi 3 B+

  1. Download and install Raspbian Stretch Lite on MicroSD card.
  2. Put MicroSD card into Raspbian boot up.
  3. Interact with local shell or via SSH.
  4. Update the Raspberry Pi firmware and reboot.
    ~/$ sudo rpi-update
    ~/$ sudo reboot
  5. Activate the GL driver by adding "dtoverlay=vc4-kms-v3d" to /boot/config.txt
    1. Open config.txt in a text editor
      ~/$ sudo nano /boot/config.txt
    2. Add to a new line in the config file:
      dtoverlay=vc4-kms-v3d
    3. Save and Exit and Reboot
  6. Ensure that dirmngr is installed.
    ~/$ sudo apt update && sudo apt install -y dirmngr
  7. Change the Raspbian apt repo from "stretch" to "buster" and add Debian and Plasma Mobile repos.
    1. Open sources.list in a text editor
      ~/$ sudo nano /etc/apt/sources.list
    2. Comment out the "stretch" repo:
      #deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
    3. Add the following repos to sources.list
      deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
      deb http://ftp.debian.org/debian/ buster main contrib non-free
      deb https://repo.kaidan.im/debpm buster main
    4. Save and Exit
  8. Add keys for new repos.
    ~/$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 CF319275556E40EC
  9. Update the Raspberry Pi image.
    ~/$ sudo apt update && sudo apt -y full-upgrade && sudo apt autoclean && sudo apt -y autoremove
  10. Create user 'phablet'.
    ~/$ sudo adduser phablet
  11. Add 'phablet' to sudoers group.
    ~/$ sudo usermod -aG sudo phablet
  12. Change to user 'phablet'.
    ~/$ su - phablet
    Enter the user password for 'phablet'
  13. Remove the default 'pi' user.
    ~/$ sudo deluser pi
  14. Install plasma-phone-components, plasma-phone-settings, plasma-settings, kwin-wayland, simplelogin and dbus-x11.
    ~/$ sudo apt -y install plasma-phone-components plasma-phone-settings plasma-settings kwin-wayland simplelogin dbus-x11

Finished Product: KDE Plasma Mobile

Once you reboot, it should load right up.

Issues and Todo

Orientation: As it is right now, it only loads in landscape mode. I'm working with one of the developers to troubleshoot this and will update this post if we sort it out.

Onscreen Keyboard: The developers recommend using 'qtvirtualkeyboard'. I haven't looked into this yet, but will check it and other onscreen keyboards.

Shoutouts

I originally live posted this on Mastodon (Thread) and several folks reached out with support:

  • JBB let me know he'd moved the Plasma Mobile Tools repo (different from the one posted in the original how-to)
  • Bhushan Shah reached out to offer help in troubleshooting the screen orientation issue.
  • And the Ubuntu Touch team reached out to encourage me to try their operating system on a Raspberry Pi as well! I look forward to working with them, too!
  • Many other folks chimed in while I was building this out to offer support and suggestions! The open source and hacker community in the Fediverse is awesome!