glxgears Without VSync: What the FPS Tells You

Illustrated infographic summarizing: Glxgears No Vertical Synchronization

By Greg Nowak

When a Linux workstation starts stuttering in a 3D viewport, run glxgears before changing drivers or pricing a replacement. It draws three spinning gears through GLX, the X11 interface to OpenGL, and reports frames per second roughly every five seconds. An animated window confirms that this session can render a simple GLX scene. A second run with VSync disabled can show whether display timing was holding back the first run.

The result helps you decide where to look next. Check which renderer drew the gears, see whether the frame rate responds to a change in synchronization, then reproduce the task that is costing your team time.

How to run glxgears without VSync

Open a terminal in the affected desktop session under the same account that runs the application. If the commands are missing, look for mesa-utils on Debian, Ubuntu or Arch, or glx-utils on Fedora.

Run these commands one at a time. Let each run print several FPS readings, then close its window. Keep the window visible, at the same size and on the same monitor for both runs.

glxgears -info -geometry 800x600
glxgears -info -geometry 800x600 -swapinterval 0

The first command uses the driver’s current setting. In the Mesa Demos 9.0.0 source shipped by Debian, explicitly passing -swapinterval 1 also leaves that setting in place. The second command requests a swap interval of zero so swaps can proceed without waiting for vertical refresh, where the GLX implementation supports it. Save the startup output along with the FPS readings. The -info flag records the renderer used by the demo itself.

If the option is unavailable or the frame rate stays near the monitor’s refresh rate, try the override that matches the active OpenGL driver. Use the first line for Mesa drivers that honor vblank_mode and the second for NVIDIA’s proprietary OpenGL driver.

vblank_mode=0 glxgears -info -geometry 800x600
__GL_SYNC_TO_VBLANK=0 glxgears -info -geometry 800x600

Keep the override on the command line so it applies to that run. If a baseline on a 60 Hz monitor sits near 60 FPS and the second run climbs well above it, refresh timing likely constrained the baseline. The counter measures the demo’s drawing and buffer-swap loop. Window size, CPU overhead, driver behavior and desktop composition can all affect the number.

Check which GPU is doing the work

uname -r
printf 'session: %s\n' "${XDG_SESSION_TYPE:-unknown}"
lspci -nnk | grep -A3 -E 'VGA|3D|Display'
glxinfo -B

lspci shows the graphics devices and their kernel drivers. The OpenGL renderer string in glxinfo -B shows what that GLX probe actually used. If you see llvmpipe or softpipe, Mesa is rendering in software. On a workstation expected to use hardware acceleration, check for LIBGL_ALWAYS_SOFTWARE, missing graphics userspace packages, or differences between the local and remote session.

On a supported Mesa system with multiple GPUs, DRI_PRIME=1 glxinfo -B checks the first non-default GPU. Use the affected application’s own diagnostics or logs to confirm which device it selects, especially if it starts through a launcher or runs in a container.

What the result tells you to check next

How to interpret common glxgears results
What you see What it suggests Next check
FPS rises after requesting interval zero Refresh timing likely constrained the baseline. Measure the slow task in the production application.
Both runs stay near the refresh rate Driver settings or desktop presentation may still pace the demo. Check the startup output, driver override and session type.
The renderer is llvmpipe or softpipe This GLX context is rendering in software. Check environment overrides, driver packages and access to the GPU.
The renderer names an unexpected GPU The probe may be using a different device from the intended one. Check the application’s renderer and GPU selection settings.
A display or GLX error appears The current session may lack a usable X11 or GLX connection. Run the check from the affected desktop and record the exact error.

What does glxgears test on Wayland?

In a Wayland session, glxgears normally runs through Xwayland, the X server that connects to the Wayland compositor. Working gears confirm that this X11 and GLX route works for the demo. For a native Wayland application using EGL, or an application using Vulkan, reproduce the issue in that application and check which graphics backend it reports.

If the issue started after a driver or desktop update, check the current boot journal on a systemd workstation. Keep the entries around any relevant error so you can see what happened immediately before it.

journalctl -b --no-pager | grep -Ei 'Xorg|Xwayland|drm|nvidia|nouveau|amdgpu|i915|xe'

Verify the fix with the work your team does

Pick one task someone can repeat, such as orbiting a specific scene with the same viewport settings or exporting the same project. Record the application version, graphics backend, renderer, recent changes and steps to reproduce the problem. If you have a healthy workstation for comparison, use the same project, settings and power profile.

For a rollout or purchase decision, agree on what a successful retest looks like before changing anything. That might mean the original scene opens reliably, the viewport stays responsive during a review, or the export completes within the team’s agreed time. If a graphics issue is delaying delivery, send Greg the renderer output and the task that fails. Talk to Greg about the workstation issue.

Related on GrN.dk

Need help with this kind of work?

Share the renderer output and the task that fails with Greg to scope the investigation. Get in touch with Greg.

Sources

Latest articles

Before WooCommerce 11.4 arrives, test your gift guide on a store copy. Choosing Medium should narrow the knitwear grid and leave the sale gifts below it alone.

AI can read the bank account number on a PDF invoice. If it differs from the supplier’s approved account, accounts payable puts the payment on hold and calls the supplier.

Let’s Encrypt moves to 64-day certificates on 10 February 2027. Check when each site renews, test the reload and verify the certificate visitors receive.

Work out which Drupal 10 sites can move to Drupal 11 by 9 December, who can resolve each blocker and how to test publishing and rollback before launch.

See how SharePoint access changes reach internal AI search, and test how long revoked content can still appear in results, generated answers, and citations.

At month-end, reconcile Shopify Payments against your bank statement and e-conomic. Use the payout ID to trace fees, refunds, and payouts that reach your bank the following month.

Trace an intermittent NGINX 502 through Cloudflare, upstream attempts, and application logs so you can see where the request failed and who should pick it up.

Find the apps, scripts and printers that still send mail through Microsoft 365 with a mailbox password, then test a replacement before the December 2026 change.

Find subscriptions and insurance expenses in e-conomic that should be spread over several months. See how AI reads the supporting documents and how your finance lead approves the proposed allocations.

Before relying on an AI project briefing, check which files it covered. A practical workflow for tracking documents, recording gaps and verifying key claims.