Whoops, There's A Big Problem For Wayland GTK+

Written by Michael Larabel in Wayland on 18 March 2012 at 10:01 PM EDT. 52 Comments
WAYLAND
It turns out there's a rather serious issue for some systems when having Wayland support within GTK+ exposed, which may hinder the Wayland GTK+ availability in the near-term.

As I wrote about a few days ago, Wayland support isn't for end-users in Ubuntu 12.04 and the GTK+ version they are shipping is 3.4. GTK+ 3.4 has the Wayland GDK back-end that works as an alternative to the X11 back-end and can be dynamically utilized. With the supported GTK+ code, it's as easy as building it with the --enable-wayland-backend option, but that's not happening for Ubuntu 12.04 LTS or by any other major distribution right now as far as I'm aware. It turns out that for some users this is good to not have the Wayland support exposed.

Building the GTK+ Wayland support currently depends upon having cairo-gl, the OpenGL version of the Cairo drawing library. However, cairo-gl with the NVIDIA binary driver can be a memory-hungry mess. Using cairo-gl at this point with the NVIDIA binary driver appears to be a big mess. This isn't just about using additional memory when running GTK+ applications on Wayland (where the NVIDIA binary driver isn't even compatible at this point), but the GL version of Cairo on X11 would be shafted.

This memory usage problem only seems to be present for the NVIDIA binary driver, but the open-source NVIDIA (Nouveau) driver isn't affected, the AMD Catalyst driver, nor any of the other open-source drivers have a hard time dealing with cairo-gl.

The solution to this is either have NVIDIA address their driver issue(s) causing excessive memory usage with cairo-gl, ship multiple versions of Cairo on the system (but there's some packaging problems currently), or change how Cairo loads libGL such that it only happens when a client requests an OpenGL context. The alternative is just to let NVIDIA binary users burn through the additional system memory.

This issue is talked at length in this Wayland mailing list message.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week