Solaris Handbook for Sun Frame Buffers

Chapter 6 PGX32 Graphics Accelerator

This chapter describes how to change the display resolution on the PGX32 Graphics Accelerator.

You can use the GFXconfig menu-style interface utility any time to change screen resolutions. See the GFXconfig man page for a detailed description.


Note -

gfx is the UNIX device name for the PGX32 Graphics Accelerator.


Interactive Configuration

  1. To use GFXconfig to configure your PGX32 card, type:


    # GFXconfig -i
    

The PGX32 configuration window is displayed (Figure 6-1).

Figure 6-1 PGX32 Configuration Window

Graphic

Table 6-1 describes the PGX32 configuration window.

Table 6-1 PGX32 Configuration Window

Function 

Description 

Up and down arrows 

Selects the desired PGX32 device to modify. 

Left and right arrows 

Selects the parameter to modify (for example, screen resolution, bit-depth, or synchronization). 

Space bar 

Used to modify the parameter for the given PGX32 device (brings up a menu when applicable). 

Puts a test pattern on the entire display. Press any key to return to the main screen. 

Saves the current settings and exits the configuration window. 

Help 

Exits the program without saving any changes. 

Noninteractive Configuration

Sometimes it is convenient to configure the PGX32 card noninteractively. This method is especially useful when configuring many systems identically or when you know which configuration is appropriate for the system.

GFXconfig uses the same conventions as the m64config utility. m64config is used for all ATI-based graphics which includes the Sun Ultra 5 and Sun Ultra 10 motherboard graphics (both 8-bit and 24-bit systems) and PGX 8-bit PCI frame buffer. You can set all of the parameters that can be set using the interactive version by specifying the correct flag followed by a desired value. Table 6-2 describes these parameters.

Table 6-2 Noninteractive Configuration Parameters

Parameter 

Description 

-dev device

Displays the device to configure. 

-res resolution

Displays the resolution name. 

-res \?

Shows resolutions. 

-file filename

Displays the configuration file: system or machine.

-depth depth

Shows the bit depth (8 or 24, default is 24). 

-defaults

Resets the device to the default parameters. 

-24only (true/false)

Forces all windows to use 24-bit visuals. This may prohibit some 8-bit applications from working. 

-gfile gamma file

Lists the gamma file. 

-gvalue gamma value

Lists the gamma value.  

-propt

Displays the current settings. 

-prconf

Displays hardware information. 

-help

Shows usage information. 


Note -

By default, the bit depth is set to 8/24 for resolutions of 1280 x 1024 and less, or 8 only for higher resolutions.


Examples

  1. To configure the resolution on the PGX32 to 1152 x 900 at 66, type:


    # GFXconfig -res 1152x900x66
    

    To verify the resolution prior to setting it permanently, add the word "try" after the resolution name. This option displays a test pattern on the screen until you press the Return key. Then you can accept or reject the resolution. For example:


    # GFXconfig -res 1152x900x66 try -dev /dev/fbs/gfxp0
    

  1. To set the resolution to 1024 x 768 at 60 with a single TrueColor visual (no 8-bit PseudoColor visual), type:


    # GFXconfig -res 1024x768x60 -24only true
    

  1. To see the current settings for /dev/fbs/gfxp0, type:


    # GFXconfig -propt -dev /dev/gfx/gfxp0
    

Other Methods for Changing the Screen Resolution

Normally, the default screen resolution is sufficient for most users. However, you may need to change the default resolution if:

Guidelines

The general guidelines to follow when changing the default screen resolutions are:

Methods

The procedures for changing the screen resolution described in this chapter include:

EDID Auto-detect Feature for PGX32

If you are using a monitor with DDC2B/EDID protocol, the default resolution will be determined using the Auto-Detect feature. With this protocol, the GFX card first checks the Standard Timing Identifiers (taking the first one supported), then tries to match the Established Timings. Failing the above method, the card will default to 1152 x 900 x 66.


Note -

The monitor must be turned on prior to booting the system in order for the PGX32 to communicate with it.


The methods described in this appendix will override any information obtained via EDID.

output-device Method

It is possible to specify the screen resolution of PGX32 card via the output-device environment variable by using the format screen:rAxBxC, where:A is the desired horizontal resolution, B is the desired vertical resolution, and C is the desired refresh rate.

The system will check these values against an internal list of resolutions (see Table 6-3), and use the corresponding entry as the screen resolution.

For example, to use VESA1024 x 768 at 75 as the screen resolution, type the following at the ok prompt:


ok setenv output-device screen:r1024x768x75
ok reset


Note -

The new screen resolution will take effect following the reset, and will hold the resolution information until the output-device variable is changed manually.


Video Mode Method

At the ok prompt in Boot PROM mode, the screen resolution can be easily set on the PGX32 cards by using one of the 34 preinstalled resolution modes. These resolution settings are identified by video modes 0-33 (Table 6-3).


Note -

Use video modes 0-25 to select a screen depth of 24 bits, or video modes 26-33 to select a screen depth of 8 bits.


Table 6-3 PGX32 Screen Resolutions

Mode 

Resolution 

640 x 480 @ 60 

640 x 480 @ 72 

640 x 480 @ 75 

640 x 480 @ 85 

800 x 600 @ 60 

800 x 600 @ 72 

800 x 600 @ 75 

800 x 600 @ 85 

1024 x 768 @ 60 

1024 x 768 @ 70 

10 

1024 x 768 @ 75 

11 

1024 x 768 @ 77 * 

12 

1024 x 768 @ 85 

13 

1024 x 800 @ 85 * 

14 

1152 x 900 @ 60 

15 

1152 x 900 @ 66 * 

16 

1152 x 900 @ 70 

17 

1152 x 900 @ 75 

18 

1152 x 900 @ 76 * 

19 

1152 x 900 @ 85 

20 

1280 x 800 @ 76 * 

21 

1280 x 1024 @ 60 

22 

1280 x 1024 @ 67 * 

23 

1280 x 1024 @ 75 

24 

1280 x 1024 @ 76 * 

25 

1280 x 1024 @ 85 

26 

1600 x 1200 @ 66 * 

27 

1600 x 1200 @ 76 * 

28 

1600 x 1200 @ 60 

29 

1600 x 1200 @ 65 

30 

1600 x 1200 @ 70 

31 

1600 x 1200 @ 75 

32 

1600 x 1200 @ 76 

33 

1600 x 1200 @ 80 * 


Note -

See "Using nvedit to Modify NVRAM" for a description of nvedit commands.


For example, to set the screen resolution to 1024 x 768 at 60Hz, video-mode 8, type:


ok nvedit
  0: 8 value video-mode  1: <ctrl-c>
ok nvstore
ok setenv use-nvramrc? true
ok reset


Note -

The last three commands enable the NVRAM. Without these lines, the changes you make with nvedit will be ignored.


Video Timing Method

If all of the previously described methods fail for your configuration, it is possible to specify the exact timing numbers for a particular resolution. The last method for setting the screen resolution also uses nvedit. This method is more involved and requires knowledge of all timing parameters for the desired resolution. Therefore, this method is only meant for monitors whose resolutions are not available in the Video-Mode Method. See "Using nvedit to Modify NVRAM" for a description of nvedit commands.


Note -

You should use this method only if the previous methods have been unsuccessful.


For example, to set the screen resolution to 1280 x 1024 at 76 Hz:


ok nvedit
 0: : video-timing " 1280, 384, 32, 64, \
		1024, 43, 3, 8, 135000000, 0" ;
 1:	<ctrl-c>
ok nvstore
ok setenv use-nvramrc? true
ok reset


Note -

The syntax is very important. The spaces must be present exactly as they appear in the example.



Note -

The last three commands enable the NVRAM. Without these lines, the changes you make with nvedit will be ignored.


Following is a brief description of the ten parameters used in this method.

Table 6-4 Sync Values

Sync Value 

Meaning 

separate sync 

sync on green 

512 

positive vertical sync pulse 

1024 

positive horizontal sync pulse 

2048 

composite sync 


Note -

To obtain the timing parameters required to use this method, contact SunService at 1-800-USA-4SUN with your monitor requirements.


Setting PGX32 as the Console (Optional)

To use the PGX32 software as the console device, use the procedures in the sections that follow.

PGX32 Card as the Only Frame Buffer

Sun Ultra 5 and Sun Ultra 10 Systems

To use the PGX32 card as the system console in an Sun Ultra 5 or Sun Ultra 10 system as the only frame buffer, first disable the 8-bit or 24-bit onboard graphics, that comes standard with these systems.

  1. To disable the 8-bit or 24-bit graphics device built into the motherboard, type:


    ok setenv pcib-probe-list 1,3
    ok reset
    

    Once the system is reset, all console messages are directed to the PGX32 card.

  1. To restore the motherboard 8-bit or 24-bit graphics device as the console for any reason, simply add it back to pcib-probe-list by typing:


    ok setenv pcib-probe-list 1,2,3
    ok reset
    

Sun Ultra 30 and Sun Ultra 60 Systems

If no other frame buffers are present in a Sun Ultra 30 or Sun Ultra 60, then the PGX32 card will be the console by default, provided that the board is in a valid probed PCI slot.

PGX32 Card With a Secondary Frame Buffer

The PGX32 card can be made the console device when other secondary frame buffers are present in the system.

Onboard Graphics (Ultra 5 and Ultra 10 Only)

The Sun Ultra 5 and Sun Ultra 10 standard onboard graphics and PGX32 card(s) can only coexist in the system if the onboard graphics device is the console. Otherwise, the onboard graphics device must be disabled as described above in ""PGX32 Card as the Only Frame Buffer"."

Systems With UPA Bus Frame Buffers

To configure the PGX32 card as the console when UPA frame buffers are in the system, the output-device variable in NVRAM must be changed to the actual path of the desired PGX32 cards. This path can best be determined by searching for the string TSI in the / tree at the ok prompt.

For example, to find the pci devices, type:


ok cd /pci@1f,4000
ok ls

When you are in the correct location, you should see at least one entry containing the string TSI (that is, TSI,gfxp@# where # is a digit representing your PGX32 slot location).

Use this entry as the console device for your desired PGX32 card. For example, if the path is /pcid@1f,4000 (as shown above) to the device TSI,gfxp@#, type:


ok setenv output-device /pci@1f,4000/TSI,gfxp@#
ok reset


Note -

Replace # with whatever your PGX32 device requires.


Once the system is reset, all console messages will be directed to that PGX32 card.

To restore the default graphics device as the console for any reason, simply set the output-device variable back to its default value of the screen. To do this, type:


ok setenv output-device screen
ok reset

Other PCI Frame Buffers

To make the PGX32 the console device when other PCI frame buffers are present in the system, it may be necessary to change the pcia-probe-list to probe the PGX32 slot before that of the secondary frame buffer (in addition to the changes described above in ""PGX32 Card as the Only Frame Buffer".")

  1. Determine the slot numbers that correspond to these frame buffers, then ensure that the PGX32 slot number precedes that of the secondary frame buffer in the pcia-probe-list.

For example, if the PGX32 is located in slot 3, and the secondary frame buffer is located in slot 1, then update the pcia-probe-list so that slot 3 is probed before slot 1. A possible configuration is:


ok setenv pcia-probe-list 3,2,1,4
ok reset

Once the system is reset, all console messages will be directed to the PGX32 card.

Starting the Desktop Environment

This section describes how to start the OpenWindows environment, Common Desktop Environment (CDE), and the X Display Manager on the PGX32 card.

OpenWindows Environment

The following sections describe how to start the OpenWindows environment as a console or with multiple PGX32 cards. The PGX32 device name is gfxp#.

Using the PGX32 Card as the Console

  1. If the PGX32 card is the console, type:


    # openwin
    

Using Multiple PGX32 Cards

  1. To start the OpenWindows environment on two PGX32 devices, gfxp0 and gfxp1, type:


    # openwin -dev /dev/fbs/gfxp0 -dev /dev/fbs/gfxp1
    


Note -

In the above example, the gfxp device numbers are 0 and 1. These may be different in your configuration. Please check /dev/fbs/ or dmesg for correct device numbers.


Common Desktop Environment (CDE)

If you have installed CDE and would like CDE to appear on the PGX32 display, you need to modify your /etc/dt/config/Xservers file. If the SunForum card is the console device, you do not need to modify the Xservers file.

The following sample Xservers.gfx file assumes that the SunForum card is the only frame buffer on which to start CDE:


:0 Local Local_uid@console root /usr/openwin/bin/Xsun \
:0 -dev /dev/fbs/gfxp0 -nobanner


Note -

If for some reason the name of your SunForum device is something other than gfxp0, you need to substitute the correct name in the file.


You can add any other desired command line arguments to the end of this line. For example, you can start CDE on multiple displays.

  1. To do this, list each display device following the convention above.

The following example configuration displays CDE on the display named /dev/fbs/gfxp0 and uses the device named /dev/fbs/m640 (the built-in graphics device on the Sun Ultra 5 and Sun Ultra 10 systems) as a secondary frame buffer.


:0 Local Local_uid@console root /usr/openwin/bin/Xsun \
:0 -dev /dev/fbs/gfxp0 -dev /dev/fbs/m640

X Display Manager

The SunForum card also supports the X display manager (xdm). A simple configuration file is provided as /usr/openwin/lib/X11/xdm/Xservers.

If you had an Xservers file already in place, the SunForum software installation will have saved it as /usr/openwin/lib/X11/xdm/Xservers.nogfx.

By default, the installation will have added the following line, which assumes that the SunForum is the only frame buffer on which to start xdm:


:0 Local Local /usr/openwin/lib/xdm/StartOW \
:0 -dev /dev/fbs/gfxp0

You can add any other desired command line arguments to the end of this line. For example, you can start xdm on multiple displays.

  1. To do this, list each display device following the convention above.

The following example configuration displays xdm on the display named /dev/fbs/gfxp0 and uses the device named /dev/fbs/m640 (the built-in graphics device on the Sun Ultra 5 and Sun Ultra 10 systems) as a secondary frame buffer:


:0 Local Local_uid@console root /usr/openwin/bin/Xsun \
:0 -dev /dev/fbs/gfxp0 -dev /dev/fbs/m640

Using nvedit to Modify NVRAM

  1. To edit the NVRAM, begin the nvedit editor at the ok prompt:


    ok nvedit
    

See "Video Timing Method" for using the nvedit editor. There are several key sequences that you must use to edit the variables in NVRAM:

Table 6-5 NVRAM Editor

Key Sequence  

Description 

Backspace 

Delete the character preceding the cursor 

ctrl-1 

List NVRAM current values 

ctrl-p 

Move to the previous line 

ctrl-n 

Move to the next line 

ctrl-b 

Move to the previous character 

ctrl-l 

Delete to the beginning of the line 

ctrl-k 

Join the current and next line 

ctrl-u 

Delete the current line 

ctrl-c 

Exit nvram editor (return to ok prompt)

The changes will take effect only if they are stored using the nvstore command, entered at the ok prompt. Once the changes are stored, the NVRAM must be enabled before the system will execute it. This is done by setting the environment variable use-nvramrc? to true.