xai-org/grok-build · warning

arboard leg disabled (GROK_CLIPBOARD_NO_DATA_CONTROL)

Error message

arboard leg disabled (GROK_CLIPBOARD_NO_DATA_CONTROL)

What it means

arboard read operations are skipped when the arboard Wayland bypass is active (env var GROK_CLIPBOARD_NO_DATA_CONTROL set), because arboard's data-control protocol conflicts with certain Wayland compositors. Any arboard-based read then returns this marker error immediately.

Source

Thrown at crates/codegen/xai-grok-shared/src/clipboard.rs:1328

                }
            })
            .as_ref()
            .ok_or_else(|| anyhow::anyhow!("arboard unavailable"))
    }

    /// Deadline for in-process arboard reads. The Wayland data-control read has
    /// no internal timeout and blocks forever on a hung selection owner (the
    /// X11 path has a 4 s budget), so reads run on a worker thread that is
    /// abandoned on expiry. The worker's `Clipboard` instance leaks with it;
    /// harmless while the lease keeps the shared backend alive.
    const ARBOARD_READ_WAIT: std::time::Duration = std::time::Duration::from_secs(2);

    fn arboard_read_with_deadline<T: Send + 'static>(
        op: impl FnOnce(&mut arboard::Clipboard) -> anyhow::Result<T> + Send + 'static,
    ) -> anyhow::Result<T> {
        use std::sync::mpsc::RecvTimeoutError;
        if arboard_wayland_bypassed() {
            anyhow::bail!("arboard leg disabled (GROK_CLIPBOARD_NO_DATA_CONTROL)");
        }
        let result = spawn_with_deadline("clipboard-read", ARBOARD_READ_WAIT, move || {
            arboard::Clipboard::new()
                .map_err(anyhow::Error::from)
                .and_then(|mut clipboard| op(&mut clipboard))
        });
        match result {
            Ok(inner) => inner,
            Err(RecvTimeoutError::Timeout) => Err(anyhow::anyhow!("arboard read timed out")),
            Err(RecvTimeoutError::Disconnected) => Err(anyhow::anyhow!("arboard read worker died")),
        }
    }

    fn arboard_get_text() -> anyhow::Result<Option<String>> {
        arboard_read_with_deadline(|clipboard| match clipboard.get_text() {
            Ok(text) if text.is_empty() => Ok(None),
            Ok(text) => Ok(Some(text)),
            Err(arboard::Error::ContentNotAvailable) => Ok(None),

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Unset GROK_CLIPBOARD_NO_DATA_CONTROL if your compositor works with arboard's data-control protocol
  2. Use the CLI-tool fallback legs (wl-paste/xclip/xsel) — ensure wl-clipboard or xclip is installed
  3. Explicitly opt into reading via CLI tools rather than arboard while the bypass is active

Example fix

# before
export GROK_CLIPBOARD_NO_DATA_CONTROL=1

# after
unset GROK_CLIPBOARD_NO_DATA_CONTROL
Defensive patterns

Strategy: fallback

Validate before calling

fn arboard_read_available() -> bool {
    std::env::var_os("GROK_CLIPBOARD_NO_DATA_CONTROL").is_none()
}

Try / catch

match clipboard::get_text() {
    Err(e) if e.to_string().contains("arboard leg disabled") => {
        eprintln!("arboard bypassed; using CLI read fallback (wl-paste/xclip)");
        read_via_cli_tool()
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling get_text/get_image/get_file_urls (or primary-selection reads) in a Linux Wayland session while GROK_CLIPBOARD_NO_DATA_CONTROL is set in the environment.

Common situations: Users on Wayland set the bypass env var to work around hangs/crashes in arboard's data-control backend, then wonder why clipboard reads fail; env var left set from an old workaround in shell profiles.

Related errors


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/15cb47b300c488af. Report an issue: GitHub.