FAQ WAYLAND

WAYLANDThe Anglo-Saxon god powering your next generation graphical desktop.

Imagine it’s the 80s. You’re sitting current system works. As long as the GRAHAM MORRISON in your bedroom prodding away API supports Wayland, the applications at a Commodore 64, listening to the will support Wayland and automatically Why does Wayland need two Human League and staring through look and feel . pages of explanation? thick-rimmed glasses at your 14-inch For most of us, Wayland is colour television. You’re coding a game Brilliant! So how come it hasn’t difficult to understand because and working on the graphics. To get the been adopted already? there’s nothing tangible to click on. best performance, your code is talking It’s not immediately faster than There’s no ‘About’ box to open or directly to the graphics hardware, the the alternatives, which configuration panel to play with. But all venerable VIC-II chip. One of VIC’s best disappointed many early adopters. Nor of these graphical elements can be features was its ability to allow the is Wayland network-transparent, which displayed on your desktop using programmer to create a simple means it doesn’t include the ability to Wayland – it’s just that Wayland hides graphical element, perhaps a spaceship serve desktop sessions across a beneath the surface. The important or a gold miner, called a sprite. All the network in the way that early X11 did. point is that it’s a big improvement over programmer had to do was tell a sprite The complexity that comes with the way this was done before, and is what to look like, what colour to be and network transparency is a burden on currently done now. where to appear. They helped the the current system. That doesn’t mean In simple terms, Wayland has the programmer forget about the nuts and there won’t be an alternative, such as a potential to make your desktops talk to bolts of how their computer worked more VNC-like approach to sharing the your graphics hardware much more and concentrate on the gameplay. image buffer to a remote address. It efficiently. Developers won’t have to This is what Wayland helps to do for just means that any solution won’t be work with an arcane system that’s the modern programmer. They can as overbearing. In fact, the Wayland massively over-engineered and forget about the nuts and bolts of community think that a remote desktop complicated, while users should see graphics and concentrate on usability. solution using Wayland will be better performance benefits and more eye But because software stacks are now than VNC on X11 anyway. candy. It really could revolutionise the several layers deep, Wayland isn’t Linux desktop. aimed at the application programmer X11 is the system that most analogous to our 80s games Wayland is going to replace? That sounds promising. What programmer. More often than not, it will Yes. X11 was designed for a does Wayland actually do? be toolkits such as Gnome’s GTK or different era of computing – the KDE’s that need to talk to Wayland, same 1980s of that old Commodore More often than not it will and it’s these that need to be updated 64. And the key requirement for any “ to accommodate its requirements. 1980s-era enterprise computing be toolkits such as GTK or Qt Application developers shouldn’t need installation was for remote graphical that need to talk to Wayland to change their code, unless they’re terminals. X11 was designed to work ” using something specific to the way the across a network so that low powered,

60 www.linuxvoice.com FAQ WAYLAND

cheap terminals could connect to a that means there’s no easy way of by Samuel Csaba Otto Traian: GNU FDL 1.2+ and CC-BY-SA 3.0+; created 2013-08-28; updated 2013-10-30 centralised computing resource with knowing which features you’re going to GNOME lots of storage, CPU and RAM. get when your application supports a 1.14 W2BGL EGL glue The apps ran on the central different version of a plugin to your X11 libwayland-client code computing resource and sent installation. Come the revolution, W Nautilus instructions back on what to be though, you’ll still be able to run X11 GTK + 3.12 W2BGL EGL glue libwayland-client displayed to each terminal. You can still tools and applications through a W code 2 KDE Plasma do this with X11 today. In fact, you are compatibility layer called XWayland. 3 W 2 Qt 5.1 W2BGL EGL doing this today: X11 uses the same glue 3 libwayland-client code W 2 client and server configuration even Does Wayland do away with 3 when everything is running on the the server and client model? EGL same machine, making the separation No. But the client/server model libwayland-server W libwayland-EGL libEGL-mesa-drivers between the client and server a little used by Wayland makes more EGL libEGL-mesa libGBM Weston, Mutter, KWin, Clayland, OpenGLIES pointless. There are several other big sense. The server is something called . . . OpenVG libGLES-mesa chunks of X11 that have become the Wayland Compositor, and desktops Graphics libOpenVG-mesa Mesa 3D Device Drivers: libGL-mesa-DRI redundant, such as its inclusion of such as E17 or Gnome, going through 1 4 ioctl some core fonts or big parts of the their respective APIs, are considered the libDRM rendering API – features that are now clients. This is why you always see evdev kms drm part of toolkits like GTK and Qt. Then Wayland described as a ‘protocol’, rather Kernel there are the four input subsystems. than a way of rendering graphics. It’s And that network transparency we were the protocol that defines how the clients CPU (registers & L1 & L2 & L3 & L4) & main memory framebuffer GPU (registers & L1 & L2) & graphic memory just talking about? It won’t work when speak to the server. A server could be using modern modern systems with replaced with another server, as long as Wayland is mostly a protocol because it defines how the X11 anyway, because of the way they they understood the same protocol. various components in the stack talk to one another talk to the local graphics hardware. Which is exactly what the people behind [Image Credit: CC-BY-SA 3.0: ScotXW, based on work by Wayland hope will happen. E17 and en:Kristian Høgsberg published at en:freedesktop.org: So what’s to stop Wayland Gnome both have their own Wayland- http://wayland.freedesktop.org. from being just as bad? compatible compositors. Apart from the simplicity, there’s If worked with X11, no legacy code to get in the way Hang on a mo – what’s a why is Wayland any better? of creating a modern graphical compositor? It simplifies the process. X11 was subsystem. Just imagine what X11 You might have first heard the the gateway between the app might be like in another 10 years, and term when desktop effects and the compositing. With Wayland, the it’s difficult to think of how it might started to become popular. Compiz, for applications talk to the compositor adapt to tablets and smartphones. example, is perhaps the best-known without having to go through X11. It’s also capable of using hardware compositing . It adds Wobbly windows with a compositor in specific backends. This won’t be effects such as wobbly windows, X11 worked, but it was much harder if necessary for most installations, but desktop shadows and transparency, you wanted to tell the compositor you there’s a backend for the Raspberry Pi and it does this by compositing the were working with hardware overlays to that has considerably improved its contents of the various windows under play back video. Wayland’s direct line of graphical prowess, when compared to its control into a single image that can communication is a much better way to X11, so perhaps performance might then be used as the desktop. That’s accomplish the same tasks. improve after all. why when you run Compiz, you have to replace whatever window manager Is 2014 going to be the year of If it’s so hopelessly crufty, how you’re currently using. Wayland on the desktop? has X11 lasted so long? In Wayland, the compositor does the We think so, yes. Gnome 3.12 can For one simple reason: it works. same job, only without the help of X11 now operate as a Wayland That’s something that can’t be to turn the final composited image into compositor, bringing native support to said for a great many other the desktop you see. It’s the server the Gnome desktop. So too can technologies. It’s stable, despite its process that pulls all the graphical Enlightenment’s compositor after a complexity, and it’s a well understood components together to create what huge code dump in the middle of and a well integrated part of the you’d expect to see on the screen. For January. The reference compositor for system. Thanks to the development of Wayland, that would mean the server Wayland, named Weston, saw plenty of many other modules that connect to that composes the contents of the updates in January’s 1.4 release, and X11, it’s a modern and adaptable various client application windows there’s a new Qt 5.2 based desktop solution. But it’s never going to get before sending them on to the called Hawaii that uses Weston. Even if simpler nor better adapted to the kind rendering stage. These elements KDE’s Wayland support is slow in of computing we do now. All those already exist, and are not part of making an appearance, you’ll definitely extensions and plugins, for example, Wayland. They’re used to get the output be able to migrate to a Wayland-only lack any kind of version control, and from the compositor to your screen. desktop in the near future.

www.linuxvoice.com 61