MATLAB shows error "MATLAB is selecting SOFTWARE OPENGL rendering."

Matlab is freezing my Fedora 36 showing the error mentioned above.
This command “$ export DISPLAY=:0.0” worked for someone in Mathworks forum but hasn’t work for me. I am new to linux and really want to stick to Fedora but kinda need MATLAB for work.
Please help.

1 Like

I do not use matlab, but have you read the ‘readme.txt’ and the ‘mathworks_installation_help.pdf’ file that are in the root directory where you extracted the zip file to do the install?

Did you configure the ‘installer_input.txt’ file in the same location before you did the install? If you did and you configured a log file as is available there then what does the log file show you?

What was the output of echo $DISPLAY before you did the export command you show above? When running in a gui environment $DISPLAY should always have a value that refers to your existing desktop, and should not need to be changed. Matlab may need to link to that display but the value should not need changed.

The message you show seems to indicate that matlab is doing software rendering, which greatly increases CPU load and may make the system unresponsive and seem to freeze. What do you have for system hardware? Please post the output of inxi -Fzxx in </> Preformatted text tags as available on the toolbar above this text input screen.

1 Like

This is only relevant if you are running on xorg instead of Wayland. If you are running Xorg, you probably want DISPLAY=:0, which specifies that you want to use the first running X session (it is possible, though not very common anymore to run multiple X sessions at one time). If you are running Wayland, then this setting won’t have any effect (except potentially confusing the application), since this is an Xorg specific workaround.

1 Like

Yes, read both the help files but sadly no help there.

The install was only configured on matlab gui by changing the install directory.

I was having the same issue even before running the export command. echo is now 0.

System hardware

$ inxi -Fzxx
System:
  Kernel: 5.18.18-200.fc36.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.37-27.fc36 Desktop: GNOME v: 42.4 tk: GTK v: 3.24.34 wm: gnome-shell
    dm: GDM Distro: Fedora release 36 (Thirty Six)
Machine:
  Type: Laptop System: ASUSTeK product: VivoBook_ASUS Laptop X505ZA_X505ZA
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: X505ZA v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: X505ZA.313 date: 02/25/2020
Battery:
  ID-1: BAT0 charge: 8.8 Wh (46.1%) condition: 19.1/42.1 Wh (45.3%)
    volts: 11.5 min: 11.5 model: ASUSTeK ASUS Battery serial: N/A
    status: discharging
CPU:
  Info: quad core model: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
    bits: 64 type: MT MCP arch: Zen rev: 0 cache: L1: 384 KiB L2: 2 MiB
    L3: 4 MiB
  Speed (MHz): avg: 1517 high: 2039 min/max: 1600/2000 boost: enabled
    cores: 1: 1447 2: 1368 3: 1570 4: 1368 5: 1421 6: 1369 7: 1559 8: 2039
    bogomips: 31943
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Mobile Series]
    vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN 5 pcie: speed: 8 GT/s
    lanes: 16 ports: active: eDP-1 empty: HDMI-A-1 bus-ID: 03:00.0
    chip-ID: 1002:15dd
  Device-2: Quanta USB2.0 VGA UVC WebCam type: USB driver: uvcvideo
    bus-ID: 3-2.1:3 chip-ID: 0408:3050
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 22.1.3
    compositor: gnome-shell driver: gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x15f5 res: 1920x1080 dpi: 142
    diag: 394mm (15.5")
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (raven LLVM 14.0.0 DRM 3.46
  5.18.18-200.fc36.x86_64)
    v: 4.6 Mesa 22.1.7 direct render: Yes
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:15de
  Device-2: AMD Family 17h/19h HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 03:00.6 chip-ID: 1022:15e3
  Sound Server-1: ALSA v: k5.18.18-200.fc36.x86_64 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 bus-ID: 01:00.0 chip-ID: 8086:24fd
  IF: wlp1s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: f000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: enp2s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 3-2.2:4 chip-ID: 8087:0a2b
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 1.36 TiB used: 556.49 GiB (39.8%)
  ID-1: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB
    speed: 6.0 Gb/s serial: <filter>
  ID-2: /dev/sdb vendor: Western Digital model: WDS500G2B0B-00YS70
    size: 465.76 GiB speed: 6.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 464.17 GiB used: 23.8 GiB (5.1%) fs: btrfs dev: /dev/sdb3
  ID-2: /boot size: 973.4 MiB used: 292.8 MiB (30.1%) fs: ext4
    dev: /dev/sdb2
  ID-3: /boot/efi size: 598.8 MiB used: 14 MiB (2.3%) fs: vfat
    dev: /dev/sdb1
  ID-4: /home size: 464.17 GiB used: 23.8 GiB (5.1%) fs: btrfs
    dev: /dev/sdb3
Swap:
  ID-1: swap-1 type: zram size: 6.72 GiB used: 15 MiB (0.2%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 49.0 C
  Fan Speeds (RPM): cpu: 2500
Info:
  Processes: 370 Uptime: 12m Memory: 6.72 GiB used: 4.09 GiB (60.9%)
  Init: systemd v: 250 target: graphical (5) default: graphical Compilers:
  gcc: 12.1.1 Packages: note: see --pkg flatpak: 10 Shell: Bash v: 5.1.16
  running-in: gnome-terminal inxi: 3.3.19

I forgot to mention that I also had trouble during the installation with matlab gui not showing around and ran the following command

$ export LD_PRELOAD=/usr/lib64/libfreetype.so.6
e$ ./install

gui showed after this.

Thanks for the help in advance.

I see you are using Wayland. Have you tried logging in with xorg to see if there is a difference?

You also have a radeon GPU and the message is about opencl and software rendering. It may be that hardware rendering may need to be properly enabled to improve the support. IDK how to do that.

Unfortunately, that generally requires the proprietary amdgpu-pro bits that are a real pain to install in Fedora. There are a few topics here attempting it with mixed levels of success. As a Radeon user myself, I really wish this situation were different, but it’s the part of the driver AMD has yet to open source.

1 Like

Same issue in xorg.

Try launching matlab from a terminal and see if there are any error messages.

At a terminal prompt:

$ matlab