Using intel graphics

Besides `$vgasize', the `$monitor' environment variable is used to specify how to configure the graphics card. When using vga(8) directly, it is needed if no -m parameter is given.

When booting from a 9front or ANTS iso, `$monitor' is set to `ask'; during boot, /rc/bin/screenrc then asks the user to specify it.

Intel graphics (igfx) cards are generally well supported on 9front, and can be used in one of two ways: using VESA or the native igfx driver.

It is generally preferable to just use VESA, but this may not always be possible.

Keep in mind that on machines with multiple graphics cards, only the first card (usually the igfx one) will be seen by vga(8).

VESA

See: http://fqa.9front.org/fqa4.html#4.1.

If the monitor type is set to `vesa', either in `$monitor', or with the -m flag, vga(8) will attempt to configure the requested mode using the card's VESA BIOS. Several requirements must be satisfied for this to work:

See vga(8) for usage. Use the -p flag to list available modes.

If configuring the selected mode on the selected display does not work, there are two options:

IGFX NATIVE DRIVER

The igfx driver currently supports the following type of cards and connections:

Both the type of card and the type of connection to the display must be supported for modesetting to work.

In addition, mode timings must be provided, either in vgadb(6) or in EDID information from the display (see below).

Lastly, the driver must recognize the card, and vga(8) must know to select igfx as its driver. The former is achieved by recording its did in vga(8)'s igfx controller code (/sys/src/cmd/aux/vga/igfx.c). The latter is done by recording its did in the igfx `ctlr' entry in vgadb(6).

In the simplest case, a supported card is connected to a display, internal or not, using a supported connection. Automatic configuration is then sufficient, and nothing needs to be edited.

If the requested mode and timings cannot be obtained with automatic configuration, a vgadb(6) entry must be used.

AUTOMATIC CONFIGURATION

This is done using monitor=auto as such:

	; aux/vga -m auto -l $vgasize

When the monitor is set to `auto', the driver attempts to probe any connected displays for EDID, and matches any mode information found against the specified resolution. If multiple entries match (for instance, for different refresh rates, or on different displays), the first is always used.

To check what EDID information is found, use vga(8)'s -p flag. The total lack of mode information for a given display indicates a buggy monitor, an unsupported connection or a bug in the driver.

Caveat: since the first match is always used, should the display specify multiple entries for the same mode with different refresh rates, the only way to choose a specific one is to use vgadb(6).

MANUAL CONFIGURATION WITH VGADB

Read vgadb(6).

In this case, the monitor is set to something other than `vesa' or `auto'. Setting monitor=foo has vga(8) look for entries named foo= or aliases pointing to it in vgadb(6), specifying timings for the requested mode.

For example, given the settings:

	monitor=x230
	vgasize=1366x768x32

Or the command line:

	; aux/vga -m x230 -l 1366x768x32

Vga(8) will look for an entry such as:

	x230=1366x768
		...timings...

One only needs to add a new entry if automatic configuration does not work (or selects the wrong timings), and if no other entry for the same resolution exists.

The entries named include= as well as the aliases defined subsequently allow one to use `vga', `multisync' and others interchangeably for a number of "standard" resolutions.

It is often necessary to explicitely select a port when using vgadb(6), since the default is rarely correct, especially with laptops (see below).

SELECTING A DISPLAY

Igfx cards have several ports which can be configured to drive a display. One of these ports can be configured for a given type of connection. By convention, the driver numbers them as follows:

The port is VGA (1) by default.

If using automatic configuration, a port is selected automatically, and provided only one display has an EDID entry for the requested mode, nothing more is needed.

Otherwise, a port is specified manually in a vgadb(6) entry. Igfx does not recognize the ',#N' syntax used with VESA (see vga(8)). Instead, special attributes are used:

LVDS should be selected for laptops up until ivy bridge. From haswell on, LVDS is replaced by eDP, and display= must be used instead.

TROUBLESHOOTING

The driver is split in two parts:

In case a device's did is missing from the driver, but is from an allegedly supported generation, it should be sufficient to simply add it to both files, as well as in vgadb(6).

If the card's generation is not officially supported, but is close to one that is (example: iron lake and sandy bridge), it might be sufficient to add the card as one from the latter generation.

Modifying /sys/src/9/pc/vgaigfx.c is not strictly necessary, since it only implements the hardware cursor, and is inactive if the card is uninitialized. In case the hardware cursor implementation for the given card is buggy, the hardware cursor may be disabled manually (see vga(3)), or by moving its controller entry in vgadb(6) to one that does not set the hwgc= attribute.

In case a supported card does not work with a display reported to work on other operating systems, no standard operating procedure exists. You may report such incidents in the 9front mailing lists.

Screen blanking with VESA is buggy for some of the more recent generations of cards like haswell, and may cause screen unblanking to fail. In this case, blanking should be disabled (see mouse(3), vga(3)).


Last modified Sun Feb 18 23:00:54 GMT 2018 [ Top | Edit | History | Changelog | Create a new page ] About the server | Powered by Plan 9