The value passed to XRRCrtcSetGamma must be allocated with XRRAllocGamma (because it relies on the locations of green and blue), otherwise garbage is sent on the wire. https://bugzilla.gnome.org/show_bug.cgi?id=706231