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

Seneste artikler

AI kan læse kontonummeret på en PDF-faktura. Afviger det fra den godkendte konto, holder bogholderiet betalingen tilbage og ringer til leverandøren.

Afstem Shopify Payments mod banken og e-conomic ved månedsluk. Brug udbetalings-ID’et til at spore gebyrer, refusioner og beløb, der lander efter månedsskiftet.

Find abonnementer og forsikringer i e-conomic, der skal fordeles over flere måneder. Se, hvordan AI læser bilagene, og økonomiansvarlige godkender forslagene.

Teamtailor udfaser Riminder den 21. november 2026. Tjek parservalg, kontaktfelter og integrationer, og få styr på sletning af ansøgerdata.

En sendt faktura er ikke nødvendigvis nået frem. Få styr på leveringsstatus, systemkravene i 2027 og afgrænset AI-hjælp til fejl og opfølgning i økonomiafdelingen.

Rækker jeres ChatGPT-licens til weboversættelser? Få overblik over API-kreditter, adgang og en WordPress-proces fra godkendt dansk tekst til oversættelseskladder.

Få styr på manglende bilag med et afgrænset AI-flow, der sorterer svar, koordinerer påmindelser og giver bogholderen en overskuelig liste til opfølgning.

Lad AI skrive kampagneudkast til Black Friday ud fra godkendte produktdata. Få styr på priser, modtagere og godkendelse, før Mailchimp-kladden bliver sendt.

Få tilbudsmails fra Outlook ind i CRM med AI. Afklar felter, dubletter og sælgeransvar, og mål i en pilot, om løsningen sparer tid og får flere forespørgsler fulgt op.

Gør månedsrapporten lettere at gentage med AI til Excel, Python og faste kontroller. Få styr på import, fejllister og afstemning, så tallene kan efterprøves.