Does Wayland Server Still Exist For Macos Average ratng: 6,1/10 4953 votes
Please consider subscribing to LWN

Subscriptions are the lifeblood of LWN.net. If you appreciate this content and would like to see more of it, your subscription will help to ensure that LWN continues to thrive. Please visit this page to join up and keep LWN on the net.

February 15, 2012

This article was contributed by Koen Vervloesem

Does Wayland Server Still Exist For Macos
  1. Jun 01, 2020  Wayland can be confusing. To be clear - wayland really isn't a program - it is a protocol - much like X11 is a protocol. You don't need weston if you have some other program as your wayland server. Sway(1) is built on wlroots which looks to be weston-like library. I'm using sway(1) as the wayland server. Cage(1) might also work - I've not tried it.
  2. Wayland does not exist to make it possible to do things we can't do. Wayland exists to make it a lot less obnoxious to do things we already do. So from an end user perspective, things should end up looking the same (even the same window managers), just maybe a little smoother.

In his talk at FOSDEM (Free and Open Source Software Developers' European Meeting) 2012 in Brussels, Kristian Høgsberg gave an overview of the Wayland display system, where it comes from and how the Linux graphics stack has evolved to make Wayland feasible. He also shared some information about the schedule of the 0.85 and 1.0 releases. If all goes according to plan, we'll see the first stable version of Wayland by the end of the year.

Hawaii is a desktop operating system built on the GNU/Linux stack with a new lightweight and fast Wayland desktop environment written with QtQuick and deeply integrated with systemd. Hawaii delivers incremental and atomic updates which gives users to ability to rollback the whole system to a known good state if a regression happens. Wayland is a communication protocol that specifies the communication between a display server and its clients, as well as a C library implementation of that protocol. A display server using the Wayland protocol is called a Wayland compositor, because it additionally performs the task of a compositing window manager. Hey, Barrier does not currently support Wayland. It should be technically possible, but for that to happen someone needs step up, investigate and implement that. Barrier is a community-driven project, there's no one to complain to and doing so might be counter-productive:-).

Replacing a tried-and-true technology such as X by a new one such asWayland is no small task, and the idea alone has already stirred up theLinux community in the past. However, not every critic understands exactly what Wayland is. Apparently some even have various strange opinions about Kristian, for instance that he holds a grudge against X or that he even doesn't know anything about how X works. To dot the i's, Kristian started his talk by clarifying that he has been a core X developer since 2004. 'I admire the design and implementation of X, it just happens that it's the wrong solution for what we do now.' Kristian started developing Wayland in 2008 in his spare time while working for Red Hat, and now he is working on it at Intel in the graphics team of the Open Source Technology Center.

Where do we come from?

A while ago, X did lots of things related to its primary task as a displayserver. For instance, it did font management and font rendering, graphicalmode setting and acceleration code was tied up in X specific drivers, the Xserver had input drivers to parse various input device serial formats, andso on. However, bit by bit many of these tasks were moved into separatecomponents, many of them in the kernel. Wearing his Red Hat hat, Kristian worked on AIGLX (which allowed compositors to run with hardware acceleration on X), DRI2 (which provides OpenGL hardware acceleration), KMS (Kernel Mode Setting), and GEM (Graphics Execution Manager, doing memory management for graphics drivers). In principle, all hardware drivers needed by X are now in the Linux kernel (KMS) or in Mesa (an OpenGL implementation).

Much of this work was done as part of Kristian's job as a member of RedHat's X team to make a composited desktop possible. Without a compositor, each application renders its output directly into the buffer of the X server. With a compositor (such as Compiz, KDE's KWin, GNOME 3's Mutter, and Xfce's Xfwm), applications render their output in their own private off-screen buffers. The compositor renders the final desktop output by painting those buffers onto the screen's frame buffer. On a modern Linux desktop, compositing has become a basic expectation and requirement, Kristian says: 'Compositing is not only about those 2D and 3D visual effects, but it has other fundamental advantages, such as flicker-less movements of windows.'

But now that we have reached a point where most of the hardware driversimplement KMS or Mesaand compositing is used for drawing application windows on the screen, mostof the work in the window system is done by the compositor andthe applications themselves; the X server is just used as a middle-manfor input. Kristian wanted to create a display server that directlysupports this new window system architecture from the ground up. Thisbecame Wayland, which integrates the display server, window manager, andcompositor into one component, and is, according to Kristian,'essentially just consolidating existing practices and simplifyingthe X architecture to what we are using it for nowadays. Free ip blocker for mac. ' The resultis a window system architecture that is more responsive and has lessgraphical artifacts such as tearing or flickering. More details about Wayland'sarchitecture and the difference with X can be found on the project'swiki.

Hardware support

So, with this new window system architecture, Wayland merges thecompositor into the display server, and applications talk directly to thecompositor. The compositor reads input from devices such as the keyboardand mouse using the kernel's evdev subsystem, and it distributes this inputto the applications. The compositor uses KMS to bring up the display, andapplications push their buffers to the compositor, which combines thebuffers from the various applications and renders the result using directrendering, through OpenGLES, to the KMS buffers. 'There is no hardware-specific codewhatsoever in the compositor code,' Kristian emphasizes, 'andthere is also no rendering API for drawing lines, text, and so on: it's alljust direct rendering.'

Kristian's short answer to the question which graphics hardware support Wayland is 'If the Mesa driver for your graphics hardware supports DRI2 under X and has KMS support, you can run Wayland.' Currently, this means that you'll have most luck with the open source drivers for Intel, AMD and NVIDIA graphics hardware, but when driver writers add new chipset support in Mesa, it will automatically support Wayland. It's still unclear what AMD and NVIDIA will do with their proprietary drivers.

Wayland support in graphical toolkits

But applications have to be modified to be able to use Wayland insteadof X, of course. Fortunately, most applications don't talk to the X windowsystem directly but are using graphical toolkits, which provide the commonuser interface elements such as text fields, scrollbars, buttons, and soon. So most of the work in porting an application from X to Wayland is inporting the toolkit it uses. According to Kristian, all major toolkits arebeing ported to Wayland as we speak, including GTK+ 3, Qt 5, EFL (EnlightenmentFoundation Libraries), Clutter, and SDL (Simple DirectMedia Layer). The Qtteam at Nokia is maintaining and driving the Qt port themselves, hesaid. Wayland's web site has instructions on how to use these toolkits with Wayland. Applications that are using their own toolkit, such as Blender and LibreOffice, will have to do the porting effort themselves.

Porting a graphical toolkit to Wayland poses some interesting challenges, for instance because Wayland doesn't support some things that are quite natural in X, such as pointer grabbing: in Wayland an application currently cannot claim the keyboard or mouse input. However, games regularly grab the mouse cursor to prevent the player from accidentally losing mouse control over their game, and pop-up windows rely on grabbing the keyboard and pointer too. Another challenge is the support for client-side window decorations, which allows individual applications to control their appearance. Both challenges are being worked on.

Applications that aren't using a Wayland-compatible graphical toolkit or that have some problems running on Wayland can still run on an X server that runs as a Wayland client. Of course this adds some overhead, but it should be minimal. Running a rootless X Server as a Wayland client could also be a temporary solution to keep using network transparency, a feature that Wayland lacks. In his talk, Kristian reassured the audience that the current lack of network transparency is not definitive: 'While supporting remote displays is not a priority now for Wayland, nothing in Wayland's architecture makes this impossible.'

Toward a stable API

The first real release of Wayland happened a few days after Kristian's talk at FOSDEM: Wayland 0.85. The code is divided in two parts: Wayland is the protocol and IPC mechanism, while Weston is the reference implementation of the compositor (and thus also the display server). 'Weston has around 10,000 lines of code and it can be used as the base for a compositor for mobile or embedded systems,' according to Kristian, who ran Weston on his laptop during his FOSDEM presentation. However, existing X compositors such as KWin and Mutter can also be modified to become a Wayland compositor.

Does Wayland Server Still Exist For Macos Download

Kristian promises that the 0.85 release is going to be protocol and APIstable. The point of the release is that developers can begin experimentingwith Wayland and porting their toolkits and applications. While it used tobe that you had to compile a special KMS 'pageflip' kernel, a patched Mesabranch, and Kristian's own EGL library to be able to run Wayland on yoursystem, now everything should be upstream. Kristian hopes to put out a Wayland 1.0 release in late 2012 or early 2013. So while Wayland will not replace X overnight, we will likely see the first mainstream use of the new window system architecture in 2013.

Does Wayland Server Still Exist For Macos Free


Index entries for this article
GuestArticlesVervloesem, Koen
ConferenceFOSDEM/2012

(Log in to post comments)