afbconfig(1M)
NAME
afbconfig, SUNWafb_config - configure the AFB Graphics
Accelerator
SYNOPSIS
/usr/sbin/afbconfig [-dev device-filename] [-res video-mode
[now | try] [noconfirm | nocheck]] [-file machine | system]
[-deflinear true | false] [-defoverlay true | false] [-
overlayorder first | last] [-expvis enable | disable] [-sov
enable | disable] [-maxwinds n] [-extovl enable | disable]
[-g gamma-correction-value] [-gfile gamma-correction-file]
[-propt] [-prconf] [-defaults]
/usr/sbin/afbconfig [-propt] [-prconf]
/usr/sbin/afbconfig [-help] [-res ?]
DESCRIPTION
afbconfig configures the AFB Graphics Accelerator and some
of the X11 window system defaults for AFB.
The following form of afbconfig stores the specified options
in the OWconfig file:
/usr/sbin/afbconfig [-devdevice-filename] [-res video-mode
[now | try] [noconfirm | nocheck]] [-file machine | system]
[-deflinear true | false] [-defoverlay true | false] [-
overlayorderfirst | last] [-expvisenable | disable] [-sov
enable | disable] [-maxwindsn] [-extovl enable | disable]
[-ggamma-correction-value] [-gfilegamma-correction-file] [-
propt] [-prconf] [-defaults]
The options are used to initialize the AFB 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 following forms of the afbconfig command invoke only the
-prconf, -propt, -help, and -res ? options. None of these
options update the OWconfig file.
/usr/sbin/afbconfig [-propt] [-prconf]
/usr/sbin/afbconfig [-help] [-res ?]
Additionally, the following invokation of afbconfig ignores
all other options:
/usr/sbin/afbconfig [-help] [-res ?]
You can only specify options for one AFB device at a time.
Specifying options for multiple AFB devices requires
multiple invocations of the afbconfig command.
Only AFB-specific options can be specified through afbcon-
fig. The normal window system options for specifying default
depth, visual class and so forth are still specified as dev-
ice modifiers on the openwin command line.
You 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 direc-
tory tree can be updated instead.
Both of these standard OWconfig files can only be written by
root. Consequently, the afbconfig program, which is owned by
the root user, always runs with setuid root permission.
Option Defaults
For a given invocation of afbconfig command line if an
option does not appear on the command line, the correspond-
ing OWconfig option is not updated; it retains its previous
value. When the window system is run, if an AFB option has
never been specified by way of afbconfig, a default value is
used. The option defaults are as follows:
-dev /dev/fbs/afb0
-file machine
-res none
-deflinear
false
-defoverlay
false
-linearorder
last
-overlayorder
last
-expvis
enabled
-sov enabled
-maxwids
32
-extovl
enabled
-g 2.22
The default for the -res option of none means that when the
window system is run the screen resolution is the video mode
currently programmed in the device.
This provides compatibility for users who are used to speci-
fying the device resolution through the PROM. On some dev-
ices (for example, GX) this is the only way of specifying
the video mode. This means that the PROM ultimately deter-
mines the default AFB video mode.
OPTIONS
The following options are supported:
-defaults
Resets all option values to their default values.
-deflinear true | false
AFB possesses two types of visuals: linear and non-
linear. Linear visuals are gamma corrected and non-
linear visuals are not. There are two visuals that
have both linear and nonlinear versions: 24-bit
TrueColor and 8-bit StaticGray.
If true, the default visual is set to the linear
visual that satisfies other specified default visual
selection options (specifically, the Xsun(1) defdepth
and defclass options described in the OpenWindows
Reference Manual).
If false, or if there is no linear visual that satis-
fies the other default visual selection options, the
non-linear visual specified by these other options are
chosen as the default. This option cannot be used when
the -defoverlay option is present, because AFB doesn't
possess a linear overlay visual.
-defoverlay true | false
The AFB provides an 8-bit PseudoColor visual whose
pixels are disjoint from the rest of the AFB visuals.
This is called the overlay visual. Windows created in
this visual do not damage windows created in other
visuals. The converse, however, is not true. Windows
created in other visuals damage overlay windows.
The number of colors available to the windows created
using this visual depends on the settings for the
-extovl option. If the -extovl is enabled, extended
overlay with 256 opaque color values is available. See
-extovl. If -extovl is disabled, extended overlay is
not available and the visual has 256 -maxwids) number
of opaque color values. See -maxwids.
If the value of -defoverlay is true, the overlay
visual is made the default visual. If the value of
-defoverlay is false, the nonoverlay visual that
satisfies the other default visual selection options,
such as def, depth, and defclass, are chosen as the
default visual. See the OpenWindows Reference Manual.
Whenever the defoverlay true option is used, the
default depth and class specified on the openwin com-
mand line must be 8-bit PseudoColor. If not, a warning
message is printed and the -defoverlay option is
treated as false.
The -defoverlay option can not be used when the
-deflinear option specified, because AFB doesn't pos-
sess a linear overlay visual.
-dev device-filename
Specifies the AFB special file. The default is
/dev/fbs/afb0.
-expvis enable | disable
If enabled, activates OpenGL Visual Expansion. Multi-
ple instances of selected visual groups (8-bit Pseu-
doColor, 24-bit TrueColor and so forth) are in the
screen visual list.
-extovl enable | disable
If enabled, makes extended overlay available. The
overlay visuals have 256 opaque colors. The SOV visu-
als have 255 opaque colors and 1 transparent color.
This option also enables hardware supported tran-
sparency, thus provides better performance for windows
using the SOV visuals.
-file machine | system
Specifies which OWconfig file to update. If machine is
specified, the machine-specific OWconfig file in the
/etc/openwin directory tree is used. If system speci-
fies the global OWconfig file in the /usr/openwin
directory tree. If the specified file does not exist,
it is created.
-g gamma-correction value
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 0
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 XSolaris-
GetVisualGamma(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 affects
all the windows being displayed using the linear visu-
als.
-gfile gamma-correction-file
Loads the gamma correction table from the specified
file (gamma-correction-file). This file should be for-
matted to provide the gamma correction values for R, G
and B channels on each line. Each of these values
should be in hexadecimal format and seperated from
each other by at least one space. gamma-correction-
file should also provide 256 such triplets.
An example of a gamma-correction-file follows.
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 affects all the windows being
displayed using the linear visuals. When gamma correc-
tion 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.
-help Prints a list of the afbconfig command line options,
along with a brief explanation of each.
-linearorder first | last
If first, linear visuals come before their non-linear
counterparts on the X11 screen visual list for the AFB
screen. If last, the nonlinear visuals come before the
linear ones.
-maxwids n
Specifies the maximum number of AFB X channel pixel
values that are reserved for use as window IDs (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) are opaque color
pixels. The X channel codes (255 - n + 1) to 255 are
reserved for use as WIDs. Legal values are 1, 2, 4,
8, 16, 32, and 64.
This option is available only if the -extovl is dis-
abled.
-overlayorder first | last
If first, the depth 8 PseudoColor Overlay visual comes
before the non-overlay visual on the X11 screen visual
list for the AFB screen. If last, the non-overlay
visual comes before the overlay one.
-propt
Prints the current values of all AFB 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 afbconfig completes.
The following is a typical display:
--- OpenWindows Configuration for /dev/fbs/afb0 ---
OWconfig: machine
Video Mode: 1280x1024x76
Default Visual: Non-Linear Normal Visual
Visual Ordering: Linear Visuals are last
Overlay Visuals are last
OpenGL Visual Expansion: enabled
Server Overlay Visuals: enabled
Extended Overlay: enabled
Underlay WIDs: 64 (not configurable)
Overlay WIDs: 4 (not configurable)
Gamma Correction Value: 2.220
Gamma Correction Table: Available
-prconf
Prints the AFB hardware configuration.
The following is a typical display:
--- Hardware Configuration for /dev/fbs/afb0 ---
Type: double-buffered AFB with Z-buffer
Board: rev 0 (Horizontal)
Number of Floats: 6
PROM Information: @(#)afb.fth x.xx xx/xx/xx
AFB ID: 0x101df06d
DAC: Brooktree 9070, version 1 (Pac2)
3DRAM: Mitsubishi 130a, version x
EDID Data: Available - EDID version 1 revision x
Monitor Sense ID: 4 (Sun 37x29cm RGB color monitor)
Monitor possible resolutions: 1024x768x77, 1024x800x84, 1
1152x900x76, 1280x1024x67, 1280x1024x76, 960x680xx108s
Current resolution setting: 1280x1024x76
-sov enable | disable
If enabled, the root window's SERVER_OVERLAY_VISUALS
property are advertised. SOV visuals are exported and
their transparent types, values and layers can be
retrieved through this property. If disabled, the
SERVER_OVERLAY_VISUALS property are not defined and
SOV visuals are not exported.
-res video-mode [ now | try [ noconfirm | nocheck ] ]
Specifies the video mode used to drive the monitor
connected to the specified AFB device.
The format of these built-in video modes is: widthx-
heightxrate, where width is the screen width in pix-
els, height is the screen height in pixels, and rate
is the vertical frequency of the screen refresh.
The s suffix of 960x680x112s and 960x680x108s means
that these are stereo video modes. The i suffix of
640x480x60i and 768x575x50i designates interlaced
video timing. If absent, non-interlaced timing is
used.
As a convenience, the -res also accepts formats with
an at sign (@) in front of the refresh rate instead of
n, (1280x1024@76). Some video-modes, supported by AFB,
may not be supported by the monitor. The list of
video-modes supported by the AFB device and the moni-
tor can be obtained by running afbconfig with the -res
? option (the third form shown SYNOPSIS).
A list of all possible video-modes supported on AFB
follows:
1024x768x60
1024x768x70
1024x768x75
1024x768x77
1024x800x84
1152x900x66
1152x900x76
1280x800x76
1280x1024x60
1280x1024x67
1280x1024x76
960x680x112s (Stereo)
960x680x108s (Stereo)
640x480x60
640x480x60i (Interlaced)
768x575x50i (Interlaced)
For convenience, some of the video-modes supported on
the AFB have symbolic names defined for them. Instead
of the form widthxheightxrate, one of these names may
be supplied as the argument to the -res option. The
meaning of the symbolic name none is that when the
window system is run, the screen resolution is the
video mode that is currently programmed in the device.
A list of symbolic names for video-modes supported on
AFB follows:
Name Corresponding Video Mode
svga 1024x768x60
1152 1152x900x76
1280 1280x1024x76
stereo 960x680x112s
ntsc 640x480x60i
pal 768x575x50i
none (see text above)
The -res option also accepts the additional, optional
arguments immediately following the video mode specif-
ication. Any or all of the following arguments can be
specified:
noconfirm
Using the -res option, the user could poten-
tially put the system into an unusable 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 afbconfig is to print a warning message to
this effect and to prompt the user to find out
if it is okay to continue. The noconfirm option
instructs afbconfig to bypass this confirmation
and to program the requested video mode anyway.
This option is useful when afbconfig is being
run from a shell script.
nocheck
If present, the normal error checking based on
the monitor sense code is suspended. The video
mode specified by the user is accepted regard-
less of whether it is appropriate for the
currently attached monitor. (This option is use-
ful if a different monitor is to be connected to
the AFB device). Use of this option implies
noconfirm well.
now Updates the video mode in the OWconfig file, and
immediately programs the AFB device to display
this video mode. This is useful for changing the
video mode before starting the window system.
It is inadvisable to use this argument with
afbconfig while the configured device is being
used (for example, while running the window sys-
tem); unpredictable results may occur. To run
afbconfig with the now argument, first bring the
window system down. If the now argument is used
within a window system session, the video mode
is changed immediately, but the width and height
of the affected screen won't change until the
window system is exited and re-entered again. In
addition, the system may not recognize changes
in stereo mode. Consequently, this usage is
strongly discouraged.
try If present, the specified video mode is pro-
grammed on a trial basis. The user is asked to
confirm the video mode by typing y within 10
seconds. Or the user may terminate the trial
before 10 seconds are up by typing any charac-
ter. Any character other than y or <Return> is
considered a no. The previous video mode is
restored and afbconfig does not change the video
mode in the OWconfig file (other options speci-
fied still take effect). If a <Return> is
typed, the user is prompted for a yes or no
answer on whether to keep the new video mode.
This option implies the now argument (see the
warning note on the now argument).
EXAMPLES
Example 1: Switching the monitor type
The following example switches the monitor type to a resolu-
tion of 1280 x 1024 at 76 Hz:
example% /usr/sbin/afbconfig -res 1280x1024x76
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWafbcf |
|_____________________________|_____________________________|
SEE ALSO
mmap(2), attributes(5)
Man(1) output converted with
man2html