Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select hardware OpenGL rendering for MATLAB on Linux

Tags:

matlab

When I start matlab on my linux machine, I get the notice, "MATLAB is selecting SOFTWARE OPENGL rendering." Once it starts up, if I try opengl hardware I get the message that I can't switch at runtime. How do I enable hardware rendering as simply as possible?

like image 566
Philip Avatar asked Apr 16 '16 22:04

Philip


People also ask

How do I change OpenGL in Matlab?

Specify OpenGL Implementation for Future Sessions Software OpenGL — Type opengl('save','software') at the MATLAB command prompt. Then, restart MATLAB. Basic hardware-accelerated OpenGL — Type opengl('save','hardwarebasic') at the MATLAB command prompt. Then, restart MATLAB.

Does Matlab use OpenGL?

By default, MATLAB uses hardware-accelerated OpenGL if your graphics hardware supports it. However, in some cases, MATLAB automatically switches to software OpenGL, for example, if it detects: You are using a graphics driver with known issues or graphics virtualization.

Is hardware based OpenGL working outside MATLAB?

suggesting hardware based OpenGL is working outside MATLAB. I have done most of my testing on Arch Linux with an Intel graphics card, but have also tried ATI and Nvidia cards without any luck. I recently created a Debian 7 chroot, since that is an officially supported OS, but still had no luck with the Intel card.

How to enable hardware rendering in MATLAB?

It took way too long to find what seems like should be the first answer to pop up: Start matlab from the terminal with matlab -nosoftwareopengl. Once it starts, running opengl info in matlab shows that hardware rendering is indeed selected. Show activity on this post.

How to draw with OpenGL in Linux?

So open your terminal and run the following commands: Before you start with creating stunning graphics, you need to initialize an OpenGL context and create an application window to draw in. We’ll do this using a popular C library: GLFW (Graphics Library Framework). This library also helps us handle the input from the joystick, keyboard, and mouse.

Why can't I run MATLAB on Ubuntu 16 04?

The reason for the warning is, that Matlab does not recognize the hardware OpenGL driver. Search in the docs for explanations: I got the same issues with Ubuntu 16.04+R2017a and R2017b. Matlab didn't show up. But strange enough, matlab can start in VNC though I still got the same message "MATLAB is selecting SOFTWARE OPENGL rendering".


1 Answers

The first answers that turn up when searching for an answer to this question lead me to try and solve non-existent problems with the opengl libraries on my system. Other solutions proposed setting the option in the startup.m or matlabrc.m files, which didn't work for me.

It took way too long to find what seems like should be the first answer to pop up: Start matlab from the terminal with matlab -nosoftwareopengl.

Once it starts, running opengl info in matlab shows that hardware rendering is indeed selected.

like image 174
Philip Avatar answered Sep 19 '22 06:09

Philip