Chances are that there is a graphics rendering problem if any of these symptoms show up:
- The graphics window is black
- It is not possible to mouse-select objects in the graphics window
- The COMSOL application crashes unexpectedly, for example directly after mesh generation or after a simulation has completed
- COMSOL starts and then disappears without error messages
- The graphics window is scrambled, shows unwanted artifacts, or there are other graphics issues.
A typical error message for rendering problems can be:
The application 'SWT' lost its connection to the display localhost:11.0;
most likely the X server was shut down or you killed/destroyed the
COMSOL 4.4 and later
The quickest solution is to switch to software rendering:
Start COMSOL Multiphysics.
To open the Preferences dialog box, in the COMSOL Desktop:
Windows users: From the File menu, select Preferences.
Cross-platform (Mac and Linux) users and COMSOL Version 4.0 to 4.3b: From the main menu select Options>Preferences.
In the Preferences window select Graphics and Plot Windows (Version 4.4 and later) or Graphics (Versions 4.0 to 4.3b) and set the Rendering option to Software.
Click OK and close the COMSOL Desktop. Note that the screen shot is for COMSOL Multiphysics 5.2a.
Make sure you run with at least 32-bit color depth. 16-bit color depth is not supported by COMSOL.
COMSOL Multiphysics relies on hardware accelerated rendering for showing geometry, mesh and visualization of plots. A graphics card that supports either OpenGL 1.3 or DirectX 9 is needed to use the hardware accelerated rendering. The graphics card must also support 24-bit color depth.
The OpenGL rendering will be used by default. The first time COMSOL Multiphysics is started it will detect if the graphics card supports the necessary features. If not it will try to fall back to use a built-in software rendering, which usually works OK but is much slower and less smooth than hardware rendering. If it does not succeed in automatically changing the rendering, you have to do it manually. If you run COMSOL over Remote Desktop or an X-server, hardware (OpenGL) rendering usually does not work. Therefore, we recommend to run the COMSOL Desktop on your local console or display.
If OpenGL rendering does not work and you are not satisfied with the performance of the software rendering you can try and use the DirectX renderer. Switch renderer in the Graphics category in the Preference dialog box on the Options menu. You can also force COMSOL Multiphysics to use a certain renderer by using a parameter to the command used to start:
comsol -3drend ogl (start with OpenGL rendering)
comsol -3drend dx9 (start with DirectX rendering)
comsol -3drend sw (start with software rendering)
Note that DirectX is only available on Windows. To enable software rendering on Windows:
1. Right-click on the COMSOL Multiphysics shortcut and select Properties.
2. On the Shortcut page, append
–3drend sw to the Target line, as shown here (the added option is underlined in red):
The drivers for a graphics card often evolve and get enhanced after the initial release of the card so if you have graphics problems, we recommend that you start by downloading and installing the latest driver for your graphics card.
- In order to ensure properly accelerated 3D graphics on Linux, install the proprietary Linux NVIDIA (nvidia) or ATI (fglrx) graphics drivers instead of using the ones supplied with the X-server.
- If you are experiencing crashes or other problems (like patchiness, lagging) with the 3D rendering, you can create a renderer debug log to aid in troubleshooting the problem. Add the following command line options to the COMSOL start command
-Dcs.3dlogfile=C:\temp\comsolgraphics.log -Dcs.3dlogflush=1 -Dcs.3dloglevel=debug
For Windows the options can be added to the COMSOL shortcut target. If you don't have a
temp directory, add this manually under C: as this will not be created automatically by running COMSOL with the extra options.
For Mac OS X and Linux the options should be given on the command line in the following way:
-3dlogfile ~/comsolgraphics.log -3dlogflush 1 -3dloglevel debug
- For some Linux distributions, especially openSUSE, the GTK2 theme used might be the cause of the graphics issues. Try switching to another GTK2 theme.
- If COMSOL and other 3D graphics software crash or fail to start with OpenGL on newer Linux platforms that have the Nouveau drivers installed by default (Examples: Debian 6.0, Red Hat Enterprise Linux 6.0), then the below is a suggestion how to install the proprietary ATI or NVIDIA drivers.
Example: Install NVIDIA proprietary drivers to override Nouveau drivers on Red Hat Enterprise Linux 6.0:
Download the current NVIDIA driver from the NVIDIA site, for example:
Then create the file:
with the following contents:
options nouveau modeset=0
Edit the file
/boot/grub/grub.conf and append
rdblacklist=nouveau to the kernel line, as seen below
title Red Hat Enterprise Linux 6 (2.6.32-19.el6.x8664)
kernel /vmlinuz-2.6.32-19.el6.x8664 ro root=/dev/mapper/vgrhel6-ROOT rdLVMLV=vgrhel6/ROOT rdNOLUKS rdNOMD rdNODM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet nomodeset rdblacklist=nouveau
Next, reboot. Then run:
sudo sh NVIDIA-Linux-x86_64-319.17.run
Answer the questions, and you should end up with a good xorg.conf. You can use nvidia-settings to improve it once you are in X.
A similar procedure for installing NVIDIA drivers on Debian 6 is described on wiki.debian.org/NvidiaGraphicsDrivers
Linux users: Start COMSOL Multiphysics with Mesa software rendering by adding the ´-mesa´ option to the COMSOL start command:
Browse by CategoryError Messages (62)
Structural Mechanics (3)
Fluid Dynamics (1)
ALE / Parameterized Geometry (1)
Product Information (1)
User Models (1)
COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.