Mu2e Home
OPENGL 3D Graphics Error

When using OPEN GL based 3D event displays on MAC OS some people will get an error message containing the string "cannot load swrast driver". When this occurs no graphics is produced. The specific circumstances in which this error has been observed are:

The most general solution is:

  1. Quit XQuartz.
  2. Open a fresh Terminal window and issue the command
    defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
  3. Restart XQuartz and open a new Terminal window (either from the Applications menu or using the cmd-N keyboard shortcut). ( It is different from the default Mac Terminal - it is really an xTerm. )
  4. Use this xTerm window to login to a mu2egpvmxx machine:
    ssh -KAX
    where userID is of course your own user ID.
  5. Your 3D graphics should now work, although you may still see an initial complaint.

In the error message, "swrast" refers to software rasterization. Depending on the details of your computer, you may have a high end graphics card capable of hardware rasterization of 3D graphics. If you do not, then X11 installation needs to do software rasterization of 3D graphics (which will work but will be slower).

If you have both a low and and a high end graphics card, your Mac normally automatically switches between the two (it uses the low end card when it can in order to save energy ). However there is a bug in the automatic switching that leads to the same error as seen above. In this case a possible solution is to disable automatic switching and to always use the high end card. The instructions for this are:

  1. To see if you have video cards: open up the Apple Menu and chose “About This Mac”. Click on “System Report”. In the left hand sidebar click on Graphics/Displays. On my machine this shows:
    AMD Radeon R9 M370X
    Intel Iris Pro
    The first is the more powerful video card; the second is the default on-chip video “card”.
  2. If you see only one video card then these instructions are not useful; use the instructions above.
  3. Go to the System Preferences (Gear icon) and choose energy saver. At the top is a check box for automatic graphics switching. Uncheck the box.
  4. Log out of the remote linux machine; restart XQuartz; log in again into the remote linux machine and retry.

Fermilab at Work ]  [ Mu2e Home ]  [ Mu2e @ Work ]  [ Mu2e DocDB ]  [ Mu2e Search ]

For web related questions:
For content related questions:
This file last modified Monday, 20-Feb-2017 22:55:29 CST
Security, Privacy, Legal Fermi National Accelerator Laboratory