Home / Alt manpages / xvinfo(1)

  • xvinfo(1)
  • User command
  • linux

Inspect X Video Adapters and Capabilities with xvinfo

You will use xvinfo to ask an X server which X-Video adaptors are available and what they can do. The result is useful when a video application reports that hardware video output is unavailable, or when you need to check a remote or secondary display without changing its configuration.

The examples use xvinfo 1.1.5 from Debian package x11-utils version 7.7+6build2. Allow about ten minutes. You need a shell, the xvinfo command, and access to an X display. No elevated privileges are normally needed. This guide only queries the server: it does not enable X-Video, change an adaptor, restart a display manager or alter application settings.

1. Confirm the installed command

Check which executable your shell will run, then ask it for its version. These are ordinary read-only commands:

$ command -v xvinfo
/usr/bin/xvinfo
$ xvinfo -version
xvinfo 1.1.5

The version line identifies the local program, not the X server. It is worth recording both when you are comparing two machines, because the command and the server can come from different packages and releases.

Checkpoint

If command -v xvinfo prints nothing, install or repair the package through your normal system-management process. Do not work around a missing binary by copying one from another host.

2. Query the display selected by DISPLAY

With no display option, xvinfo uses the DISPLAY environment variable. Inspect it before running the query:

$ printf 'DISPLAY=%s\n' "${DISPLAY-}"

On a graphical local session, it commonly contains a value such as :0, but the correct value is host-specific. Run the query without sudo:

$ xvinfo

On a working connection, the command prints the X-Video extension's adaptor information and capabilities. The amount and wording depend on the X server, drivers and hardware. Look for the adaptors the server exposes, then read their supported ports, image formats and limits as reported by this particular machine. Do not treat a familiar adaptor name as proof that an application will use it; the application's own selection rules still apply.

A successful query can produce a large report. Preserve it for comparison without changing anything on the server:

$ xvinfo > xvinfo-display.txt
$ test -s xvinfo-display.txt && echo 'report written'

Redirection creates or truncates the local file named xvinfo-display.txt. Choose a new filename if an earlier report matters. The command does not write to the X server, but the shell redirection does change your local filesystem.

3. Reduce the report with short output

Use -short when you need a compact inventory rather than every capability detail:

$ xvinfo -short

This is useful for a quick support bundle or a before-and-after comparison. It does not select a different adaptor and it does not make the server expose more hardware. If the short report shows an adaptor you need, rerun the full command and keep that detailed output for the values that matter.

For a repeatable record, save both forms under distinct names:

$ xvinfo -short > xvinfo-short.txt
$ xvinfo > xvinfo-full.txt
$ wc -l xvinfo-short.txt xvinfo-full.txt

Checkpoint

Compare reports from the same display. Two files collected with different DISPLAY values describe different X servers, even if both commands exit successfully.

4. Query another X display explicitly

The -display option overrides DISPLAY for one invocation. This is clearer in scripts and avoids accidentally querying the wrong session:

$ xvinfo -display :0 -short

Replace :0 with the display name supplied by the owner of the X session. A display name is not a file path, and a remote display is not automatically reachable just because its name is known. X authentication and network policy still have to permit the connection.

When testing a value without changing your shell environment, keep the command explicit:

$ TARGET_DISPLAY=':0'
$ xvinfo -display "$TARGET_DISPLAY" -short

Quote a variable used as a display name. If it contains an invalid or inaccessible server, the command will fail; quoting prevents the shell from interpreting characters in the value.

5. Read connection failures accurately

For an unset or unusable display, xvinfo cannot report adaptor capabilities. Reproduce the distinction between the command and the server with a deliberately invalid display name:

$ xvinfo -display __invalid_display__
xvinfo:  Unable to open display __invalid_display__
$ printf 'exit status: %s\n' "$?"
exit status: 1

The installed command returns status 1 for this failed connection. A real failure may instead mention a display that exists but rejects the connection. Check the value first:

$ printf 'DISPLAY=%s\n' "${DISPLAY-}"
$ test -n "${DISPLAY-}" && echo 'DISPLAY is set'
$ xvinfo -display "$DISPLAY" -short

Do not add sudo as a reflex. The X server may reject root because root lacks the session's X authority, and elevated privileges do not create an X-Video adaptor. If this is a remote session, ask how its authentication is intended to work and use the session's documented connection method.

6. Separate inventory from repair

xvinfo is an inspection tool. A report with no usable adaptor, or a report that lacks a format your application needs, is evidence for further investigation, not a reason to edit X configuration blindly. Check the application documentation, driver package and X server logs before making changes.

Do not unload graphics modules, restart a display manager or alter boot parameters while diagnosing a live graphical session. Those actions can terminate applications and lose unsaved work. If a later repair is justified, record the original configuration and arrange a recovery path first. Nothing in the commands in this guide needs an undo command because the queries leave the X server unchanged.

Keep the full report with the machine, display name and command version that produced it. Hardware capability output is environment-specific, so an old report is not a substitute for a fresh query after a driver or display-server change.

Done means

  • xvinfo -version identified the installed command as version 1.1.5.
  • You queried the intended X server through DISPLAY or an explicit -display value.
  • You know when to use the full report and when -short is enough.
  • Any saved output has a deliberate filename and can be traced to its display.
  • A connection error is being treated as an X authentication or display-selection problem, not as proof that hardware support is absent.
  • No X configuration, service, driver or persistent system state was changed.