Jump to content

Plasma Mobile

From postmarketOS Wiki
Revision as of 09:17, 30 August 2017 by PureTryOut (talk | contribs) (Running)
Plasma Mobile
Plasma Mobile running in qemu
Plasma Mobile running in qemu
Name Plasma Mobile
Graphics stack KWin on Wayland or Xorg
Toolkit QT5
In postmarketOS
Package postmarketos-ui-plasma-mobile
Status Available

Overview

The basic minimum shell has been ported to postmarketOS, and can now be tested.

To install it on your device run ./pmbootstrap.py init and choose plasma-mobile in the interface section. Alternatively manually install it with ./pmbootstrap.py install --add plasma-mobile,plasma-phone-components,dbus-nox11.

For instructions on running Plasma Mobile you can use the KDE website: https://community.kde.org/Plasma/Mobile/RunningApps

Packaging efforts have been documented here.

Debugging

Create ~/.config/QtProject/qtlogging.ini with the following content:

[Rules]
org.kde.kwindowsystem.info=true
org.kde.kwindowsystem.warning=true
org.kde.kwindowsystem.critical=true
org.kde.kwindowsystem.debug=true
kwin_core.info=true
kwin_core.warning=true
kwin_core.critical=true
kwin_core.debug=true
kwineffects.info=true
kwineffects.warning=true
kwineffects.critical=true
kwineffects.debug=true
libkwineffects.info=true
libkwineffects.warning=true
libkwineffects.critical=true
libkwineffects.debug=true
libkwinglutils.info=true
libkwinglutils.warning=true
libkwinglutils.critical=true
libkwinglutils.debug=true
libkwinxrenderutils.info=true
libkwinxrenderutils.warning=true
libkwinxrenderutils.critical=true
libkwinxrenderutils.debug=true
kwin_wayland_drm.info=true
kwin_wayland_drm.warning=true
kwin_wayland_drm.critical=true
kwin_wayland_drm.debug=true
kwin_wayland_framebuffer.info=true
kwin_wayland_framebuffer.warning=true
kwin_wayland_framebuffer.critical=true
kwin_wayland_framebuffer.debug=true
kwin_wayland_hwcomposer.debug=true
kwin_wayland_backend.info=true
kwin_wayland_backend.warning=true
kwin_wayland_backend.critical=true
kwin_wayland_backend.debug=true
kwin_wayland_x11windowed.info=true
kwin_wayland_x11windowed.warning=true
kwin_wayland_x11windowed.critical=true
kwin_wayland_x11windowed.debug=true
kwin_platform_x11_standalone.info=true
kwin_platform_x11_standalone.warning=true
kwin_platform_x11_standalone.critical=true
kwin_platform_x11_standalone.debug=true
kwin_libinput.info=true
kwin_libinput.warning=true
kwin_libinput.critical=true
kwin_libinput.debug=true
kwin_tabbox.info=true
kwin_tabbox.warning=true
kwin_tabbox.critical=true
kwin_tabbox.debug=true
kwin_decorations.info=true
kwin_decorations.warning=true
kwin_decorations.critical=true
kwin_decorations.debug=true
kwin_scripting.info=true
kwin_scripting.warning=true
kwin_scripting.critical=true
kwin_scripting.debug=true
kwin_xkbcommon.info=true
kwin_xkbcommon.warning=true
kwin_xkbcommon.critical=true
kwin_xkbcommon.debug=true
kwin_qpa_plugin.info=true
kwin_qpa_plugin.warning=true
kwin_qpa_plugin.critical=true
kwin_qpa_plugin.debug=true

Running

If the device supports OpenGL, the Plasma Shell will automatically launch upon boot. If it doesn't, you'll have to SSH in and add the following to ~/.config/kdeglobals:

[QtQuickRendererSettings]
SceneGraphBackend=software

Then, reboot again to have it launch automatically upon boot.


If you've chosen to install Plasma Mobile manually instead of in ./pmbootstrap.py init you'll have to follow the following instructions.

Setup the required environment variables for kwin:

export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=KDE
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XDG_CURRENT_DESKTOP=KDE
export KSCREEN_BACKEND=QScreen

export KDE_FULL_SESSION=1
export KDE_SESSION_VERSION=5
export KWIN_COMPOSE=Q

export $(dbus-launch)

Right now kwin fails due to lacking permissions on /dev/fb0, so as a workaround you can chown it to your user.

# chown user:user /dev/fb0

Then execute ck-launch-session kwin_wayland --framebuffer --xwayland -- /usr/bin/plasmashell -p org.kde.satellite.phone. As this way you can not view the logs, it's advisable to add 2> /tmp/kwin_log.txt to the end of the command, so it ends up looking like ck-launch-session kwin_wayland --framebuffer --xwayland -- /usr/bin/plasmashell -p org.kde.satellite.phone 2> /tmp/kwin_log.txt. This will make it log to /tmp/kwin_log.txt instead of stdout.