Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
System Administration Commandsffbconfig(1M)


NAME

 ffbconfig, SUNWffb_config - configure the FFB Graphics Accelerator

SYNOPSIS

 /usr/sbin/ffbconfig [-dev device-filename] [ -res video-mode [ now | try] [ noconfirm | nocheck]] [ -file | machine | system] [ -deflinear | true | false] [ -defoverlay | true | false] [ -linearorder | first | last] [ -overlayorder | first | last] [ -expvis | enable | disable] [ -sov | enable | disable] [-maxwids n] [ -extovl | enable | disable] [-g gamma-correction-value] [-gfile gamma-correction-file] [-propt] [-prconf] [-defaults]
 /usr/sbin/ffbconfig [-propt ] [-prconf]
 /usr/sbin/ffbconfig [-help] [ -res ?]

DESCRIPTION

 

ffbconfig configures the FFB Graphics Accelerator and some of the X11 window system defaults for FFB.

The first form of ffbconfig stores the specified options in the OWconfig file. These options will be used to initialize the FFB device the next time the window system is run on that device. Updating options in the OWconfig file provides persistence of these options across window system sessions and system reboots.

The second and third forms of ffbconfig, which invoke only the -prconf, -propt, -help, and -res ? options do not update the OWconfig file. Additionally, for the third form all other options are ignored.

Options may be specified for only one FFB device at a time. Specifying options for multiple FFB devices requires multiple invocations of ffbconfig.

Only FFB-specific options can be specified through ffbconfig. The normal window system options for specifying default depth, default visual class and so forth are still specified as device modifiers on the openwin command line. See the OpenWindows Desktop Reference Manual for details.

The user can also specify the OWconfig file that is to be updated. By default, the machine-specific file in the /etc/openwin directory tree is updated. The -file option can be used to specify an alternate file to use. For example, the system-global OWconfig file in the /usr/openwin directory tree can be updated instead.

Both of these standard OWconfig files can only be written by root. Consequently, the ffbconfig program, which is owned by the root user, always runs with setuid root permission.

OPTIONS

 
-dev device-filename
Specifies the FFB special file. The default is /dev/fbs/ffb0.
-file machine |system
Specifies which OWconfig file to update. If machine, the machine-specific OWconfig file in the /etc/openwin directory tree is used. If system, the global OWconfig file in the /usr/openwin directory tree is used. If the file does not exist, it is created.
-res video-mode [now | try [noconfirm | nocheck]]
Specifies the video mode used to drive the monitor connected to the specified FFB device.

video-mode has the format of widthxheightxrate where width is the screen width in pixels, height is the screen height in pixels, and rate is the vertical frequency of the screen refresh.

The s suffix, as in 960x680x112s and 960x680x108s, indicates stereo video modes. The i suffix, as in 640x480x60i and 768x575x50i, indicates interlaced video timing. If absent, non-interlaced timing will be used.

-res (the third form in the SYNOPSIS) also accepts formats with @ (at sign) in front of the refresh rate instead of x. 1280x1024@76 is an example of this format.

Some video-modes are supported only on certain revisions of FFB. Also, some video-modes, supported by FFB, may not be supported by the monitor. The list of video-modes supported by the FFB device and the monitor can be obtained by running ffbconfig with the -res ? option.

The following table lists all possible video modes supported on FFB:

NameDescription
1024x768x60 
1024x768x70 
1024x768x75  
1024x768x77 
1024x800x84 
1152x900x66 
1152x900x76 
1280x800x76 
1280x1024x60 
1280x1024x67 
1280x1024x76 
960x680x112s(stereo)
960x680x108s(stereo)
640x480x60  
640x480x60i(interlaced)
768x575x50i(interlaced)
1440x900x76(hi-res)
1600x1000x66(hi-res)
1600x1000x76i(hi-res)
1600x1280x76(hi-res)
1920x1080x72(hi-res)
1920x1200x70(hi-res)

Symbolic names

For convenience, some video modes have symbolic names defined for them. Instead of the form widthxheightxrate, one of these names may be supplied as the argument to -res. The meaning of the symbolic name none is that when the window system is run the screen resolution will be the video mode that is currently programmed in the device.

NameCorresponding Video Mode
svga1024x768x60
11521152x900x76
12801280x1024x76
stereo960x680x112s
ntsc640x480x60i
pal768x575x50i
none(video mode currently programmed in device)

The -res option also accepts additional, optional arguments immediately following the video mode specification. Any or all of these may be present.

now
Specifies that the FFB device will be immediately programmed to display this video mode, in addition to updating the video mode in the OWconfig file. This option is useful for changing the video mode before starting the window system.

It is inadvisable to use this suboption with ffbconfig while the configured device is being used (for example, while running the window system); unpredictable results may occur. To run ffbconfig with the now suboption, first bring the window system down. If the now suboption is used within a window system session, the video mode will be changed immediately, but the width and height of the affected screen won't change until the window system is exited and re-entered. In addition, the system may not recognize changes in stereo mode. Consequently, this usage is strongly discouraged.

noconfirm
Instructs ffbconfig to bypass confirmation and and warning messages and to program the requested video mode anyway.

Using the -res option, the user could potentially put the system into an usable state, a state where there is no video output. This can happen if there is ambiguity in the monitor sense codes for the particular code read. To reduce the chance of this, the default behavior of ffbconfig is to print a warning message to this effect and to prompt the user to find out if it is okay to continue. This option is useful when ffbconfig is being run from a shell script.

nocheck
Suspends normal error checking based on the monitor sense code. The video mode specified by the user will be accepted regardless of whether it is appropriate for the currently attached monitor. This option is useful if a different monitor is to be connected to the FFB device. Note: Use of this option implies noconfirm as well.
try
Programs the specified video mode on a trial basis. The user will be asked to confirm the video mode by typing y within 10 seconds. The user may also terminate the trial before 10 seconds are up by typing any character. Any character other than y or RETURN is considered a no and the previous video mode will be restored and ffbconfig will not change the video mode in the OWconfig file and other options specified will still take effect. If a RETURN is pressed, the user is prompted for a yes or no answer on whether to keep the new video mode. This option implies the now suboption (see the warning note on the now suboption).
-deflinear true | false
FFB possesses two types of visuals: linear and nonlinear. Linear visuals are gamma corrected and nonlinear visuals are not. There are two visuals that have both linear and nonlinear versions: 24-bit TrueColor and 8-bit StaticGray.

-deflinear true sets the default visual to the linear visual that satisfies other specified default visual selection options. Specifically, the default visual selection options are those set by the Xsun (1) defdepth and defclass options. See OpenWindows Desktop Reference Manual for details.

-deflinear false (or if there is no linear visual that satisfies the other default visual selection options) sets the default visual to t the non-linear visual as the default.

This option cannot be used when the -defoverlay option is present, because FFB does not possess a linear overlay visual.

-defoverlay true | false
FFB provides an 8-bit PseudoColor visual whose pixels are disjoint from the rest of the FFB visuals. This is called the overlay visual. Windows created in this visual will not damage windows created in other visuals. The converse, however, is not true. Windows created in other visuals will damage overlay windows. This visual has 256 maxwids of opaque color values. See -maxwids in OPTIONS.

If -defoverlay is true, the overlay visual will be made the default visual. If -defoverlay is false, the nonoverlay visual that satisfies the other default visual selection options, such as defdepth and defclass, will be chosen as the default visual. See the OpenWindows Desktop Reference Manual for details.

Whenever -defoverlay true is used, the default depth and class chosen on the openwin command line must be 8-bit PseudoColor. If not, a warning message will be printed and the -defoverlay option will be treated as false. This option cannot be used when the -deflinear option is present, because FFB doesn't possess a linear overlay visual.

-linearorder first | last
If first, linear visuals will come before their non-linear counterparts on the X11 screen visual list for the FFB screen. If last, the nonlinear visuals will come before the linear ones.
-overlayorder first | last
If true, the depth 8 PseudoColor Overlay visual will come before the non-overlay visual on the X11 screen visual list for the FFB screen. If false, the non-overlay visual will come before the overlay one.
-expvis enable | disable
If enabled, OpenGL Visual Expansion will be activated. Multiple instances of selected visual groups (8-bit PseudoColor, 24-bit TrueColor and so forth) can be found in the screen visual list.
-sov enable | disable
Advertises the root window's SERVER_OVERLAY_VISUALS property. SOV visuals will be exported and their transparent types, values and layers can be retrieved through this property. If -sov disable is specified, the SERVER_OVERLAY_VISUALS property will not be defined. SOV visuals will not be exported.
-maxwids n
Specifies the maximum number of FFB X channel pixel values that are reserved for use as window sIDs (WIDs). The remainder of the pixel values in overlay colormaps are used for normal X11 opaque color pixels. The reserved WIDs are allocated on a first-come first-serve basis by 3D graphics windows (such as XGL), MBX windows, and windows that have a non-default visual. The X channel codes 0 to (255-n) will be opaque color pixels. The X channel codes (255-n+1) to 255 will be reserved for use as WIDs. Legal values on FFB, FFB2 are: 1, 2, 4, 8, 16, and 32. Legal values on FFB2+ are: 1, 2, 4, 8, 16, 32, and 64.
-extovl enable | disable
This option is available only on FFB2+. If enabled, extended overlay is available. The overlay visuals will have 256 opaque colors. The SOV visuals will have 255 opaque colors and 1 transparent color. This option enables hardware supported transparency which provides better performance for windows using the SOV visuals.
-g gamma-correction value
This option is available only on FFB2+. This option allows changing the gamma correction value. All linear visuals provide gamma correction. By default the gamma correction value is 2.22. Any value less than zero is illegal. The gamma correction value is applied to the linear visual, which then has an effective gamma value of 1.0, which is the value returned by XSolarisGetVisualGamma(3). See XSolarisGetVisualGamma(3) for a description of that function.

This option can be used while the window system is running. Changing the gamma correction value will affect all the windows being displayed using the linear visuals.

-gfile gamma-correction file
This option is available only on FFB2+. This option loads gamma correction table from the specified file. This file should be formatted to provide the gamma correction values for R, G and B channels on each line. This file should provide 256 triplet values, each in hexadecimal format and separated by at least 1 space. Following is an example of this file:
 
0x00 0x00 0x00
0x01 0x01 0x01
0x02 0x02 0x02
...
...
0xff 0xff 0xff

Using this option, the gamma correction table can be loaded while the window system is running. The new gamma correction will affect all the windows being displayed using the linear visuals. Note, when gamma correction is being done using user specified table, the gamma correction value is undefined. By default, the window system assumes a gamma correction value of 2.22 and loads the gamma table it creates corresponding to this value.

-defaults
Resets all option values to their default values.
-propt
Prints the current values of all FFB options in the OWconfig file specified by the -file option for the device specified by the -dev option. Prints the values of options as they will be in the OWconfig file after the call to ffbconfig completes. The following is a typical display using the -propt option:
 
--- OpenWindows Configuration for /dev/fbs/ffb0 ---
OWconfig: machine
Video Mode: NONE
Default Visual: Non-Linear Normal Visual
Visual Ordering: Linear Visuals are last
                 Overlay Visuals are last
OpenGL Visuals: disabled
SOV: disabled
Allocated WIDs: 32
-prconf
Prints the FFB hardware configuration. The following is a typical display using the -prconf option:
 
--- Hardware Configuration for /dev/fbs/ffb0 ---
Type: double-buffered FFB2 with Z-buffer
Board: rev x
PROM Information: @(#)ffb2.fth x.x xx/xx/xx
FBC: version x
DAC: Brooktree 9068, version x
3DRAM: Mitsubishi 1309, version x
EDID Data: Available - EDID version 1 revision x
Monitor Sense ID: 4  (Sun 37x29cm RGB color monitor)
Monitor possible resolutions: 1024x768x60, 1024x768x70,
	  1024x768x75, 1152x900x66, 1152x900x76,
	  1280x1024x67, 1280x1024x76, 960x680x112s,
	  640x480x60
Current resolution setting: 1280x1024x76
-help
Prints a list of the ffbconfig command line options, along with a brief explanation of each.

DEFAULTS

 

For a given invocation of ffbconfig command line if an option does not appear on the command line, the corresponding OWconfig option is not updated; it retains its previous value.

When the window system is run, if an FFB option has never been specified via ffbconfig, a default value is used. The option defaults are listed in the following table:

OptionDefault
dev/dev/fbs/ffb0
filemachine
resnone
deflinearfalse
defoverlayfalse
linearorderlast
overlayorderlast
expvisenabled
sovenabled
maxwids32

The default for the -res option of none means that when the window system is run the screen resolution will be the video mode that is currently programmed in the device.

This provides compatibility for users who are used to specifying the device resolution through the PROM. On some devices (for example, GX) this is the only way of specifying the video mode. This means that the PROM ultimately determines the default FFB video mode.

EXAMPLES

 Example 1. Changing The Monitor Type
 

The following example switches the monitor type to the resolution of 1280 x 1024 at 76 Hz:
 
example% /usr/sbin/ffbconfig -res 1280x1024x76

FILES

 
/dev/fbs/ffb0
device special file

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWffbcf

SEE ALSO

 

mmap(2), attributes(5), fbio(7I), ffb(7D)

OpenWindows Desktop Reference Manual


SunOS 5.9Go To TopLast Changed 11 Nov 1999

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.