Understanding Video Cards and Monitors

Understanding Video Cards and Monitors

The video card or graphics adapter contains the electronics that control the monitor. On most systems, the video card takes the form of a circuit board that plugs into a slot on your PC's motherboard. On many new systems, however, the motherboard itself contains the necessary graphics chipsets.

Raster-Scan Display

All video cards operate on the same principle: They store an image in video memory (also called video RAM or VRAM for short) and generate the appropriate signals to display the image on the monitor's screen.

The monitor is the physical device that contains the display screen where the graphic and text output appears. The display screen is typically a phosphor-coated glass tube on which an electron beam traces the output image. On laptop computers, the display screen is a liquid crystal display (LCD). More expensive laptops use active-matrix LCD-display screens.

The image that appears on the monitor is made up of many horizontal lines, known as raster lines. An electron beam in the monitor generates the raster lines by sweeping back and forth on a phosphor-coated screen, as illustrated in Figure 3-1.

Click To expand
Figure 3-1: A Typical Raster-Scan Display.

The phosphor on the screen glows in proportion to the intensity of the electron beam. The glowing dot on the screen represents a picture element, or pixel. Thus, a line of the image is generated by controlling the intensity of the beam as it scans across the screen. The phosphor fades in a while, but if the lines are redrawn repeatedly, our persistence of vision creates an illusion of a steady image. Most PC monitors redraw an entire screenful of raster lines 50 to 90 times per second.

As Figure 3-1 shows, the electron beam scans an area larger than the actual view area of the display screen, but the electron beam is active only when the beam is in the viewable area. Also, after reaching the end of a line, the beam has to return to the start of the next raster line. This part of the beam's motion is known as the horizontal retrace. Similarly, when the beam reaches the bottom of the screen, it has to return to the first line to start another cycle of drawing. This period is known as the vertical retrace. The beam's intensity is reduced (the beam is blanked) during horizontal and vertical retrace so that those lines do not appear on the screen.

The video card generates the signals necessary to sweep the electron beam across the display and refresh the display at a rapid rate. There are two types of refreshing: interlaced and noninterlaced. In an interlaced refresh, each screen is drawn in two steps. First, the electron beam sweeps across the screen, drawing all the odd-numbered raster lines. Then the electron beam goes back to the beginning of the screen and draws all the even-numbered raster lines. Broadcast television uses interlaced refreshing. A noninterlaced refresh involves drawing all raster lines in a single step. Most video cards refresh the screen 60 times or more per second and use a noninterlaced refresh.

Color Display

Color display screens represent any color with a combination of the three primary colors: red (R), green (G), and blue (B). Most color displays use three electron beams, one for each primary color.

The screen in a color display has a repeated triangular pattern of red, green, and blue phosphor dots. Each phosphor dot glows in its color when the electron beam impinges on it. A perforated metal screen, known as a shadow mask, ensures that each electron beam strikes the phosphor of the intended color. The video card varies the intensity of the red, green, and blue electron beams, thereby displaying many colors.

Color Palette and Resolution

Typically, a video card allows a palette of 256 colors, and each pixel's color is stored in an 8-bit value. The actual color (in terms of R, G, B components) that corresponds to a pixel's 8-bit value is determined by consulting a color lookup table or colormap.

Today's high-performance video cards allow three bytes of storage per pixel, so that each pixel's value can directly specify the RGB components that determine that pixel's color. These so-called 24-bit video cards provide true color display but require more video memory to store the entire image.

Insider Insight 

The resolution of a display screen is expressed in terms of the number of visible dots (pixels) across a raster line and the total raster lines. A common resolution is 640 dots across by 480 lines vertically, which is commonly expressed as 640x480. Other common screen resolutions are 800x600, 1,024x768, and 1,280x1,024.

Video RAM

The video card stores the contents of the pixels in random-access memory (RAM), known as video RAM. The number of colors and the display resolution supported by a video card depends on the amount of video RAM. To store the information content of a 256-color 1,024x768 display screen, for example, the video card needs 1,024x768, or 786,432 bytes of video RAM (because an 8-bit pixel value represents 256 colors and 1 byte = 8 bits). On the other hand, to display 24-bit color at 1,024x768 resolution, the video card needs three times as much video RAM: 3x786,432 = 2,359,296 bytes, or about 2.3MB of video RAM (because 24 bit = 3 bytes).

Typical video cards have 4, 8, 16, 32, or 64MB of video RAM. A video card with 1MB of video RAM can comfortably handle a 256-color, 1,024x768-resolution display.

Dot clock

You run across the term dot clock when you configure a video card to work with XFree86 (the X Window System). This term refers to the rate at which the video card can traverse the raster lines that make up a complete display screen. The value of the dot clock is expressed in terms of the number of dots drawn per second.

To get a rough idea of the dot clock, consider a 640x480 display, which has 640x480 = 307,200 dots (visible ones, anyway). To produce the appearance of a steady display, these dots should be repainted at least 72 times per second. Thus, the video card has to paint 640x480x72 = 22,118,400 dots a second. This rate amounts to approximately 22 million dots a second, which is expressed as a dot clock of 22 MHz (1 MHz = a million times per second).

In reality, an even higher dot clock is required for a 640x480 display refreshed at 72 Hz (which means 72 times per second) because the electron beam cannot turn around on a dime. As illustrated in Figure 3-1, the electron beam has to traverse a scan line beyond the visible number of dots before it can snap back to the beginning of the next line. The required dot clock for a 640x480 display at a 72-Hz refresh rate, for example, is 25.2 MHz.

As you must realize by now, a higher-resolution display requires an even higher dot clock. A 1,024x768 display at a 72-Hz refresh rate implies 1,024x768x72 = 56,623,104 dots per second, at minimum. Thus, you can tell that the dot clock necessary for a 1,024x768 display will be somewhat higher than 56.6 MHz.

Older video cards support a fixed set of dot clocks, but many advanced video cards include a programmable dot clock. When a video card has a programmable dot clock, the X server can set the video card to operate at any dot clock that lies in a range of acceptable values. For a video card with a programmable dot clock, however, you may need to specify the name of the chip that controls the dot clock (known as the clock chip).

Importance of Video Card and Monitor

Linux works with any video card/monitor combination in text mode. If a video card and monitor work under MS-DOS or Windows, the combination also works under Linux in text mode. The story is different when you install XFree86, the X Window System for Linux. Because XFree86 controls the video card directly (MS-DOS typically uses standard predefined modes of the video card and Windows has its own video drivers), getting XFree86 running with a specific video card takes more work.

The monitor also is important for XFree86. Electrical signals from the video card control the monitor, so the monitor must be compatible with the video card. The output on the monitor is the result of a rapidly moving electron beam that the video card's signals control. A monitor's compatibility with a video card has to do with how fast the video card attempts to move the electron beam on the display screen.

The resolutions a video card/monitor combination supports depend on the amount of video memory on the card and on how fast the monitor's electron beam can move. XFree86 gets the necessary information about the monitor and the video card from a special text file named XF86Config in the /etc/X11 directory.