The Wayback Machine - https://web.archive.org/web/20121022154305/http://wiki.meego.com/Wayland_in_MeeGo
Meego Wiki
Views

Wayland in MeeGo

From MeeGo wiki
Jump to: navigation, search

Contents

Introduction

This wiki outlines the community effort for bringing a proof-of-concept of a Wayland based user interface running on MeeGo version 1.3 (due October). It will not be a fully operational system that users can use it, but it will definitely demonstrates all the features and benefits of Wayland replacing X11, that we will be aiming next.

A couple of decisions are being settle down at this point to understand exactly what is the PoC we want, and mainly one that fits with the planned schedule. For instance, previously we thought in bringing a shiny Qt5 beta with the QSceneGraph model for Wayland native clients, but that had to be dropped due Qt 5 release date not matching MeeGo's. In this page we are trying to organize exactly these kind requirements and eventually make some decisions to have the PoC in place.

Roadmap for MeeGo 1.3

(updated on Aug 16)

If you want to discuss Wayland specific architecture, please refer to its mailing list; if you want to discuss MeeGo changes related to get Wayland, then meego-dev is the best channel and we are trying to summarize the topics here.

The items "more less" done are the following:

Description Details Contacts
Package wayland and wayland-demos repos with dependencies we need to constantly package this and push it into the meego building system. Just packaging Wayland and adding it to the meego repo is not going to disturb the current X11 based UX, so we should push it into the main repo (?). And even though we will need to update Wayland in a non-backwards compatible way between now and MeeGo 1.3, having the RPM work done, it will be easy to just update the RPM when we need to push a new snapshot. Another challenge is to keep the delta between Wayland and X11 specific small, so we try to avoid things like two Mesa packages.

Some work was done already although it has outdated versions of those packages - check the build system - but we need to move it into core MeeGo so we can start building on it.

Ander Conselvan, Carsten Munk, Tiago, Kristian
Update Qt to version 4.8 compiled for qpa with opengl es2 and the xcb and wayland plugins This is in itself a significant step since when we switch to 4.8 with qpa (lighthouse), we essentially replace the Qt X11 backend with a new, from scratch implementation. Another risk here is that it's not source compatible with the legacy X11 backend, in particular the QX11Info object is no longer available. Markus Lehtonen
Patch X server and DDX drivers in MeeGo to run under Wayland We need this for the backwards compatibility story (fullscreen X apps), but it's also a fast path to getting all apps running under Wayland. Most meego-qml-launcher based apps will come over when we port the launcher, but in the MeeGo 1.3 time frame we will not be able to move all apps - the browser links gtk2, and the flash plugin ties in to X in a big way. We may have to keep some apps running as X clients under Wayland. The bulk of the work is in an X server plugin:
 http://cgit.freedesktop.org/~krh/xserver/log/?h=xwayland

and there is also a bit of per-driver work. For intel genX chipsets, the patch is around +100 lines:

 http://cgit.freedesktop.org/~krh/xf86-video-intel/log/?h=xwayland

We still need to make a similar changes for SGX DDX. None of this affects the core X server unless it's enabled (by passing the -wayland and -rootless command line options) so it should be safe to ship in core meego. On the wayland-compositor side, there's a little more work to be done to integrate the X client apps into the compositor. We need to connect to X as a WM and read and set window properties that the meego app rely on (meego orientation and such).

Kristian and Benjamin (bnf)
meego-ux-daemon using Wayland types and QPlatformNativeInterface We have something already working:
 https://gitorious.org/wayland-meego-ux/meego-ux-daemon
Kristian, Tiago


And following the TODO list we aim to the October deadline:

Description Details Contacts
meego-qml-launcher using Wayland types and QPlatformNativeInterface We need to rephrase some of the window properties MeeGo uses (both EWMH and MeeGo specific ones) in a meego wayland interface that we can use to communicate orientation, window type etc. Kristian, Tiago
browser case Tt's a standalone application and it looks like it links to gtk2 for some things (maybe just to be able to provide the plugin interface) and needs to load the flash plugin, and the plugin interface references libX11 and libXt symbols (goes all the way back to Netscape). In the short term we're probably better of just running it as an X client, but it sounds like we do have the option of changing the flash source and can fix this in the future. Tiago
video playback Video player will need custom work, to be able to push raw yuv buffers to the compositor, which will then manage the hw overlays. Sree done some work already:
 gstreamer-wayland video sink(for s/w decoders): https://gitorious.org/gst-wayland
 gstreamer-wayland video sink(for h/W decoder,libva):https://gitorious.org/~sreerenj/vaapi/sree-gstreamer-vaapi
Sreerenj Balachandran
uxlaunch make it launches wayland instead
End of lifecycle

Getting and Running

MeeGo provides experimental packages (from devel:wayland project in OBS) which can run on a couple of Intel Graphics chipsets, and SGX is on the way as well. If you are interested in the UX hacking, then definitely chroot is the best choice. Driver developers may want to built a proper image and flash it on a device.

Chroot environment

  • Download a recent MeeGo image
  $ wget http://download.meego.com/snapshots/archive/testing/1.2.80/1.2.80.8.0.20110629.89/1.2.80.8.0.20110629.89/images/meego-tablet-ia32-pinetrail/meego-tablet-ia32-pinetrail-1.2.80.8.0.20110629.89.img
  • unpack it in a local directory
  $ sudo mic-chroot --unpack-only -s /home/user/meego/meego-chroot meego-tablet-ia32-pinetrail-1.2.80.8.0.20110629.89.img
  • log in the chroot'ed environment:
  $ sudo mic-chroot meego-chroot
  • download wayland and trunk repositories (you might need set up your proxy connections before)
  # cd /etc/zypp/repos.d
  # wget http://download.meego.com/live/devel:/wayland/Trunk/devel:wayland.repo
  # wget http://download.meego.com/live/Trunk/standard/Trunk.repo
  • disable the others
  # rm oss.repo non-oss.repo adobe.repo
  • in my 64 bits machine, I had to change /etc/zypp/zypp.conf and set the architecture field as "arch = i586"
  • then update the environment, which will download a bunch of repositories (~300 MiB)
  # zypper ref && zypper up
  • and install the compositor, qt's backend and dbus (for uxlaunch actually)
  # zypper in wayland-demos qt-plugin-wayland dbus-x11 xterm
  • go outside the chroot
  # exit
  • in your the host machine, let the X server accept connections from any host
  $ xhost +
  • Go back inside chroot, switch to "meego" user and set the XDG env var
  $ sudo mic-chroot meego-chroot
  # su meego
  $ echo "export XDG_RUNTIME_DIR=$HOME/.xdg" >> ~/.bashrc
  $ bash ~/.bashrc
  • and voilà! run Wayland, launching meego shell with meego-ux-daemon
  $ wayland-compositor -smeego-tablet-shell.so -x

image with Wayland built-in

TODO TODO TODO

  • remove the following, cause it keeps segfaulting some Qt apps - ouch:
 # zypper remove contextkit-meego
  • install:
 # zypper in gst-wayland gst-wayland-demo
  • delete unwanted desktop apps:
 # cd /usr/share/applications
 # rm meego-app-browser.desktop meego-app-contacts.desktop meego-app-email.desktop meego-app-music.desktop meego-app-photos.desktop meego-app-tasks.desktop meego-app-video.desktop qtdemo.desktop
  • and then
 # uxlaunch
Personal tools