OpenGL programming on UltimateVision platforms bears a lot of similarity to programming other SGI platforms. Most basic features like sending vertex data within glBegin()/glEnd() code blocks or frame control with glXSwapBuffers() calls are identical. However, there UltimateVision platforms also offer a much broader suite of tools and features never before available in the Onyx product line. In addition, some features that worked well on earlier platforms may have more attractive equivalents. Subsequent sections identify many of such issues and suggest preferred ways of implementing commonly desired functionality.
This section identifies some programming features and compares their support on InfiniteReality systems with their support on UltimateVision systems. Table 5-1 provides a brief comparison.
Table 5-1. InfiniteReality Versus UltimateVision Programming Features
Feature | InfiniteReality Systems | UltimateVision Systems |
|---|---|---|
Multisampling | X | slightly different |
Shadow mappping | X | slightly different |
Depth texture | X | slightly different |
LOD bias | X | slightly different |
|
|
|
Clip mapping | X | not supported |
Video format compiler | X | not supported |
8-subsample antialiasing | X | not supported |
Luminance visuals | X | not supported |
|
|
|
Detail texture (SGIS_sharpen_texture) | X | X (using multitexturing) |
Bicubic texture filtering | X | X (using fragment programs) |
ARB imaging features | X | X (using fragment programs) |
Pixel texture (TLUTs) | X | X (using fragment programs) |
Chapter 6, “Performance Tips” describes how you can use some of these and other features of UltimateVision systems to enhance performance.
With the introduction of Onyx4 systems, SGI began using a standard distribution of the X Window System from the X Consortium called XFree86. XFree86, an implementation that was originally developed to support windowing on Unix systems based on Intel386 processors, has become a de facto standard for Linux graphical environments. Its support now extends well beyond x86 CPUs and covers other processor architectures as well as numerous graphics cards. XFree86 Version 4.2.0 implements X Version 11 Release 6.3 (X11R6.3) and is distributed for free under a fairly unrestricted license from the X Consortium. It replaces the SGI proprietary implementation of the X server marketed as Xsgi.
While XFree86 has many similarities to the commercial implementation of X Windows used in earlier SGI systems, there are several important differences that are worth mentioning. In particular, application programmers will find that the way visuals are selected may be somewhat more cumbersome. The most critical difference is that the server configures certain aspects of the graphics card's behavior at startup time using setup files. For example, in order to reconfigure the framebuffer for stereo display or to enable full-scene antialiasing, the X server needs to be restarted using different statically configured files. This is in contrast to dynamically querying and requesting new visuals from within the application through GLX requests. Additional differences exist in the interfaces with external devices. This is true of keyboards and mice as well as other external devices like the video compositor. This section describe these and related issues in more detail.
The remainder of this section describes general aspects of the configuration process then aspects that are specific to Onyx4 systems.
This section describes details of configuring an XFree86 server. It describes the process, locations of relevant files, syntax, and the most relevant tags (Section tags). Much of the information that is included here may be found in your system's man pages and on the Web, but it is provided here for your convenience. Of particular importance are the XFree86(1) and XF86Config(5) man pages.
Typically, the X server on your machine is started automatically when the machine boots. However, it is possible to restart the server at any time after that without necessarily rebooting your machine. Typically, high-level utilities that keep track of system state are used for that purpose, but it is also possible to run the XFree86 command directly. Some of the options available to you for that purpose are described in section “Restarting Graphics”. As the X server is starting, it will locate and parse a configuration file, which contains information about your system resources like keyboards, mice, graphics cards, monitors, and so on. The section “Configuration File Format” describes these somewhat intricate details.
Typically, XFree86 is started automatically at boot time using the xdm utility of the X display manager. SGI systems provide the startgfx utility, which turns the windowsystem configuration flag on (using chkconfig) and executes xdm. The simplest way of restarting graphics is to type the following on the command line:
$ (/usr/gfx/stopgfx; sleep 3; /usr/gfx/startgfx) & |
Note that this command-line entry kills all the existing windows and logs you out. The following keyboard sequence is another viable alternative:
Ctrl-Alt-Backspace
In either case, xdm uses the contents of /etc/X11/XF86Config-4 to configure the new instance of the server; so, you can place your changes directly there. However, it is also possible to use a different configuration file. Specifying a different configuration file is particularly useful if you want to switch among different configurations (for example, between XF86Config.Stereo and XF86Config.FSAA) or to debug a newly created configuration.
To use a different configuration file, you can enter the XFree86 command directly. Among its numerous options, the –xf86config option allows you to specify explicitly which configuration file to use. This option will work for any file when the server is run as root (that is, with real UID 0) or for files relative to a directory in the configuration search path for all other users as described in the section “Configuration File Location”.
For a description of the full set of options for the XFree86 command, see the XFree86(1) man page on your system.
If you routinely use multiple different framebuffer configurations, you may want to choose from a number of pre-created configuration files, rather than renaming the selected one to XF86Config-4 for the duration of the session. In this case, you will need to tell xdm which of the non-default configuration files to use. For example, if you created the file /etc/X11/XF86Config-4.myStereo, you will need to do the following:
Create a file named /var/X11/xdm/Xservers.myStereo and put the following entry in it:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.myStereo |
The value 0 refers to the first pipe.
Edit /var/X11/xdm/xdm-config and change DisplayManager.servers to /var/X11/xdm/Xservers. myStereo.
Restart graphics to put the changes into effect.
Alternatively, you can choose not to use xdm at all. You can start the X server by running xinit manually rather than automatically from xdm as shown in the following:
Log in as root.
Enter the following command sequence:
# /usr/gfx/stopgfx # chkconfig xdm off # cp /usr/bin/X11/X ~/.xinitrc |
Transfer all startup programs from .xsession/.sgisession to .xinitrc.
Enter the following command:
# XFree86 -xf86config /etc/X11/XF86Config-4 |
If your graphics are not coming back, try the following:
Check files /var/log/XFree.*.log for any error messages.
From the network or the console, enter the following command sequence:
# /usr/gfx/stopgfx # killall -9 xdm # killall -9 XFree86 # /usr/gfx/startgfx |
Replace your current XF86Config-4 file with one you are reasonably sure works (for example, freshly created with XFree86 –config). For more details, see section “Bootstrapping”.
XFree86 supports the following mechanisms for supplying/obtaining configuration and run-time parameters:
Command-line options
Environment variables
The XFree86 configuration file
Auto-detection
Fallback defaults
The list of mechanisms is ordered from highest precedence to lowest. When the same information is supplied in more than one way, the highest precedence mechanism is used. Note that not all parameters can be supplied by all methods. The available command-line options and environment variables (and some defaults) are described in the Xserver(1) and XFree86(1) man pages.
When a non-root user starts the server, the following directories will be searched in attempt to find a configuration file:
/etc/X11/cmdline /usr/X11R6/etc/X11/cmdline /etc/X11/$XF86CONFIG /usr/X11R6/etc/X11/$XF86CONFIG /etc/X11/XF86Config-4 /etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config.hostname /usr/X11R6/etc/X11/XF86Config-4 /usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config.hostname /usr/X11R6/lib/X11/XF86Config-4 /usr/X11R6/lib/X11/XF86Config |
The variable fields are defined as follows:
| cmdline | A relative path (with no “..” components) specified with the –xf86config command-line option. For details, see the section “Restarting Graphics”. | |
| $XF86CONFIG | The relative path (with no “..” components) specified by that environment variable | |
| hostname |
If, on the other hand, the server was started by the root user, a much less restricted set of paths is considered, as shown by the following:
cmdline /etc/X11/cmdline /usr/X11R6/etc/X11/cmdline $XF86CONFIG /etc/X11/$XF86CONFIG /usr/X11R6/etc/X11/$XF86CONFIG $HOME/XF86Config /etc/X11/XF86Config-4 /etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config.hostname /usr/X11R6/etc/X11/XF86Config-4 /usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config.hostname /usr/X11R6/lib/X11/XF86Config |
The variable fields are defined as follows:
| cmdline | The path specified with the –xf86config command-line option (which may be absolute or relative) | |
| $XF86CONFIG | The path specified by that environment variable (absolute or relative) | |
| $HOME | The path specified by that environment variable (usually the home directory) | |
| hostname | The machine's hostname as reported by gethostname() |
Most examples in this document assume for simplicity that your default configuration file will be /etc/X11/XF86Config-4 while alternative files are also placed in /etc/X11, but this certainly does not need to be the case. In particular, you are well advised to debug any new variant configuration files elsewhere before moving them into the standard location.
Onyx4 systems provide a gen-XF86Config script for generating a default XF86Config-4 file. The default installation runs the gen-XF86Config script during system startup to verify that a valid XF86Config-4 file is installed.
The following steps describe how to use the script:
Stop graphics.
Make a backup copy of the file with the following entry:
# mv /etc/X11/XF86Config-4 my_backup_config_file |
Invoke the script as follows:
# /etc/X11/gen-XF86Config |
Start graphics.
The behavior of gen-XF86Config is controlled by the following chkconfig variables:
xf86config_autoconfig
xf86config_autoreplace
Consult the contents of gen-XF86Config for details and useful tricks. You may also find the XFree86(1) man page helpful.
The X server sends its standard and error outputs into a log file. The default location of the log file is the following file:
/var/log/XFree86.*.log
The * in the preceding path matches the X server number (numbered from 0). Inspect this file to verify that the new configuration you created worked or to identify any problems and get clues as to what could have gone wrong.
The configuration file is composed of a number of sections, which may be present in any order. Each section has the following form:
Section “SectionName”
keyword value
. . .
EndSection
|
The following sections are supported:
| Files | File pathnames | |
| ServerFlags | Server flags | |
| Module | Dynamic module loading | |
| InputDevice | Input device description | |
| Device | Graphics device description | |
| VideoAdaptor | Xv video adaptor description | |
| Monitor | Monitor description | |
| Modes | Video mode descriptions | |
| Screen | Screen configuration | |
| ServerLayout | Overall layout | |
| DRI | Direct Rendering Infrastructure configuration | |
| Vendor | Vendor-specific configuration |
The ServerLayout sections are at the highest level. They bind together the input and output devices that will be used in a session. The input devices are described in the InputDevice sections. Output devices usually consist of multiple independent components (for example, and graphics board and a monitor). These multiple components are bound together in the Screen sections, and these sections are referenced by the ServerLayout section. Each Screen section binds together a graphics board and a monitor. The graphics boards are described in the Device sections, and the monitors are described in the Monitor sections.
The following are noteworthy syntax-related items:
Configuration file keywords are case-insensitive, and “_” characters are ignored. Most strings (including Option names) are also case-insensitive and insensitive to white space and “_” characters.
Each configuration file entry is usually a single line in the file. An entry consist of a keyword, which is possibly followed by one or more arguments. The number of arguments and their types depend on the keyword. The following are the argument types:
| Integer | An integer number in decimal, hex or octal | |
| Real | A floating point number | |
| String | A string enclosed in double quote marks (“) |
Note that hex integer values must be prefixed with “0x”, and octal values with “0”.
A special keyword called Option may be used to provide free-form data to various components of the server. The Option keyword takes either one or two string arguments. The first is the option name, and the optional second argument is the option value. Some commonly used option value types include the following:
| Integer | An integer number in decimal, hex or octal | |
| Real | A floating point number | |
| String | A sequence of characters | |
| Boolean | A boolean value | |
| Frequency | A frequency value |
Note that all Option values, not just strings, must be enclosed in quotes.
Boolean options may optionally have a value specified. When no value is specified, the option's value is TRUE. The following boolean option values are recognized as TRUE:
1, on, true, yes |
The following boolean option values are recognized as FALSE:
0, off, false, no |
If an option name is prefixed with “No”, then the option value is negated.
For example, the following option entries are equivalent:
Option “Accel” “Off” Option “NoAccel” Option “NoAccel” “On” Option “Accel” “false” Option “Accel” “no” |
Frequency option values consist of a real number that is optionally followed by one of the following frequency units:
Hz, k, kHz, M, MHz |
When the unit name is omitted, the correct units will be determined from the value and the expected range of the value. When using frequency option values, specify the units to avoid any errors in a system-derived value.
A server layout is the top-level description and represents the binding of one or more screens (Screen sections) and one or more input devices (InputDevice sections) to form a complete configuration. In multipipe configurations, it also specifies the relative layout of the heads. For example, it can indicate that the four available screens should be arranged in a 2x2 grid. Multiple ServerLayout sections may be present, but only one of them will be active within a session. A specific ServerLayout section can be explicitly specified from the X server command using the –layout option. If no such option is specified, it is assumed that the system has only one screen, and the first available Screen section will be used together with two active (core) input devices. Each Screen line specifies a Screen section identifier, and optionally, its relative position to other screens. For example, the following shows how a two-pipe system could be described:
Section “ServerLayout”
Identifier “Layout 1” Unique identifier
Screen “Screen SG-1”
Screen “Screen SG-2” RightOf “Screen SG-1”
InputDevice “Keyboard 1” “CoreKeyboard” Do not change.
InputDevice “Mouse 1” “CorePointer” Do not change.
InputDevice “Mouse 2” “SendCoreEvents” Do not change.
EndSection
|
For format details, see the XF86Config(5) man page.
The Screen section groups multiple components required to display graphical output. It allows you to select combinations of the monitor, resolution (modeline), graphics card, and bit depth that you require as shown in the following example:
Section “Screen” Identifier “Screen SG-0” Identifies Screen in ServerLayout section. Device “SGI SG-0” References the graphics board for this Screen. Monitor “Generic Monitor” References monitor used by the Screen. DefaultDepth 24 SubSection Depth 24 Modes “1280x1024” EndSubSection EndSection |
The Identifier tag is used by a higher-level section, typically the ServerLayout section, to refer to this particular screen. Any number of screen sections may be present. A specific screen configuration can be specified from the X server command line with the –screen option. There should be as many Screen sections within your configuration file as there are pipes, each with an unique ID.
For resolutions less than 1024x768, the X server might choose to automatically use a larger virtual screen. To prevent this, simply add keyword Virtual as shown in the following example:
SubSection
Depth 24
Modes “800x600”
Virtual 800 600 Size of the virtual desktop
EndSubSection
|
The Device section of the XFree86 configuration file describes with the driver configuration of graphics boards. Therefore, most of graphics mode configuration would take place there. A simple example of a configuration file that sets the default settings and enables full-scene antialiasing with six samples:
Section “Device”
Identifier “SGI SG-4” Identifies board in the Screen section.
Driver “fglrx” Driver name (Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “FSAAScale” “6” Place the list of options here.
EndSection
|
Naturally, each pipe will have its own Device section. The number of Device sections is arbitrary and some of them can be unreferenced, but there must be at least one. The Identifier and Device tags are required; all others are optional. The Identifier value needs to uniquely identify each graphics card (there can be no clashes).
BusId options describes the bus location of the graphics card. The following steps describe an easy way to obtain the BusID values suitable for use in the Device section:
Stop graphics.
Enter the following command:
$ /usr/X11R6/bin/XFree -logfile /dev/null -scanpci -verbose |
Restart graphics when done.
The Monitor section specifies the characteristics of your monitor(s). There will be one such section for each monitor type that can be connected to your system. A monitor description together with a device description is used to define a screen. The following illustrates a sample Monitor section.
Section “Monitor”
Identifier “GenericMonitor” Identifies monitor in Screen section.
HorizSync 30-96 Multisync (important for stereo)
VertRefresh 50-160 Multisync
Mode “640x480”
DotClock 25.175
HTimings 640 664 760 800
VTimings 480 491 493 525
EndMode
ModeLine “1024x768i” 45 1024 1048 1208 1264 768 776 784 817
Interlace
EndSection
|
The HorizSync value specifies the horizontal sync frequencies in kHz. This can be a range of values (as shown in the preceding example) or a comma-separated list enumerating valid settings. Your monitor manual should list these settings in the technical specifications section of the user's manual. Handle the VertRefresh value in a parallel manner.
Modelines are used to describe timings/resolution of a particular output device. They are defined in the Monitor section and used in the Screen section.
The format of a modeline is as follows:
ModeLine “format-name” dot-clock-in-MHz H-active-end H-front-porch-end H-sync-end
V-active-end V-front-porch-end V-sync-end options
|
The horizontal values are specified in pixels and the vertical values are specified in lines. The dot clock value is calculated by multiplying the total pixels by the total lines and the vertical refresh frequency. For example, for 1280x1024 format, you may use the following specification:
ModeLine “1280x1024” 108 1280 1328 1440 1688 1024 1025 1028 1066 +hsync
+vsync
|
The dot clock value is set to 108 MHz (1688*1066*60 = 107964480, which is rounded to 108 MHz). Therefore, the actual refresh rate will be 60.02 Hz.
| Note: Systems running IRIX 6.5.22 or 6.5.23 should have SGI patch 5448 or greater. |
Onyx4 systems require a number of system-specific configuration settings. The following sections describe step-by-step instructions on how to configure your system to enable a specific feature. It is possible to combine some configuration settings together. For example, you can instruct your system to enable both stereo and full-scene antialiasing. The following topics are described:
To configure your pipes for stereo display, use the following procedure:
Create a stereo-specific configuration file as shown in the following:
$ cp /etc/X11/XF86Config-4 XF86Config-4.Stereo |
Modify the Device section in file XF86Config-4.Stereo for each pipe as shown in the following:
Section “Device”
Identifier “SGI SG-4” Identifies board in the Screen section.
Driver “fglrx” Driver name (Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “Stereo” “1”
Option “StereoSyncEnable” “1”
EndSection
|
Other relevant options include the following:
Option “MonitorLayout” layout |
The value layout can be one of the following:
| “CRT, CRT” | All analog | |
| “TMDS, NONE” | Digital for the first channel, analog for the second | |
| “CRT, NONE” | Analog for the first channel, disabled for the second |
Note that it is not possible to configure “TMDS” for the second channel.
Add stereo modelines to the Monitor section as shown in the following:
Section “Monitor”
Identifier “Stereo Monitor” Monitor in Screen section
HorizSync 30-96 Multisync (important for stereo)
VertRefresh 50-160 Multisync
Modeline “1024x768@96” 103.5 1024 1050 1154 1336 768 771 774 807
Modeline “1280x1024@96” 163.28 1280 1300 1460 1600 1024 1027
1033 1063
Modeline “1024x768@100” 113.309 1024 1096 1208 1392 768 769 772
814
Modeline “1024x768@120” 139.054 1024 1104 1216 1408 768 769 772
823 +hsync + vsync
Modeline “1280x1024@100” 190.960 1280 1376 1520 1760 1024 1025
1028 1085 +hsync +vsync
Mode “1280x1024_96s_mirage”
DotClock 152.928
Htimings 1280 1330 1390 1500
Vtimings 1024 1026 1030 1062
EndMode
EndSection
|
Make sure your monitor supports the high horizontal rate and modify HorizSync value in the Monitor section as follows:
HorizSync 22-105 |
As shown in the following, modify your Screen section to use one of the newly created modelines:
Section “Screen”
Identifier “Screen SG-0” The screen in ServerLayout section
Device “SGI SG-0” References graphics board for screen.
Monitor “Stereo Monitor” References monitor used by screen.
DefaultDepth 24
SubSection
Depth 24
Modes “1280x1024”
Modes “1280x1024@96”
EndSubSection
EndSection
|
Create a file named /var/X11/xdm/Xservers.Stereo and put the following entry in it:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.Stereo |
Edit /var/X11/xdm/xdm-config and change DisplayManager.servers to /var/X11/xdm/Xservers.Stereo
Restart graphics to put the changes into effect.
Run an application that uses stereo.
Even after you configure the stereo correctly, there is not going to be a stereo sync signal until you run an application that actually uses stereo. For example, you can enter the following command to run such an application:
$ ivview /usr/share/data/models/X29.iv |
Right click and activate stereo on the preferences pane.
If your changes did not take effect, try moving this file.
The modeline/resolution can be overridden by the /var/X11/Xvc/SG2_N_TimingTable, which is created by xsetmon, where N is the pipe number.
To configure a Mirage projector, use the same instructions described in the section “Configuring Pipes for Stereo”, but use the following modeline:
Mode “1280x1024_96s_mirage”
DotClock 152.928
Htimings 1280 1330 1390 1500
Vtimings 1024 1026 1030 1062
EndMode
|
There are two possible modes or full-scene antialiasing (FSAA) for Onyx4 systems:
Have the system to force all applications to use FSAA.
Allow the application to request a visual that has multisample buffers.
Setting the option “FSAAScale” to 1 enables visuals with multisample buffers. Setting the option “FSAAScale” to 2, 4, or 6 forces all window to have either 2,4, or 6 sample antialiasing, respectively.
To enable full-scene antialiasing, use the following steps:
Make an antialiasing version of the configuration file as follows:
$ cp /etc/X11/XF86Config-4 XF86Config-4.AA |
Modify the Device section in file XF86Config-4.AA for each pipe as follows:
Section “Device”
Identifier “SGI SG-4” Identifies the board in Screen section.
Driver “fglrx” Driver name (Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “FSAAScale” “2” Allowable values: 1, 2, 4, or 6
EndSection
|
Other relevant options include the following:
Option “FSAADisableGamma” “yes” number Option “FSAACustomizeMSpos” “yes” number Option “FSAAMSPOSX0” ... |
Create a file named /var/X11/xdm/Xservers.AA and put the following line in it:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.AA |
Edit /var/X11/xdm/xdm-config and change DisplayManager.servers to /var/X11/xdm/Xservers.AA.
Restart graphics to put the changes into effect.
To enable overlay planes, use the following steps:
Make an overlay planes version of the configuration file as follows:
$ cp /etc/X11/XF86Config-4 XF86Config-4.OP |
Modify the Device section in file XF86Config-4.OP for each pipe as follows:
Section “Device”
Identifier “SGI SG-4” Identifies the board in Screen section.
Driver “fglrx” Driver name (Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “OpenGLOverlay” “On”
EndSection
|
Create a file named /var/X11/xdm/Xservers.OP and put the following entry in it:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.OP |
Edit /var/X11/xdm/xdm-config and change DisplayManager.servers to /var/X11/xdm/Xservers.OP.
Restart graphics to put the changes into effect.
The following steps describe how to configure dual channels:
Create a dual-channel version of the configuration file as follows:
$ cp /etc/X11/XF86Config-4 XF86Config-4.DC |
Modify the Device section in file XF86Config-4.DC for each pipe as follows:
Section “Device”
Identifier “SGI SG-4” Identifies the board in Screen section.
Driver “fglrx” Driver name;(Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “DesktopSetup” mode
EndSection
|
The mode value can be one of the following:
| “0x00000100” | Clone the managed area. | |
| “0x00000200” | Scale the managed area by 2 horizontally. | |
| “0x00000300” | Scale the managed area by 2 vertically. |
Note that the same mode must be specified for all the pipes managed by a particular X server. Both channels will have the same display resolution.
Also, note that only the first channel is capable of digital (TMDS) output; the second channel has analog output only. To configure analog output for both channels, append the following entry in the Device section:
Option “MonitorLayout” “CRT, CRT” |
When using monitor cables that do not conform to the VESA Display Data Channel (DDC) standard, append the following entry in the Device section to allow for proper display configuration:
Option “NoDDC” |
Create a file named /var/X11/xdm/Xservers.DC and put the following entry in it:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.DC |
Edit /var/X11/xdm/xdm-config and change DisplayManager.servers to /var/X11/xdm/Xservers.DC.
Restart graphics to put the changes into effect.
The following steps describe how to configure edge blending or channel (screen) overlapping:
Configure dual channels, as described in a preceding section, before attempting to configure screen/channel overlapping.
Your total managed area would be the sum of the width of both channels minus the number of pixels specified in the overlap option.
Make a channel-overlap version of the configuration file as follows:
$ cp /etc/X11/XF86Config-4 XF86Config-4.CO |
Modify the Device section in file XF86Config-4.CO for each pipe to contain the following:
Section “Device”
Identifier “SGI SG-4” Identifies the board in Screen Section.
Driver “fglrx” Driver name (Do not change.)
BusId “PCI:2:4:0” Bus location of the graphics card
Option “DesktopSetup” “0x00000200”
Option “ScreenOverlap” 256 The number of pixels of overlap
EndSection
|
Restart graphics.
To configure a multiuser environment, multiple keyboards/mice and multiple X servers, perform the following steps:
Make a backup copy of /etc/ioconfig.conf and then edit the original file to remove all keyboard and mouse entries.
Attach all the intended keyboards and mice (PS2 devices may require a reboot), then enter the following command:
$ /sbin/ioconfig -f /hw |
Verify that the links were created in /dev/input.
In /etc/X11, make multiple copies of XF86Config-4 named XF86Config-4.serverN, where N refers to each server, starting with 0.
Edit each XF86Config-4.serverN file and change the following line in the InputDevice section:
Option “Device” “/dev/mouse” |
For XF86Config-4.server0, change the line to the following:
Option “Device” “/dev/input/mouse” |
For the other XF86Config-4.serverN files, change the line to the following:
Option “Device” “/dev/inputN/mouse”
For each of the XF86-4.serverN files , edit the Device, Screen, and ServerLayout sections to reflect the pipes that are to be managed by a particular server.
Create a file named /var/X11/xdm/Xservers.Nkey and add the following entries, one for each of the servers:
:0 secure /usr/bin/X11/X :0 -xf86config /etc/X11/XF86Config-4.server0 -devdir /dev/input :1 secure /usr/bin/X11/X :1 -xf86config /etc/X11/XF86Config-4.server1 -devdir /dev/input1 |
...
Edit /var/X11/xdm/xdm-config and change the DisplayManager.servers setting to /var/X11/xdm/Xservers.Nkey
Restart graphics or, to be on the safe side, reboot.
Perform the following general steps to configure the ImageSync IS1 card:
Physically connect the card to the proper components of the system.
The following manual describes this procedure:
SGI Onyx Next Generation Scalable Graphics Platform User's Guide
Install the Onyx4 patches for your OS level.
Enable SwapReady.
See the subsection Enabling SwapReady.
Enable FrameLock.
See the subsection Enabling FrameLock.
Enabling SwapReady
Use the xsetmon GUI to enable SwapReady in each X screen (pipe) connected to the IS1 board. Perform the following steps:
Open a winterm window on the X screen 0 desktop, then use the –target option to point to the X screen that you want xsetmon to configure while using –display to indicate where you want the GUI to appear. For example, in order to configure pipe 1 from pipe 0 use the following entry:
$ xsetmon -target :0.1 -display :0.0 |
Using the xsetmon GUI, set the following options:
Swap Buffers on Vertical Blank: On GLX Swap Barrier Extension: On |
Click Load button to save the configuration.
Repeat steps 1-3 for each pipe connected to the IS1 board.
Enabling FrameLock
If an application uses an API such as OpenGL Performer, then you can force each pipe to begin a new frame of video output on the vertical sync pulse that the IS1 board outputs. Use the following procedure to configure your system for this kind of operation:
If the application uses a startup script like RUN, use a text editor to set the following environment variable in the script:
setenv __GL_SYNC_TO_BLANK 1 setenv PFVIDEORATE vertical_refresh_rate |
The vertical_refresh_rate value corresponds to the value of your current video format in Hz (for example, 60, 72, and so on).
Start the application.
If you want the pipe outputs to frame-lock regardless of whether an ImageSync-aware application is running (for example, compositor configurations), you can open a winterm window on each X screen and set the variables shown in step 1 in every pipe, or else, add them to a .xsession file to enable ImageSync automatically when a user logs in.
To enable sync on the compositor, use the sgcombine GUI.
The following are preconditions for compositor configuration:
The ImageSync card must be wired and configured.
You must have version 1.5 of the compositor.
Both the DVI and USB ports must be wired.
The latest patch list must be installed.
Use the following procedure to configure four compositors with two pipes each:
Edit the Device section as follows if you want to use an analog monitor on Head 1:
Option “MonitorLayout” “TMDS, CRT” Option “DesktopSetup” “0x00000100” |
Add compositor modelines to the Monitor section as shown in the following:
Stereo Modeline for the Compositor
ModeLine “1280x1024_96” 164.966 1280 1300 1460 1600 1024 1026 1029
1074
|
Mono Modeline for the Compositor (1280x1024)
ModeLine “1280x1024” 108 1280 1328 1440 1688 1024 1025 1028 1066
-hsync -vsync
|
Modeline for the Compositor (1600x1200)
ModeLine “1600x1200_60” 161.5356 1600 1664 1856 2160 1200 1201 1204
1250 -hsync -vsync
|
Modify the Screen section so that you can use the correct modeline. The following is an example:
Modes “1280x1024@60” |
As shown in the following entries, load the .cmb, previously created with /usr/gfx/sgcombine, and send it to the compositors with setmon:
/usr/gfx/setmon -p 0 -S /usr/gfx/ucode/STINGRAY/my_1280_1024_60_2_tiles /usr/gfx/setmon -p 2 -S /usr/gfx/ucode/STINGRAY/my_1280_1024_60_2_tiles /usr/gfx/setmon -p 4 -S /usr/gfx/ucode/STINGRAY/my_1280_1024_60_2_tiles /usr/gfx/setmon -p 6 -S /usr/gfx/ucode/STINGRAY/my_1280_1024_60_2_tiles |
Alternatively, you can use sgcombine to indicate which screen to configure and where to display the GUI, respectively, as shown in the following:
/usr/gfx/sgcombine –target #xserver.screen -display #xserver.screen |
Restart graphics to put the changes into effect.
The following is a sample Monitor section for an IBM T221 9-Megapixel monitor:
Section “Monitor”
Identifier “Bertha”
VendorName “IBM”
ModelName “T221”
HorizSync 22-105
VertRefresh 9-64
# Modeline description: pxlclk Hres Hfp Hsnc Htot Vres Vfp Vsnc Vtot
# 1/2 screen 1920x1200
Modeline “960x1200_56” 70.98 960 968 1000 1056 1200 1200 1202 1206
Modeline “960x1200_64” 82.00 960 968 1000 1056 1200 1201 1203 1212
# 1/4 screen 3840x2400
Modeline “960x1200_56” 104.78 960 968 1000 1056 2400 2402 2404 2424
# full screen 1920x1200 or ż screen 3840x2400
Modeline “1920x1200_41” 104.78 1920 1928 1960 2112 1200 1201 1203
1212
# 1/2 screen 3840x2400
Modeline “1920x2400_20” 99.54 1920 1928 1980 2044 2400 2402 2405
2435
Modeline “1920x2400_24” 119.40 1920 1928 1980 2044 2400 2402 2405
2435
Modeline “1920x2400_25” 125.02 1920 1928 1980 2044 2400 2402 2405
2434
Modeline “1920x2400_30” 149.31 1920 1928 1980 2044 2400 2402 2405
2435
# stuff from EDID, 3840x2400 at 12.7 Hz
Modeline “3840x2400” 148.00 3840 3944 4328 4816 2400 2401 2404 2418
EndSection
|
The following procedure describes how you add or remove pipes:
Stop graphics.
Make a backup configuration file as shown in the following:
$ mv /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.bak |
Use chkconfig to make sure that xf86config_autoconfig is on and cf86config_autoreplace id is off.
Generate a new configuration file as follows:
$ /etc/x11/gen-XF86Config |
Start the graphics using the newly generated XF86Config-4 file to configure the X server.