The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Adaptation/N9-N950/Wayland

From Mer Wiki
< Adaptation | N9-N950
Revision as of 12:38, 9 July 2013 by Thp (Talk | contribs)

Jump to: navigation, search

Contents

Introduction

Some basic instructions for trying out Wayland on Nemo on N9/N950. These instructions will get simpler over time. If you need help with it, ask me (w00t) on IRC.

This should be obvious, but use these instructions with care. They can get you to a point where your UI is not bootable very easily. Don't do this unless you know what you're doing and what the risks are.

Related links

Installing wayland + SGX WSEGL

   zypper ar http://repo.merproject.org/obs/home:/w00t:/branches:/nemo:/devel:/hw:/ti:/omap3:/n9xx-common/next_armv7hl/ wayland
   zypper ur
   zypper ref
   zypper in ti-omap3-sgx-wayland-wsegl wayland

I also had to install qmlscene, as it wasn't installed by default:

   zypper in qt5-qtdeclarative-qmlscene

Rebooting and stopping X11

  • Reboot the device
  • Edit /etc/powervr.ini, add WindowSystem=/usr/lib/waylandwsegl.so to [default] section
  • systemctl stop user-session@100000.service

Starting QML Compositor

   cd /usr/lib/qt5/examples/qtwayland/qml-compositor/
   QT_QPA_EGLFS_DEPTH=16 WSEGL_DEBUG=5 QT_COMPOSITOR_NEGATE_INVERTED_Y=1 ./qml-compositor -platform eglfs 

Here is what I get as output (N950):

 wayland-wsegl: eglInitialize
 evdevtouch: Using device /dev/input/event3
 min X: 0 max X: 853
 min Y: 0 max Y: 479
 min pressure: 0 max pressure: 0
 device name: Atmel mXT Touchscreen
 Protocol type B (mtdev)
 wayland-wsegl: Initializing framebuffer
 ulMaxFlipChains: 1
 ulMaxBuffersInChain: 2
 eFormat: 1
 ulWidth: 856
 ulHeight: 768
 lStride: 1712
 ulMinFlipInterval: 0
 ulMaxFlipInterval: 3

Starting Example Applications

Starting the qmlscene without any content:

WAYLAND_DEBUG=1 QT_WAYLAND_DISABLE_WINDOWDECORATION=1 QT_QPA_EGLFS_HIDECURSOR=1 /usr/lib/qt5/bin/qmlscene -platform wayland

Here is what I get as output from the compositor (N950):

changeCursor QSize(-1, -1) 1 1
changeCursor QSize(10, 16) 1 1
Surface::damage() null buffer
QQmlComponent: Component is not ready
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:90: TypeError: Cannot set property 'targetWidth' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:113: TypeError: Cannot read property 'parent' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:113: TypeError: Cannot read property 'parent' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:114: TypeError: Cannot read property 'runDestroyAnimation' of null
changeCursor QSize(-1, -1) 1 1
changeCursor QSize(10, 16) 1 1
Surface::damage() null buffer
QQmlComponent: Component is not ready
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:90: TypeError: Cannot set property 'targetWidth' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:113: TypeError: Cannot read property 'parent' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:113: TypeError: Cannot read property 'parent' of null
file:///usr/lib/qt5/examples/qtwayland/qml-compositor/main.qml:114: TypeError: Cannot read property 'runDestroyAnimation' of null

Going back to X11

  • Edit /etc/powervr.ini and comment out the WindowSystem= line you added
  • Make sure qmlcompositor is not running
  • systemctl start user-session@100000.service

Original instructions

first things first, if you had it installed before:

   ssu rr wayland
   ssu ur

then:

   zypper ref -f 1
   zypper ref -f 2 # updates both the adaptation repos
   zypper dup # should offer to upgrade ti-omap3-sgx and install ti-omap3-sgx-wayland-wsegl
   [11:20:18] <w00t> now reboot your device and make sure it starts the existing user session
   [11:20:43] <w00t> (it won't use wayland until we modify powervr's ini file, and ideally, we haven't broken x11 with this :))
   [11:24:09] <Vesuri> rebooted, looks good
   [11:24:17] <w00t> \o/
   [11:24:18] <w00t> ok.. sec
   [11:24:28] <w00t> open /etc/powervr.ini as root
   [11:24:40] <w00t> in '[default]' section, add: WindowSystem=/usr/lib/waylandwsegl.so
   [11:25:06] <w00t> zypper in qt5-qtwayland-wayland_egl-examples qt5-plugin-imageformat-jpeg qt5-plugin-platform-eglfs qt5-qtsvg-plugin-imageformat-svg
   [11:25:44] <w00t> systemctl stop user-session@1000.service
   [11:26:07] <w00t> cd /usr/lib/qt5/examples/qtwayland/qml-compositor/
   [11:26:27] <w00t> QT_QPA_EGLFS_DEPTH=16 WSEGL_DEBUG=5 QT_COMPOSITOR_NEGATE_INVERTED_Y=1 ./qml-compositor -platform eglfs
   [11:29:27] <Vesuri> oh yeah, can see the qml compositor screen
   [11:29:35] <w00t> \o/
   [11:29:42] <w00t> now.. you should be able to start a simple client
   [11:29:50] <w00t> let me get you minimer (i should really just package the damn thing)
   [11:29:54] <Vesuri> I have it
   [11:29:56] <w00t> oh
   [11:29:58] <w00t> excellent
   [11:30:15] <w00t> WAYLAND_DEBUG=1 QT_WAYLAND_DISABLE_WINDOWDECORATION=1 QT_QPA_EGLFS_HIDECURSOR=1 /usr/lib/qt5/bin/qmlscene -platform wayland /home/nemo/minimer/main.qml
   [11:34:33] <w00t> some fair warnings:
   [11:34:45] <w00t> performance is not going to be great, you can expect around 40fps fairly consistently
   [11:34:58] <w00t> (it's always in composited mode, there is no direct rendering at this stage, maybe ever)
   [11:35:39] <w00t> i also fully expect some crashes/etc when running things, i've even seen the odd one when interacting with qml compositor for instance.. backtraces are useful if you can get them
Day changed to 12 Jun 2013
11:56 < w00t> [wayland compositing] is actually still faster than x11 when composited in the same scenario I tested, though
11:58 < w00t> direct rendering requires tinkering with a QPA plugin, and it's all a little complicated
12:03 < w00t> it's needed [on any device] where you want direct rendering
12:07 < w00t> with direct rendering, the point is to flip stuff from the client directly on screen instead of being composited (inside... the compositor!), which then gets shoved on screen - if that makes more sense
12:07 < w00t> QPlatformScreenBuffer and QPlatformScreenPageFlipper are the things to look into
12:08 < sledges> any rudimentary wayland (non-qt) apps that do this?
12:09 < w00t> not really.. it's qt-only in this case given half of it lives inside the qpa plugin
12:10 < w00t> and, to make life complicated, there isn't really an implementation of it in existence yet :)
Personal tools