LCA 2009: state of X update

Generally we just like to bitch about state of X. However, I would like to point you towards two presentations from linux.conf.au 2009:

Introducing the Re-Built Linux Desktop by Keith Packard

You will find out what is GEM and why do we have it and now it influenced Linux kernel development. Also explained are DRI2 and KMS. So now you can run non-root X servers, multiple X servers with acceleration and other fun stuff. Look, glxgears on compiz sphere!

From click to pixel: A tour of the Linux graphics pipeline by Carl Worth

Video file contains only first half hour of presentation, but here are interesting highlights from slides:

  • Visually inspecting GTK+ updates
    ./configure --enable-debug=yes # for GTK+
    GTK_DEBUG=updates ./my-program
    
  • Tracing cairo calls

    Install cairo 1.9 or later

    cairo-trace ./my-program
    See results in my-program.$PID.trace

  • Inspecting Render protocol
    xtrace -D :5 > my-program.xtrace
    DISPLAY=:5 my-program
    
  • Finding software fallbacks in EXA

    Edit xserver/exa/exa_priv.h:

    #define DEBUG_TRACE_FALL 1
    Recompile xserver and examine Xorg.0.log file

  • Finding software fallbacks in xf86-video-intel

    In "device" section of xorg.conf:

       Option   "FallbackDebug"     "true"
    Examine Xorg.0.log file

  • Inspecting 3D state (for Intel)

    INTEL_DEBUG=fall,batch,sync
    fall: Show software fallbacks
    batch: Show decoded batchbuffers
    sync: Wait for idle after each batchbuffer
    (see intel_context.c debug_control[] for more)

  • Inspecting GEM state
    cat /proc/dri/0/gem_objects
    cat /proc/dri/0/i915_gem_interrupt
    

Good stuff, well worth two hours of your time to get to know your X, stop bitching and start reporting bugs...