Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion

Bug #153045 reported by Sparrow
10
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: compiz-core

1) When the desktop effects are on, running Mathematica 6.0.1 will give me two more blank windows plus a third normal window. The normal window seems to be OK, and works well. But the two blank windows are annoying.

2) When the desktop effects are on, running Matlab 2007b will give me a blank window with a "start" button at the bottom left corner. After searching the web, I found that someone suggested "export AWT_TOOLKIT=MToolkit" before running Matlab. This method however does not work: Matlab crashes and I got the error:

Unable to initialize com.mathworks.mwswing.MJStartup
java.lang.UnsatisfiedLinkError: Can't load library: /opt/matlab/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/motif12/libmawt.so
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
        at javax.swing.ImageIcon.<clinit>(Unknown Source)
        at com.mathworks.mwswing.desk.Desktop.<clinit>(Desktop.java:103)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.mathworks.jmi.OpaqueJavaInterface.findClass(OpaqueJavaInterface.java:470)
 Failed to start the Desktop: Failure loading desktop class

Revision history for this message
Sparrow (walkingsparrow) wrote :

I forgot to mention that I am using nVidia card "nVidia Corporation G80 [GeForce 8300 GS]".

Revision history for this message
Sparrow (walkingsparrow) wrote :

More comment: In another computer with ATI+Xgl, Matlab 2007b works fine with compiz-fusion. But the problem with Mathematica 6.0.1 remains. Both Mathematica 6.0.1 and Matlab 2007b use Java.

Revision history for this message
Sparrow (walkingsparrow) wrote :

More comment: In another computer with ATI+Xgl, Matlab 2007b works fine with compiz-fusion after I put "export AWT_TOOLKIT=MToolkit" in the beginning of matlab shell script. But the problem with Mathematica 6.0.1 remains. Both Mathematica 6.0.1 and Matlab 2007b use Java.

Revision history for this message
guillem (serra-guillem) wrote :

with nvidia geforce 6 series matlab with compiz-fusion also doesn't work

Revision history for this message
Rouben (rouben) wrote :

This might be a JAVA problem, rather than a compiz problem, perhaps similar to bug #151021

Either way upgrading JAVA to the latest release shouldn't hurt... then again, you never know with JAVA...

Revision history for this message
guillem (serra-guillem) wrote : Re: [Bug 153045] Re: Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion

I've solved the problem writting the trick used in feisty:
http://ubuntuforums.org/archive/index.php/t-495024.html

Thx!

2007/10/17, Rouben <email address hidden>:
>
> This might be a JAVA problem, rather than a compiz problem, perhaps
> similar to bug #151021
>
> Either way upgrading JAVA to the latest release shouldn't hurt... then
> again, you never know with JAVA...
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Rouben (rouben) wrote :

Ah, OK, so this is a Java configuration issue then. I am therefore marking this bug as invalid.

Changed in compiz:
status: New → Invalid
Revision history for this message
Sparrow (walkingsparrow) wrote :

No, this method does not work for me. I am using Matlab 2007b, and export
AWT_TOOLKIT=MToolkit will give me the following error.

Unable to initialize com.mathworks.mwswing.MJStartup
java.lang.UnsatisfiedLinkError: Can't load library:
/opt/matlab/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/motif12/libmawt.so
       at java.lang.ClassLoader.loadLibrary(Unknown Source)
       at java.lang.Runtime.load0(Unknown Source)
       at java.lang.System.load(Unknown Source)
       at java.lang.ClassLoader$NativeLibrary.load(Native Method)
       at java.lang.ClassLoader.loadLibrary0(Unknown Source)
       at java.lang.ClassLoader.loadLibrary(Unknown Source)
       at java.lang.Runtime.loadLibrary0(Unknown Source)
       at java.lang.System.loadLibrary(Unknown Source)
       at sun.security.action.LoadLibraryAction.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
       at sun.awt.DebugHelper.<clinit>(Unknown Source)
       at java.awt.Component.<clinit>(Unknown Source)
       at javax.swing.ImageIcon.<clinit>(Unknown Source)
       at com.mathworks.mwswing.desk.Desktop.<clinit>(Desktop.java:103)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at com.mathworks.jmi.OpaqueJavaInterface.findClass(
OpaqueJavaInterface.java:470)
 Failed to start the Desktop: Failure loading desktop class

On 10/17/07, Rouben <email address hidden> wrote:
>
> Ah, OK, so this is a Java configuration issue then. I am therefore
> marking this bug as invalid.
>
> ** Changed in: compiz (Ubuntu)
> Status: New => Invalid
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
cell phone: 310-210-1764
Skype: walkingsparrow
SkypeIn #: 773-782-6271
email, MSN, GTalk: <email address hidden>
email: <email address hidden>
QQ: 664232662

Revision history for this message
guillem (serra-guillem) wrote :

Sparrow,
Do you have a 64 bit processor?
So, couldn't you test it using the 32 bit java libraries?

2007/10/17, Sparrow <email address hidden>:
>
> No, this method does not work for me. I am using Matlab 2007b, and export
> AWT_TOOLKIT=MToolkit will give me the following error.
>
> Unable to initialize com.mathworks.mwswing.MJStartup
> java.lang.UnsatisfiedLinkError: Can't load library:
> /opt/matlab/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/motif12/libmawt.so
> at java.lang.ClassLoader.loadLibrary(Unknown Source)
> at java.lang.Runtime.load0(Unknown Source)
> at java.lang.System.load(Unknown Source)
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
> at java.lang.ClassLoader.loadLibrary(Unknown Source)
> at java.lang.Runtime.loadLibrary0(Unknown Source)
> at java.lang.System.loadLibrary(Unknown Source)
> at sun.security.action.LoadLibraryAction.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
> at sun.awt.DebugHelper.<clinit>(Unknown Source)
> at java.awt.Component.<clinit>(Unknown Source)
> at javax.swing.ImageIcon.<clinit>(Unknown Source)
> at com.mathworks.mwswing.desk.Desktop.<clinit>(Desktop.java:103)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at com.mathworks.jmi.OpaqueJavaInterface.findClass(
> OpaqueJavaInterface.java:470)
> Failed to start the Desktop: Failure loading desktop class
>
>
> On 10/17/07, Rouben <email address hidden> wrote:
> >
> > Ah, OK, so this is a Java configuration issue then. I am therefore
> > marking this bug as invalid.
> >
> > ** Changed in: compiz (Ubuntu)
> > Status: New => Invalid
> >
> > --
> > Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> > https://bugs.launchpad.net/bugs/153045
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
>
> --
> cell phone: 310-210-1764
> Skype: walkingsparrow
> SkypeIn #: 773-782-6271
> email, MSN, GTalk: <email address hidden>
> email: <email address hidden>
> QQ: 664232662
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Sparrow (walkingsparrow) wrote :

Yeah, my home computer is 32bit. And this method works. But it does not work
for my 64bit machine.
And the multiple-blank-window problem of Mathematica 6.0.1 still remains for
both 32bit and 64bit machines. I think something in java conflicts with
compiz-core.

On 10/18/07, guillem <email address hidden> wrote:
>
> Sparrow,
> Do you have a 64 bit processor?
> So, couldn't you test it using the 32 bit java libraries?
>
>
>

Revision history for this message
guillem (serra-guillem) wrote :

I don't have experience in java problems...Sorry if I can't help you ...
I have also a 64-bit PC but I am working with ubuntu gutsy gibbon 32 bits
(To avoid all of these problems).
Try to use the Mathematica in the 32-bit PC after adding:

"export XLIB_SKIP_ARGB_VISUALS=1"

via https://help.ubuntu.com/community/Mathematica

2007/10/18, Sparrow <email address hidden>:
>
> Yeah, my home computer is 32bit. And this method works. But it does not
> work
> for my 64bit machine.
> And the multiple-blank-window problem of Mathematica 6.0.1 still remains
> for
> both 32bit and 64bit machines. I think something in java conflicts with
> compiz-core.
>
>
> On 10/18/07, guillem <email address hidden> wrote:
> >
> > Sparrow,
> > Do you have a 64 bit processor?
> > So, couldn't you test it using the 32 bit java libraries?
> >
> >
> >
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Sparrow (walkingsparrow) wrote :

"export XLIB_SKIP_ARGB_VISUALS=1" does not help on neither 32bit nor 64bit
machines. I gues I have to wait for future upgrades of compiz-core. Right
now I just switch back to the no-desktop-effects settings.

Hai

On 10/19/07, guillem <email address hidden> wrote:
>
> I don't have experience in java problems...Sorry if I can't help you ...
> I have also a 64-bit PC but I am working with ubuntu gutsy gibbon 32 bits
> (To avoid all of these problems).
> Try to use the Mathematica in the 32-bit PC after adding:
>
> "export XLIB_SKIP_ARGB_VISUALS=1"
>
> via https://help.ubuntu.com/community/Mathematica
>
>
> 2007/10/18, Sparrow <email address hidden>:
> >
> > Yeah, my home computer is 32bit. And this method works. But it does not
> > work
> > for my 64bit machine.
> > And the multiple-blank-window problem of Mathematica 6.0.1 still remains
> > for
> > both 32bit and 64bit machines. I think something in java conflicts with
> > compiz-core.
> >
> >
> > On 10/18/07, guillem <email address hidden> wrote:
> > >
> > > Sparrow,
> > > Do you have a 64 bit processor?
> > > So, couldn't you test it using the 32 bit java libraries?
> > >
> > >
> > >
> >
> > --
> > Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> > https://bugs.launchpad.net/bugs/153045
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
cell phone: 310-210-1764
Skype: walkingsparrow
SkypeIn #: 773-782-6271
email, MSN, GTalk: <email address hidden>
email: <email address hidden>
QQ: 664232662

Revision history for this message
giacomoi (giacomoi) wrote :

I can confirm the problem. All solutions posted on the ubuntu/matlab forums don't work on Gusty-64bit.
I tried (in all possible permutations) the following:

export XLIB_SKIP_ARGB_VISUALS=1
export AWT_TOOLKIT=MToolkit

and one of:
export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre
export MATLAB_JAVA=/usr/lib/jvm/java-5-sun/jre
export MATLAB_JAVA=/usr/lib/jvm/java-7-icedtea/jre

each time updating the jre with
sudo update-alternatives --config java

I also created a symbolic link motif12->motif21 in the lib/amd64/ of each jre distribution (as suggested on the matlab forums) to get passed the first error message, but this produces a matlab segmentation fault consistently (irrespective of the jre version). To get a bit more info on the "Segmentation violation" error (as reported by MAtlab) one could try to run "matlab -nodesktop". This causes a segmentation fault, but at least you get a matlab crash dump.

Bug 151021 claims that the java/compiz problem is fixed with jdk1.6.0_02, but the lates jre1.6.0_03 seems to still have the problem...

Revision history for this message
giacomoi (giacomoi) wrote :

Sorry, I stand corrected!

If one does *not* change the AWT_TOOLKIT environment variable and uses
export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre

matlab R2007b works just fine!

Revision history for this message
Sparrow (walkingsparrow) wrote :

Thank you. It works! But what about the multi-blank-window problem of
Mathematica 6.0.1?

On 10/20/07, giacomoi <email address hidden> wrote:
>
> Sorry, I stand corrected!
>
> If one does *not* change the AWT_TOOLKIT environment variable and uses
> export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre
>
> matlab R2007b works just fine!
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Pithawat Vachiramon (tanvach) wrote :

Confirmed export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre to work with matlab R2006b on Ubuntu x86_64 7.10 final, NVIDIA card. I've now changed my desktop shortcut launch command to:

bash -c "export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre; matlab -desktop &"

Revision history for this message
Alex Lubbock (alubbock) wrote :

For 32-bit matlab installed on x86-64 environment (e.g. student version), you need 32-bit java installed:

sudo apt-get install ia32-sun-java6-bin

Then modify the above shortcut to:

bash -c "export MATLAB_JAVA=/usr/lib/jvm/ia32-java-6-sun-1.6.0.03/jre; matlab -glnx86 -desktop &"

Thanks to this thread for the pointers!

I'm working on the Mathematica redundant window problem now...

Revision history for this message
Alex Lubbock (alubbock) wrote :

VERY hacky workaround for the Mathematica two extra windows bug:

1) Install compiz manager:

sudo apt-get install compizconfig-settings-manager

2) Run it via Settings -> Preferences -> Advanced Desktop Effects Settings
3) Make sure the Regular Expressions and Window Rules plugins are enabled
4) Go into Window Rules and enter the following in the 'Skip taskbar', 'Skip pager' and 'Below' fields:

name=XMathematica & !title=[A-Za-z0-9] & type=normal

This at least stops the windows taking up taskbar space. You can then minimise the visual interference from each of these windows by holding the alt key and rolling the mouse wheel down over the offending windows to minimise their opacity, then drag them to the bottom of the screen. They are now nearly invisible, behind everything and taking up no taskbar space.

Alternatively, you can make the windows invisible by default by entering General Options on the compiz manager, clicking the Opacity Settings tab and clicking the Add button under window opacities, enter the same name=XMath... string from above and setting the opacity to 0. This would work nicely, except it means that you have invisible windows that you can't 'click through' to access the desktop. Also, other windows making the same name=XMath... statement will be invisible and will not appear, though this is probably unlikely as the windows would have to match the whole expression including not having a title.

Clearly a dirty hack but hopefully of some practical use anyway, I will keep trying for a better method and post if any success.

Revision history for this message
Sparrow (walkingsparrow) wrote :

In fact, there is a method to close the two blank windows. First , move your
mouse to the position of "File" on the menu-bar. There nothing there, but
you know that is the position for "File". Although nothing is there, you can
click it and bring up the File Menu. Then by choosing "Close", you can close
the blank windows. As far as I know, this method can close the two blank
windows and does not affect the normal window.

But the two-blank-windows problem is still very annoying. I wish someone
could come up with a real solution.

On 10/23/07, davebadger <email address hidden> wrote:
>
> VERY hacky workaround for the Mathematica two extra windows bug:
>
> 1) Install compiz manager:
>
> sudo apt-get install compizconfig-settings-manager
>
> 2) Run it via Settings -> Preferences -> Advanced Desktop Effects Settings
> 3) Make sure the Regular Expressions and Window Rules plugins are enabled
> 4) Go into Window Rules and enter the following in the 'Skip taskbar',
> 'Skip pager' and 'Below' fields:
>
> name=XMathematica & !title=[A-Za-z0-9] & type=normal
>
> This at least stops the windows taking up taskbar space. You can then
> minimise the visual interference from each of these windows by holding
> the alt key and rolling the mouse wheel down over the offending windows
> to minimise their opacity, then drag them to the bottom of the screen.
> They are now nearly invisible, behind everything and taking up no
> taskbar space.
>
> Alternatively, you can make the windows invisible by default by entering
> General Options on the compiz manager, clicking the Opacity Settings tab
> and clicking the Add button under window opacities, enter the same
> name=XMath... string from above and setting the opacity to 0. This would
> work nicely, except it means that you have invisible windows that you
> can't 'click through' to access the desktop. Also, other windows making
> the same name=XMath... statement will be invisible and will not appear,
> though this is probably unlikely as the windows would have to match the
> whole expression including not having a title.
>
> Clearly a dirty hack but hopefully of some practical use anyway, I will
> keep trying for a better method and post if any success.
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
stojic (ivstojic) wrote :

There is a workaround for Mathematica 6 blank windows problem. Open Option Inspector and set option WindowFrame (in Notebook Options -> Window Properties) to ThinFrame. This completely resolves the issue on my system (Slackware 12 with GNOME 2.18, compiz 0.5.2, and NVIDIA card with 100.14.09 driver). Blank windows appear momentarily when Mathematica starts, but disappear immediately.

Hope this helps.

Revision history for this message
Sparrow (walkingsparrow) wrote :

You are right. I think this is the best solution so far. Thank you.

On 10/24/07, stojic <email address hidden> wrote:
>
> There is a workaround for Mathematica 6 blank windows problem. Open
> Option Inspector and set option WindowFrame (in Notebook Options ->
> Window Properties) to ThinFrame. This completely resolves the issue on
> my system (Slackware 12 with GNOME 2.18, compiz 0.5.2, and NVIDIA card
> with 100.14.09 driver). Blank windows appear momentarily when
> Mathematica starts, but disappear immediately.
>
> Hope this helps.
>
> --
> Ubuntu 7.10: Mathematica and Matlab conflict with Compiz-fusion
> https://bugs.launchpad.net/bugs/153045
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
mannheim (kronheim) wrote :

When using stojic's excellent workaround in Mathematica 6, I found that the Notebook windows don't have a minimize or maximize button on the titlebar. Selecting "Generic" instead of "ThinFrame" under Window Properties worked better for me: I got my taskbar buttons back.

Revision history for this message
Stevie (maanzaadbrood) wrote :

Hello

I am a total newbie and maybe my comment is stupid but I have the same problem.
when reading this thread I noticed the following: the problem occurs in
/matlab/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/motif12/libmawt.so
It does so exactly the same with me, but when I looked at that path I saw that in my case motif12 was called motif21
this is also the case with later java versions. When I changed the pathname it didnt have the problem anymore however I got a new error (Segmentation fault) and I have no idea what that means or how to solve it

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.