Why the GTK+ wayland backend can't be enabled in linux distros, at all

darxus at chaosreigns.com darxus at chaosreigns.com
Sun Mar 18 14:07:11 PDT 2012

There are two major reasons the wayland backend for GTK+ can't currently
be enabled at all, not just by default, in a linux distribution:

1) Enabling both the x11 and wayland backends of GTK+ causes GTK to be
   entirely unusable: 

2) The wayland backend depends on cairo-gl, while cairo-gl + the Nvidia
   proprietary driver = serious memory usage problems such that it can't
   be packaged at all, at least with the capabilities of Debian packaging.

There are several possible solutions to #2:
A) Get cairo-gl to only load libGL when an application requests it:
B) Get the Nvidia proprietary driver to reduce memory consumption.
   I haven't touched this one.  All I have found is linux-bugs at nvidia.com
   mentioned on
C) Remove the cairo-gl dependency from the wayland backend of GTK+:
D) Add support for versioned provides to the Debian packaging system:
   This bug is 15 years old.
Again, that last one is interesting.  You *should* be able to just create
two versions of the cairo packages, one with cairo-gl disabled, and one
with it enabled.  Then you use the "provides" mechanism to say that the
cairo-gl packages provide the same stuff as the non-cairo-gl packages.
The problem is, the provides mechanism can't specify which *version* of
cairo it provides, and that's bad, because apparently lots of software
that depends on cairo depends on specific versions of it.

I suppose E would be get Nouveau, the open source Nvidia driver, to work
well enough that the proprietary driver is completely unnecessary.  That
seems very challenging, with the complete lack of help from Nvidia.


Possible solutions to the cairo-gl + Nvidia proprietary problem by the guy
who tried:

Entire bug that comment is from, which resulted in cairo-gl being removed
from Ubuntu:

Bug to enable the wayland backend in GTK+, where all this has been coming
up, including a ppa with GTK+ packages with the wayland backend enabled,
and cairo packages with cairo-gl enabled, for Ubuntu Precise:

Much thanks to Rico Tzschichholz for providing that ppa, and putting up
with all my questions.  And all the other people who have provided useful
input over the last couple days.  

"This hurts quite a bit. Very painful."
"Think of the sensation as reassurance that you are not dead yet. What
you are feeling is life in you!" - Johnny The Homicidal Maniac

More information about the wayland-devel mailing list