3
$\begingroup$

I use Mathematica 9 on Ubuntu 12.04 LTS x86 (64-bit). My computer has an Nvidia graphics card, for which I installed primus and bumblebee. If anyone is in a similar situation, I would like to know if they have solutions to the following two related problems:

  1. Mathematica does not need OpenGL when it's not rendering any 3D graphics. For this reason I find it convenient to run the program without optirun mathematica or primusrun mathematica most of the time. However, I noticed that if I do make a Plot3D or related command, Mathematica will crash. Is it possible to set the program up in a way so that it doesn't crash, but rather shows an error message, or just doesn't show output, if no 3D rendering is possible?

  2. primusrun extends optirun functionality by saving power when the graphics card is not in use. I suppose that for this reason, if I'm not actively rotating a 3D graphic, it goes blank in a session of primusrun mathematica rather than optirun mathematica. When using the less efficient optirun, all functionality is available and runs as expected. Did anyone figure out a workaround for this?

I'm asking on this site rather than AskUbuntu because the solution, if it exists, probably lies in changing Mathematica preferences rather than primus'.

$\endgroup$
2
  • $\begingroup$ There's a misconception about the power saving. To clarify, primusrun avoids powering on the discrete GPU as long as the application does not load the OpenGL library; after that, power saving compared to optirun/virtualgl may come from obeying vsync, but that probably wouldn't matter for Mathematica. As noted below, consider filing a bug with reproduction steps for the blank 3D figure in primus. $\endgroup$
    – amonakov
    Commented Feb 1, 2014 at 10:54
  • $\begingroup$ @amonakov - yes, like I said, this was only my guess as to why the blank graphics occur. I agree it's due to some more complicated bug. I already filed a report to Wolfram support but I seriously doubt they would be able to help such a niche use case (i.e. Linux users with Optimus). $\endgroup$
    – VF1
    Commented Feb 1, 2014 at 15:50

3 Answers 3

2
$\begingroup$

You must adjust the Antialiasing Quality to solve that issue. Go to menu Edit -> Preferences -> Appearance -> Graphics.. then adjust it.. That worked for me. I have Ubuntu 14.04 and Mathematica V9.

Other solution is open a terminal and run: mathematica -mesa when opening.

$\endgroup$
2
  • $\begingroup$ Hi ! Can you edit your post to clarify it ? As it is currently written it is hard to tell exactly which issue/s you are trying to solve. $\endgroup$
    – Sektor
    Commented Jul 13, 2014 at 6:58
  • $\begingroup$ Yep. This solution works on Linux Mint 17.1 as well. +1 $\endgroup$
    – shivams
    Commented Jun 18, 2015 at 14:16
3
$\begingroup$

Problem 1 should be a distribution specific bug. I cannot reproduce this problem on Archlinux.

I can reproduce problem 2. I think primusrun is still experimental. You may report a bug to them (but the developers may not have Mathemataica though).

$\endgroup$
6
  • $\begingroup$ If you can provide reproduction steps for the trial version, or capture the problem with apitrace, I will look into fixing it. Consider filing a bug at github.com/amonakov/primus/issues $\endgroup$
    – amonakov
    Commented Feb 1, 2014 at 10:42
  • $\begingroup$ Thanks! I filed a bug at github. $\endgroup$
    – Yi Wang
    Commented Feb 1, 2014 at 13:56
  • $\begingroup$ What happens for Problem 1 for you? $\endgroup$
    – VF1
    Commented Feb 1, 2014 at 15:52
  • $\begingroup$ On my computer, Mathematica works well, no crash, and displays Plot3D figures correctly when started directly using integrated graphics (i.e. without optirun or primusrun) $\endgroup$
    – Yi Wang
    Commented Feb 1, 2014 at 16:29
  • $\begingroup$ Problem 2 is a limitation in primus, it doesn't support GLX pixmaps and front buffer rendering: github.com/amonakov/primus/issues/131 Regarding problem 1, you may be seeing a segfault in graphics drivers: 12.04 is quite old. $\endgroup$
    – amonakov
    Commented Feb 1, 2014 at 20:34
2
$\begingroup$

After talking with Wolfram tech support, it seems problem 1 is really just this issue resolved by running Mathematica by the mathematica -mesa command.

Problem 2 is unresolved. I suppose I should keep this question open, though I don't know if a fix will come soon.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.