Plasma Mobile on armhf

For this exercise, the i.MX6 dev board is used, starting from imx6.img built from the d0349a9 commit (image-builder repo). All packages were built on this board to get .debs for the native armhf architecture.

Setting up Development Environment

On the i.MX6 system, install some initial plasma mobile build dependencies:

purism@pureos:~$ sudo apt-get install plasma-workspace-wayland git dpkg-dev cmake debhelper extra-cmake-modules kwayland-dev libkf5declarative-dev libkf5notifications-dev libkf5people-dev libkf5service-dev libsystemd-dev libtelepathy-qt5-dev pkg-kde-tools plasma-framework-dev qt5-default qtdeclarative5-dev fakeroot

Additionally you will need to install plasma-phone-components and plasma-settings and some of their dependencies that are not available in Debian testing repos. I have built these and here is a tarball containing these armhf built packages. However if you would like to build them yourself, here are some steps to do that.

plasma-phone-components

Get the plasma-phone-components repos:

purism@pureos:~$ git clone https://github.com/KDE/plasma-phone-components.git
purism@pureos:~$ git clone https://github.com/debian-pm/plasma-phone-components-packaging.git

Build plasma-phone-components:

purism@pureos:~$ cd plasma-phone-components
purism@pureos:~/plasma-phone-components$ tar czvf plasma-phone-components_0.7+git20180223.orig.tar.gz .*
purism@pureos:~/plasma-phone-components$ mv plasma-phone-components_0.7+git20180223.orig.tar.gz ..
purism@pureos:~/plasma-phone-components$ cp -r ../plasma-phone-components-packaging/debian .
purism@pureos:~/plasma-phone-components$ dpkg-buildpackage -sa -us -uc

The build results in ~/plasma-phone-components_0.7+git20180223-1_armhf.deb but before we can install it, we need to build and install a few dependencies:

purism@pureos:~$ sudo apt-get install powerdevil qml-module-org-kde-kio qml-module-qtquick-localstorage fonts-oxygen kde-telepathy-kpeople libkf5contacts-dev

kpeople-vcard

This is the only dependency for plasma-phone-components that we cannot just install from apt.

Get the kpeople-vcard repos:

purism@pureos:~$ git clone https://cgit.kde.org/kpeoplevcard.git
purism@pureos:~/tmp$ git clone https://github.com/plasma-phone-packaging/kpeoplevcard.git

Note that the second link is the needed Debian dir and a small change is needed:

diff --git a/debian/changelog b/debian/changelog
index c2c864f..b2875ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-kpeoplevcard (0.0+git20150716) vivid; urgency=medium
+kpeoplevcard (0.0+git20150716-1) vivid; urgency=medium

Make the tarball and then just as with the plasma-phone-components, put the debian dir in the kpeoplevcard dir and build:

purism@pureos:~/kpeoplevcard$ tar czvf kpeoplevcard_0.0+git20150716.orig.tar.gz .*
purism@pureos:~/kpeoplevcard$ mv kpeoplevcard_0.0+git20150716.orig.tar.gz ..
purism@pureos:~/kpeoplevcard$ cp -r ~/tmp/kpeoplevcard/debian .
purism@pureos:~/kpeoplevcard$ dpkg-buildpackage -sa -us -uc

The build results in ~/kpeople-vcard_0.0+git20150716-1_armhf.deb

Install both kpeople-vcard and plasma-phone-components:

purism@pureos:~$ sudo dpkg -i kpeople-vcard_0.0+git20150716-1_armhf.deb
purism@pureos:~$ sudo dpkg -i plasma-phone-components_0.7+git20180223-1_armhf.deb

plasma-settings

Get the plasma-settings repos:

purism@pureos:~$ git clone https://anongit.kde.org/plasma-settings.git
purism@pureos:~$ git clone https://github.com/debian-pm/plasma-settings-packaging.git

Make the tarball and put the debian dir in the plasma-settings dir:

purism@pureos:~$ cd plasma-settings
purism@pureos:~/plasma-settings$ tar czvf plasma-settings_0.0.1+git20180223.orig.tar.gz .*
purism@pureos:~/plasma-settings$ mv plasma-settings_0.0.1+git20180223.orig.tar.gz ..
purism@pureos:~/plasma-settings$ cp -r ~/plasma-settings-packaging/debian .

Install needed dependencies:

purism@pureos:~/plasma-settings$ sudo apt-get install libaccounts-glib-dev libaccounts-qt5-dev libgettextpo-dev libkaccounts-dev libkf5archive-dev libkpimgapi-dev libsignon-qt5-dev qtbase5-private-dev kaccounts-providers qml-module-org-kde-kaccounts qml-module-org-kde-activities

But to successfully build plasma-settings, this dependency had to be removed from the control file.

Build plasma-settings:

purism@pureos:~/plasma-settings$ dpkg-buildpackage -sa -us -uc

The build results in ~/plasma-settings_0.0.1+git20180223-1_armhf.deb that can be installed:

purism@pureos:~$ sudo dpkg -i plasma-settings_0.0.1+git20180223-1_armhf.deb

Running Plasma Mobile

First, stop weston and open up another tty on the board:

purism@pureos:~$ sudo systemctl stop weston

Now there are two ways to run Plasma Phone shell, using QPainter backend or OpenGL based platform. However since kwin_wayland have zwp_linux_dmabuf support work in progress (under review), you can not use wayland clients and it produces the dead pixels instead of Plasma interface. To workaround this issue, edit /usr/bin/plasma-phone script to remove export QT_QPA_PLATFORM=wayland.

Run kwin_wayland from another tty:

purism@pureos:~$ /usr/bin/kwin_wayland --xwayland --drm plasma-phone

Note that to capture the plasma-phone boot logs, you can always add “2> kwin.log” to the end of the kwin_wayland command. Additional plasma logs can be found in /tmp/plasmashell_logs.

At this point plasma mobile should be running on your i.MX6 board!

Note that there is a known issue where the mouse functions but is invisible.

../_images/plamo.jpg

Onscreen Keyboard

To run the onscreen keyboard in Plasma Mobile, you’ll first need to install qtvirtualkeyboard-plugin. This application is in Debian but not available for armhf so get the package soure from Debian, build and install it:

purism@pureos:~$ wget http://http.debian.net/debian/pool/main/q/qtvirtualkeyboard-opensource-src/qtvirtualkeyboard-opensource-src_5.9.2+dfsg.orig.tar.xz
purism@pureos:~$ wget http://http.debian.net/debian/pool/main/q/qtvirtualkeyboard-opensource-src/qtvirtualkeyboard-opensource-src_5.9.2+dfsg-1.debian.tar.xz
purism@pureos:~$ tar xf qtvirtualkeyboard-opensource-src_5.9.2+dfsg.orig.tar.xz
purism@pureos:~$ tar xf qtvirtualkeyboard-opensource-src_5.9.2+dfsg-1.debian.tar.xz'
purism@pureos:~$ cd qtvirtualkeyboard-opensource-src-5.9.2 && sudo mv ../debian .
purism@pureos:~/qtvirtualkeyboard-opensource-src-5.9.2$ dpkg-buildpackage -sa -us -uc

This will build qtvirtualkeyboard-plugin and it’s dependent qml-module-qtquick-virtualkeyboard and install them and start Plasma Mobile:

purism@pureos:~$ sudo dpkg -i qml-module-qtquick-virtualkeyboard_5.9.2+dfsg-1_armhf.deb qtvirtualkeyboard-plugin_5.9.2+dfsg-1_armhf.deb

Once you have a Plasma Mobile desktop, check the keyboard status and enable it:

purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isEnabled
false
purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isenable
purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isEnabled
true

Now, your onscreen keyboard should work. To test this, open kwrite and click in the text field. You should see that the keyboard is initialized and functioning!

../_images/osk.jpg

Note that before you launch kwin_wayland, you will get a nicer keyboard if you first set QT_VIRTUALKEYBOARD_STYLE:

purism@pureos:~$ export QT_VIRTUALKEYBOARD_STYLE=Plasma
purism@pureos:~$ kwin_wayland --drm plasma-phone
../_images/plasma_osk.jpg