1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems

Facebook RSS Twitter Twitter Google Plus

Phoronix Test Suite

OpenBenchmarking Benchmarking Platform
Phoromatic Test Orchestration

Building & Running The Ubuntu Mir Display Server


Published on 04 March 2013 09:48 PM EST
Written by Michael Larabel in Ubuntu
Add A Comment

The latest coverage of today's surprise announcement of Canonical developing Mir, their own display server for Ubuntu, is information on building and running the Mir display server with the code they open-sourced today. There's also a Phoronix video showcasing the (sad) state of the Mir client demo.

The Mir server and client code is written in C++ and is hosted within a Bzr Launchpad repository. As of this evening there's been 461 commits to the Mir repository since it was internally created in June of last year. As far as who's developing this display server not derived from X.Org or Wayland, see The Developers Behind The Mir Display Server.

Within the Mir's repository is a HACKING file that goes over the process of building and running Mir. It's a fairly straight-forward process. Mir does make use of the C++ Boost libraries.

In terms of how large Mir is at this point, the src/ directory that is home to the client, protobuf, server, graphics, input, and other code for Mir, is just 14,661 lines of code (that also includes a bit of the cmake files and other files). Or at least what's publicly exposed by Canonical for now...

Running Mir requires a modified Mesa stack. For the Gallium3D/Mesa drivers to work with Mir, a new EGL DRI2 component to Mesa is needed, which Canonical has in their own packaged version of Mesa within a Launchpad PPA but they haven't yet attempted to upstream their Mir changes for Mesa. The Mesa package can be found in this PPA. They also have a Mir package, which is actually packaged for the Quantal (Ubuntu 12.10) repository while the Mesa package is only packaged for Raring (Ubuntu 13.04). However, the Mir packages in there right now aren't too useful and don't include Canonical's demo clients for Mir.

Right now Mir is said to only work with the Intel and Radeon open-source graphics drivers, but evidently is not yet working for Nouveau. In terms of binary drivers supporting Mir, Canonical claims to be pressuring AMD and NVIDIA to support it, but that will likely be quite some time until those blobs make the changes to fully support EGL and other requirements. Canonical's Mir design plan is also for Android graphics drivers to be compatible with Mir. Mir's requirements are on EGL (not GLX) and OpenGL / OpenGL ES.

As covered within their hacking file, right now running Mir does require running an X.Org Server. Mir isn't running atop an X.Org Server, but rather the server needs to be running for setting up the graphics adapter and the necessary access rights. Mir is simply run from a separate virtual terminal while the X.Org Server is running, but if it's not, the document says you will get "strange errors." Switching between the xorg-server and Mir sessions will also result in X dieing.

Found within the Mir repository is a mir_demo_client_accelerated binary that they suggest as the Mir demo application at this point. I built Mir from the latest source (Revision 461) and installed the modified Mesa 9.1 drivers. This was happening from an Intel Ivy Bridge setup with the HD 4000 graphics and running an Ubuntu 13.04 snapshot.

When following the instructions for building and running the Mir demo, I was less than impressed... Embedded below is the minute-long video that shows switching from X.Org into the VT and running this accelerated Mir client demo.

There isn't much at all yet to this Mir client demo. Mir might be capable of more, but not what's being shown from this demo. The Mir un-accelerated demo version also doesn't do much.

Thinking I was perhaps overlooking something or that it was broken, I dug deeper. I then came across this Launchpad Blueprint for Mir. This page shows the official items on Mir that they still have to do:

- Modality state into surface model
- Window decoration
- Window resizing
- Morphing
- Semi-maximised states
- Proximity regions
- Overlay scrollbar
- Side stage
- Input transformation
- Workspaces in surface model
- Multi-display
- Non-homogeneous DPI displays
- Window deformation
- Inter-session effects
- Ready notification
- Boot / shutdown
- Mir on Mir
- Greeter on Mir
- Client transition animations
- Form-factor information status update
- Remote access
- Shell input control - pointer barriers, acceleration etc
- GTK+ support
- XUL support
- Libreoffice support
- Update control center
- Multi-seat?
- Input methods, accessibility

So while there's some early Mir code out there, initial Mir bindings for Qt5 within the QMir code-base, and some early work on LightDM support for Mir, they have a hell of a lot ahead of them.

Seeing as Canonical doesn't have any serious low-level Linux graphics developers as part of the small team working on Mir and the company has further alienated upstream X.Org/Wayland/Mesa developers with Mir, it will be a miracle if Mir is ready for all form factors in a production environment by Ubuntu 14.04 LTS next year.

Ubuntu LTS releases used to be about stability and well-tested code so it's a surprise they plan to introduce the new display server into Ubuntu 14.04. For at least Ubuntu 14.04 on the desktop I think it will be more likely they will end up pushing Mir as just an experimental feature while an X.Org Server will continue doing the bulk of the work. Then again, it was just last year that Canonical thought they would have a Wayland-based System Compositor for Ubuntu 12.10.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux News
  1. Premium Users Now Can Experience Our New Site
  2. XFS Will Get DAX Support In The Linux 4.2 Kernel
  3. X.Org Server Lands More Mode-Setting/GLAMOR Improvements, But No Sign Of 1.18
  4. Linux Mint 17.2 Officially Released With Cinnamon/MATE Flavors
  5. Fedora For MIPS Is Now Out In Testing, Supports The Creator CI20
  6. KDE Plasma 5.3.2 Fixes Shutdown Scripts, Few Dozen Other Bugs
  7. KDE Marks Four Years In Its Process Of Porting To Wayland
  8. Btrfs In Linux 4.2 Brings Quota Updates, Many Fixes
  9. Latest Rumor Pegs Microsoft Wanting To Buy AMD
  10. The Next-Gen Phoronix Site Experience Is Almost Ready
Latest Articles & Reviews
  1. How KDE VDG Is Trying To Make Open-Source Software Beautiful
  2. Attempting To Try Out BCache On The Linux 4.1 Kernel
  3. CompuLab's Fitlet Is A Very Tiny, Fanless, Linux PC With AMD A10 Micro
  4. AMD A10-7870K Godavari: RadeonSI Gallium3D vs. Catalyst Linux Drivers
Most Viewed News This Week
  1. Kubuntu 15.10 Could Be The End Of The Road
  2. Linus Is Looking Forward To Merging KDBUS, But Not Convinced By Performance
  3. NVIDIA Starts Supplying Open-Source Hardware Reference Headers
  4. KDBUS Won't Be Pushed Until The Linux 4.3 Kernel
  5. Linux 4.2 Kernel Gets Port To New Processor Architecture
  6. The Staging Pull For Linux 4.2: "Big, Really Big"
  7. SteamOS "Brewmaster" Is Valve's New Debian 8.1 Based Version
  8. Jonathan Riddell Steps Down From The Kubuntu Council