Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ColorFunction on a linux system (xorg) loses graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102826] Re: ColorFunction on a linux system (xorg) loses graphics
  • From: anguzman at ing.uchile.cl
  • Date: Fri, 28 Aug 2009 00:46:52 -0400 (EDT)

Hello All:
This is an old thread (May 2009). I came across this discussion 
searching in the Internet about this issue. I have exactly the same 
problem as described by Curtis Osterhoudt below and I found a (patch) 
solution that I think at least should be documented. I have 
Mathematica 6.0.1 with Opensuse 11 and none of the solutions I found 
on the web worked for me (the uxa accelerator and XLIB thing...).
The only thing that (has) worked was removing the definition of the
$LD_LIBRARY_PATH variable.

in bash:
bash:~>  export LD_LIBRARY_PATH=""
bash:~>  mathematica &

and everything works, the 3d graphics included, rotating them at usual 
speed and the example shown below as well etc..
before doing this, and when  mathematica was failing in displaying 3d 
graphics for example, it also printed in the shell messages like:

X Error of failed request:  GLXBadContext
   Major opcode of failed request:  159 (GLX)
   Minor opcode of failed request:  5 (X_GLXMakeCurrent)
   Serial number of failed request:  83543
   Current serial number in output stream:  83543


Im not a Linux expert, and I havent found a cleaner solution yet

Atte. Andres Guzman


Curtis Osterhoudt schrieb:
> Dear all,    I've been having a frustrating time with plotting 
> things on a compositing (for example, KDE 4.2) system, so turned the 
> compositing off. To my surprise, I still can't get graphics to show 
> up correctly. This is using Mathematica 7.0.0 on any recent linux 
> kernel, on KDE or XFCE, or Enlightenment.
>
>    Any 3D plot (a simple Plot3D) will work, but I can see the output 
> *only* when rotating it with the mouse. Once the rotation/resize is 
> done, the graphics show up as white-on-white again. When saving such 
> output, .PDF works, but anything raster based (like jpg) gives only 
> the white output.    To my further surprise, any graphics expression 
> (even those in the Help documentation) which uses a ColorFunction 
> statement don't show up either, whether they're 2D or 3D. For 
> example, the following (taken right from the documentation) gives 
> only a blank output:
>
> Plot[Sinc[x], {x, 0, 10}, PlotStyle -> Thick,  ColorFunction -> 
> Function[{x, y}, ColorData["NeonColors"][y]]]
>
>   Now, it may be a peculiarity of my graphics setup, but no other 
> programs are giving me any problems.
>
>   Is there any advice for things I can try? I'd like to keep my 
> gee-whiz graphics setup if possible, but if it's not possible, I'll 
> change things to accomodate Mathematica.
>
>
>





Dear all,

I had the same problem (running on Archlinux with Intel graphics).
Consulting my good friend google I found this discussion:

     http://ubuntuforums.org/archive/index.php/t-1136142.html

the trick that helped me is to add

     Option "AccelMethod" "uxa"

into the Device section of your /etc/X11/xorg.conf. Now I cen see the
output of Plot3D and also output of Curtis's example (which I did not
get prior the edit of xorg.conf). On the other hand, the rotation of
3D graphic in Mathematica works strange now - but this does not
trouble me much.

To conclude, it seems to me like problem with new x.org server (guys
in the discussion above have ATI graphic cards, so I guess it is not a
driver problem...). Looks like we have to wait for new version of
Mathematica...

On May 12, 9:08 am, Curtis Osterhoudt <c... at lanl.gov> wrote:
> Hi, Peter.
>
>    Thanks for that reply. I somehow didn't think to try the XLIB flag=
  again, as I thought that issue had been fixed in the later Mathematica bui=
=
lds (used to use it all the time). In any case, it doesn't seem to work for=
=
  me (3D plots still disappear except upon rotation, and ColorFunctions stil=
=
l cause blank output). As you say, it might be the opensource driver. AMD/A=
=
TI are having such problems that they no longer provide any new proprietary=
=
  drivers for their older cards -- it's causing headaches in the community, =
=
obviously.
>    When I try the XLIB... export, Mathematica shows many "holes" in t=
he Plot3D graphs, and the rotations are much slower and jerkier than usual.=
=
  I guess I'll just live with the state of things as they are now, until Mat=
=
hematica learns to work with the drivers, or the driver writers can agree o=
=
n a unified front (ha!).
>
>        Thanks again!
>                      Curtis O.
>
> On Monday 11 May 2009 04:26:07 am Peter Pein wrote:
>
>
>
> > Peter Pein schrieb:
> > > Hi Curtis,
> > > on an Ubuntu system I use a script, which calls Mathematica with para=
=
meters
> > > which let me use the mouse-wheel and the NumLock-key. Additionally it=
=
  sets the
> > > environment variable XLIB_SKIP_ARGB_VISUALS to 1, which removed probl=
=
ems
> > > similar to the one you describe. Maybe it is worth a try (the little =
=
utility
> > > "imwheel" has to be installed):
>
> > > petsie@leierkasten:~$ cat run-math
> > > #!/bin/sh
>
> > > # run-math.sh version 4
> > > # `-r' flag means don't use the "Configurator"
> > > # and pass wheel events to the root window
> > > #
> > > # Ensure a single instance of Mathematica with
> > > # the option `-singleLaunch'.
> > > # Allow the use of the NumLock key with the
> > > # '-primaryModifierMask' and '-secondaryModifierMask'
> > > # switches.
>
> > > MARGS="-singleLaunch -primaryModifierMask Mod1Mask -secondaryModifi=
=
erMask
> > > Mod3Mask"
>
> > > if `ps -C imwheel > /dev/null`; then
> > >    XLIB_SKIP_ARGB_VISUALS=1 Mathematica $1 $MARGS
> > > else
> > >    imwheel -r
> > >    XLIB_SKIP_ARGB_VISUALS=1 Mathematica $1 $MARGS
> > >    imwheel -kq
> > > fi
>
> > Oops... this works with the proprietary drivers for an ATI Mobility 347=
=

> > graphics card on a laptop, but not with the opensource radeon driver on=
=
  a
> > desktop workstation with a HIS x1050 graphic card??
> > Must be a bug in the OSS-Radeon-driver.
> > B.t.w.: compiz is installed on both computers.
> > Peter
>
> --
> =========================
=
==========
> Curtis Osterhoudt
> cfo at remove_this.lanl.and_this.gov
> PGP Key ID: 0x4DCA2A10
> =========================
=
==========



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



  • Prev by Date: Re: Problems with functions of a Complex Variable
  • Next by Date: Re: InverseFunction of a CDF
  • Previous by thread: Re: Re: Eigenvalues broken?
  • Next by thread: random variable