Configuring Xinerama on the Solaris OS
Introduction
This guide shows how to configure Xinerama on the Solaris OS for x86 platforms, and it can also be used to configure multihead functionality on x86 systems running the Solaris OS.
Xinerama is an extension to the X Window System, and it provides the user with more screen real estate. Rather than just setting multiple displays in the /etc/X11/xorg.conf
file, Xinerama allows the user to move windows between displays, expand window size to multiple displays, and cut and paste between displays. This also allows a user to see more in the image being displayed. Effectively the resolution is increased to the sum of the resolutions of the displays.
Setup Procedures
1. Preparation
The Solaris OS for x86 platforms provides two X servers, Xsun and Xorg. The default X server on the x86 platform is Xorg; therefore, the focus here is on configuring Xinerama with Xorg. Before you start configuring Xinerama on the Solaris OS for x86 platforms, you need to configure Xorg with a single video card first. If you are unfamiliar with how to configure a video card with Xorg on the Solaris 10 OS, please reference kdmconfig(1M)
and xorgconfig(1)
in advance.
2. Install Patch
Before configuring Xinerama on the Solaris OS for x86 platforms, you need to add a patch to make Xinerama work properly with Xorg. The patch is to solve a bug that makes the Xinerama extension protocols in Xsun and Xorg incompatible with each other. This bug causes the Sun Java Desktop System and CDE desktop environments for the Solaris OS to crash on startup when they are run on an Xorg server with the Xinerama configuration. (Since these desktop applications expect Xsun protocol, but Xorg protocol is used, they exit and return to the login screen.)
Here are the patches for the Solaris 9 and 10 releases (available from SunSolve):
- 112786-41 or higher (for Solaris 9 OS for x86 platforms)
- 119060-04 or higher (for Solaris 10 OS for x86 platforms)
3. Manually Add Another Video Card
To configure Xinerama, you need to add another video card first. On the Solaris OS for x86 platforms, this depends on editing the Xorg configuration file /etc/X11/xorg.conf
. The detailed steps follow:
3.1 Back up the current working Xorg configuration file by doing the following:
root# > cp /etc/X11/xorg.conf /etc/X11/xorg.conf.working
3.2 Identify the model of the second video card.
To find out the video card model, you need to run the Xorg command. To run the command without the X server running, exit the current desktop and log in from the command line, or just reboot the machine in single-user mode. To log in with the command line, do the following:
a. Log out from the current desktop environment and return to the login screen.
b. In the login screen, click the button Options -> Command line login. This will bring you to the console login interface.
c. Log in from the console as root. Then you can use the following command to get the video card type:
root# > /usr/X11/bin/Xorg -scanpci
Xorg will output the information for each device on your PCI bus, including your video card. In this case, the output is as follows. (Note: Lines of output are broken at "\" for readability.)
Probing for PCI devices (Bus:Device:Function)
(0:0:0) unknown card (0x8086/0x2570) using a Intel Corp. 82865G/PE/P Processor to I/O Controller
(0:2:0) unknown card (0x1014/0x02c7) using a Intel Corp. 82865G Integrated Graphics Device
....
(0:30:0) Intel Corp. 82801BA/CA/DB/EB PCI Bridge
(0:31:0) Intel Corp. 82801EB LPC Interface Controller
(0:31:1) unknown card (0x1014/0x02c7) using a Intel Corp. 82801EB Ultra ATA Storage Controller
(0:31:3) unknown card (0x1014/0x02c7) using a Intel Corp. 82801EB SMBus Controller
(0:31:5) unknown card (0x1014/0x02c7) using a Intel Corp. 82801EB AC'97 Audio Controller
(3:2:0) nVidia Corporation NV17 [GeForce4 MX 440]
(3:8:0) unknown card (0x1014/0x02c7) using an unknown chip (DeviceId 0x1050) from Intel Corp.
You can see that two video cards are found in the machine (see the second and second-to-last lines of the output shown). One is an onboard integrated video card Intel i810 (0:2:0), and the other is an nVidia Geforce 4 MX 440 (3:2:0). In your case, you need to find your video cards and write down the device numbers (Bus:Device:Function
) associated with them. You will need the number to specify the video card in the Xorg configuration file in the following steps.
3.3 Edit the xorg.conf
File
Open your current xorg.conf
file and find the Monitor Section. You can copy the following sections from the Xorg backup file (xorg.conf.working
): Monitor, Device, and Screen. As you copy each section, make certain that the identifier is unique for each section. You will reference these identifiers later.
You should now have a Monitor Section, a Device Section, and a Screen Section for each video card/monitor combination. Each section should have a unique identifier.
Now you need to add the corresponding PCI BusID as an option at the end of each Device Section. The entry should look like this: BusID "PCI:3:2:0"
, substituting the three numbers with the PCI bus ID that identifies your video card. You should have this ID from the Xorg -pci
output. Here is a sample Device Section for one video card.
Section "Device"
Identifier "nVidia"
Driver "nv"
BusID "PCI:3:2:0"
EndSection
3.4 Configuring the Server Layout
Now you need to edit the ServerLayout Section at the end of the XF86Config file. The ServerLayout Section includes exactly what screens to use, how to lay them out logically, and what input devices to assign to them. Your current layout is for one screen, a keyboard, and a mouse. You need a reference in this section for each screen section you have created, so that the screen sections will appear in your display.
Using the existing screen reference as a starting point, create additional references for your other screen sections. The reference looks like this:
Screen "Screen 2" Relationship "Screen 1"
This reference defines the relationship between "Screen 2"
and "Screen 1"
. Valid relationships include RightOf
, Below
, Above
, LeftOf
, Absolute X Y
, and Relative
. Use of the first four relationships is pretty obvious as illustrated in this sample:
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 2"
Screen "Screen 1" RightOf "Screen 2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
4. Add Xinerama Flag
It's time to have Xorg start up with the Xinerama extensions, adding an option in the ServerFlags Section as follows:
Section "ServerFlags"
Option "Xinerama" "true"
EndSection
Xinerama should now work after you start Xorg.
5. Sample xorg.conf
File
(Note: Most comments have been removed.)
The following is a working Xorg configuration file for your reference.
# File generated by xorgconfig.
# **********************************************************************
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
Section "Module"
Load "dbe" # Double buffer extension
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
# This loads the font modules
Load "bitstream"
Load "type1"
# This loads the Xst module
Load "Xst"
# This loads the SolarisIA module
Load "IA"
EndSection
# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
RgbPath "/usr/X11/lib/X11/rgb"
FontPath "/usr/X11/lib/X11/fonts/TrueType/"
FontPath "/usr/X11/lib/X11/fonts/Type1/"
FontPath "/usr/X11/lib/X11/fonts/Type1/sun/"
FontPath "/usr/X11/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/X11/lib/X11/fonts/misc/"
FontPath "/usr/X11/lib/X11/fonts/100dpi/"
FontPath "/usr/X11/lib/X11/fonts/75dpi/"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
Option "Xinerama" "true"
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
Section "InputDevice"
Identifier "Keyboard1"
Driver "Keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc101"
Option "XkbLayout" "us"
EndSection
# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Auto"
Option "Device" "/dev/mouse"
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
Section "Monitor"
Identifier "Monitor1"
HorizSync 31.5 - 48.5
VertRefresh 50-70
EndSection
Section "Monitor"
Identifier "Monitor2"
HorizSync 31.5 - 48.5
VertRefresh 50-70
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
# Device configured by xorgconfig:
Section "Device"
Identifier "intel"
Driver "i810"
BusID "PCI:0:2:0"
#VideoRam 32768
# Insert Clocks lines here if appropriate
EndSection
Section "Device"
Identifier "nVidia"
Driver "nv"
BusID "PCI:3:2:0"
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
Section "Screen"
Identifier "Screen 1"
Device "intel"
Monitor "Monitor1"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "Screen 2"
Device "nVidia"
Monitor "Monitor2"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubsection
EndSection
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 2"
Screen "Screen 1" RightOf "Screen 2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
0 Comments:
Post a Comment
<< Home