X
14929

Software Rendering and Xinerama configuration in Linux.

Topic

IDL 8.x graphic routines under the IDL Workbench in Software Rendering mode may fail on Linux machines if the display is local and Xinerama is not enabled. This problem is not encountered when using the command line, runtime or Virtual Machine execution modes of IDL.

The Xinerama extension allows the use of dual monitors that are treated as a single display, or in other words, enables multi-headed X applications.

We have found that in certain flavors of Linux, Software Rendering fails in IDL 8.0 when trying to execute graphic routines, such as:

IDL>x=plot(/test)

The graphical window becomes unusable with the following error message visible in the IDL console:

% Loaded DLM: XML
% IDLITWINDOW::ONEXPOSE: Failure to acquire window rendering context
% Unable to acquire device context.
% Execution halted at: $MAIN$


Activating Xinerama capabilities in Red Hat systems (including CentOS 4.8 and 5.x), fixes the problem (see the Discussion section below). Though this solution may not work for Debian systems (like Ubuntu 9.x and 10.04, etc), or Fedora systems (12 and 13 for example) and OpenSUSE 11.2, as describe below.

Discussion

The following information might help you resolve some software rendering issues in different flavors of Linux. We have found this to be a solution for Red Hat and CentOS systems, but because of unique hardware and software configurations on individual machines we cannot guarantee this solution on these and other operating systems.

Red Hat and CentOS

The solution or workaround available for these kind of systems is to enable Xinerama. This is done by modifying the Xorg configuration file in the following way.

Note: If you are not familiar or comfortable with low level configuration of the Linux display management system, we suggest that you contact an expert system administrator to assist you with system changes like this.

Editing xorg.conf

The file xorg.conf is used to configure the X.Org Server. In systems like Red Hat 5.x and CentOS 4.8 and CentOS 5.x this file is located in:

/etc/X11/xorg.conf

Please, edit this file using one of the text editors, like Emacs or gedit, by modifiying the ServerLayout section of the file. The following is an example:

 

Section "ServerLayout"
    Identifier "Multihead layout"
    Screen 0 "Screen0" LeftOf "Screen1"
    Screen 1 "Screen1" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    Option "Xinerama" "on"
    Option "Clone" "off"
EndSection

The addition of those two highlighted lines above will enable Xinerama in those Linux systems. After editing the xorg.conf file the X server will need to be re-started. This can be done in two ways:

  1. Restarting the system
  2. Restarting the X server only

The second option can be done by changing the "runlevel" of the system. From a Linux prompt simple execute:

/sbin/telinit 1

This will change the runlevel to 1, i.e. the single user Linux command line runlevel. Then, you can restart the X server by executing the command:

/sbin/telinit 5

This runlevel will restart the X server. Therefore, the new xorg.conf file will be read. Any graphic routine or function executed in IDL Workbench will now work in Software Rendering too.


Fedora, Ubuntu and OpenSUSE

Under these systems, that includes: Fedora 12 and 13, Ubuntu 9.04, 9.10 and 10.04, and OpenSUSE 11.2, the activation of Xinerama using the xorg.conf file will not fix the Software Rendering problem, and it's not recommended because it may cause additional problems. This is due to the fact that these systems are newer than those described in the previous section, and therefore, they may not use xorg.conf as the configuration file at all. An entry in Wikipedia (http://en.wikipedia.org/wiki/Xorg.conf) mentions that:

"For a long time, editing xorg.conf was necessary for advanced input devices and multiple monitor output to work correctly. This was regarded to be a major usability obstacle. In modern systems this is seldom necessary, thanks to input hotplugging and the XRandR extension integrated into new X.org releases. It is still needed for devices from some manufacturers, notably NVIDIA and Wacom, whose drivers fail to provide support for those technologies. This also cause confusion or even problems when changing an option that is no longer an explicit entry is required." [7 June 2010]

For example, enabling Xinerama within an xorg.conf file in Fedora 13 (http://fedoraproject.org/wiki/How_to_create_xorg.conf) will produce the following error message when any graphical application is executed, including the IDL Workbench:

Xlib: extension "RANDR" missing on display ":0.0"

The solution in these cases (i.e. when using these open source systems), is to make use of the Command Line IDL when users need to use Sotfware Rendering in their workflow.