Home Contents | # gcx:edid | Graphics | Core4 Lua Commands

## SYNOPSIS

1. list = gcx:edid()
2. data = gcx:edidRaw()

## DESCRIPTION

Provides information about size and capabilities of the attached display.

This is the data that was read from the EDID memory inside the display. Correctness of the information depends on the display manufacturer.

The result of the first form is a table with broken down values read from the display.

For directly attached displays, the system makes up a fake EDID structure with a few values filled in that are available.

Key | Value
--- | ---
manufacturer | (String) VESA Plug-and-Play ID of the display manufacturer. This is a three-letter ASCII string.
product_code | (Int16) Product code assigned to the display.
serial_number | (Int32) Numeric serial number field.
serial_number_text | (String) Optional textual serial number field.
name | (String) Optional display name.
year_made | (Int)Year the display was made. (If week_made is 99, instead year the display was introduced to the marked.)
week_made | (Int)Week the display was made.
physical_width, physical_height | Width and height of physical display in millimeters.
hmin, hmax | (Int) Horizontal frequency range limits in Hz.
vmin, vmax | (Int) Vertical frequency range limits in Hz.
pclkmax | (Int) Maximum allowed pixel clock.
dpms_standby, dpms_off, dpms_suspend | (Bool) A set of flags, each, when true, indicates the display supports that specific DPMS power mode.
modelines | A nested list of tables where each describes one display resolution mode supported by the display. The list is sorted in order of preference, the first item is the most preferred, usually the native display resolution.
fixed_width, fixed_height | These fields are optional. Only present for fixed-resolution displays. Such displays are physically not able to show any other resolution than this, since they lack scaling hardware.

The modelines contain detailed timing information. The information is structured after the XFree86 Modeline model.

Key | Value
--- | ---
hdisp | Horizontal resolution.
vdisp | Vertical resolution.
hz | Screen refresh rate.
preferred | true if the display likes this modeline very much.
hsyncstart, hsyncend, htotal | Horizontal timing parameters. See XFree86 Modeline.
hsync | Horizontal sync polarity: "+" or "-"
vsyncstart, vsyncend, vtotal | Vertical timing parameters. See XFree86 Modeline.
vsync | Vertical sync polarity: "+" or "-"
pclk | Pixel clock

The second form (gcx:edidRaw()) returns the raw, unmodified data bytes as they where read from the display. More information about the raw data structure is available on the EDID page on Wikipedia. The raw EDID data is only available when the display is attached via DVI.

## RETURN VALUE

On success, returns requested EDID data.

If no display is attached, just returns nil.

On failure, returns three values: nil, a string describing the error (The result of the C library call strerror() on the errno code) and the errno number from the standard C library.

## SEE ALSO

Introduction to DVI support
gfx.open(), gcx:backplaneVersion(), gcx:edid(), gcx:linkState(), gcx:displayGeometry()