MATLAB GUI displays black with XQuartz
Mostra commenti meno recenti
I am running MATLAB R2021a from a remote Linux server. I am able to bring up the GUI on my local macbook running macOS 12.1 using XQuartz and ssh, but the GUI usually displays black where the white usually is. Sometimes the window displays in the right color, (white) but only for a few seconds, then reverts back to the black. When it's black, I can still see the GUI, it's just very hard to read.
16 Commenti
yanqi liu
il 5 Gen 2022
yes,sir,may be edit the fig file,set bgcolor to yello or green and so on,then check the result
Moshe Armon
il 14 Gen 2022
Hi Hanna,
It happened to me as well.
Did you find a solution for this?
Thanks,
Koko
David Ohnmacht
il 17 Gen 2022
This happens to me too... Very annoying.
I also can't find a solution.
Moshe Armon
il 19 Gen 2022
Any clues, anyone...?
Hannah Rodriguez
il 20 Gen 2022
Modificato: Walter Roberson
il 27 Set 2022
Haochuan Song
il 17 Feb 2022
I have the same problem
feng liu
il 3 Mar 2022
I have the same problem too.
Walter Roberson
il 3 Mar 2022
Someone on the thread says "I had the same problem and found an alternative solution: Installing realvnc and running vncserver on the workstation with the Matlab installation."
Arzoo
il 26 Set 2022
i have the same issue, did anyone find the solution?
dazheng Li
il 28 Set 2022
I have the same problem too.
Allison Dockum
il 12 Ott 2022
I have the same problem too
Facheng Li
il 7 Nov 2022
Modificato: Facheng Li
il 7 Nov 2022
I find it works to uninstall XQuartz-2.8.2 and install XQuartz-2.8.3_rc1, then run the command in the terminal:
`defaults write org.xquartz.X11 enable_render_extension 0`
Thanks to the issue mentioned above.
However, the reation of XQuartz is still very slow. It is better to use vscode and matlab plug-ins.
LUCIANA
il 23 Nov 2022
it is still not working.... i'm having the same issue... but i just happened when I updated from Monterrey macOS to ventura....
Jonathan Schwartz
il 20 Dic 2022
I'm having the same issue as well, any updates on the solution?
Andrew
il 8 Mar 2023
I'm having the same issue with two M1 Macs, both with OSVentura. Connecting to a Centos7 remote system with the latest XQuartz. The MATLAB (R2022a) GUI has a black background that makes it unusable. If I have dual monitors the window becomes normal when I move the cursor to the monitor that does not have the MATLAB GUI.
Risposte (3)
Sudhansu Sekhar
il 13 Mar 2023
create a file "java.opts" in the home folder
mention the following inside that file
-Dsun.java2d.xrender=false
-Dsun.java2d.pmoffscreen=false
Restart matlab from home .
Check if it solves the issue.
I solved the same like this.
11 Commenti
DavidePiccinini
il 13 Mar 2023
It works also for me!
Thanks
d
Ishani Janveja
il 14 Ago 2023
Worked for me as well! Thanks!
Ryan
il 1 Set 2023
Perfect, same problem and this was the answer!
Laetitia
il 21 Set 2023
This solution worked like a charm! Thank you!
aoxin
il 5 Ott 2023
hello, i want to know ,where is the home folder. thanks
Sudhansu Sekhar
il 5 Ott 2023
Hello,
Run this to get your HOME location
echo $HOME
Check this site for more details
Bruce Rodenborn
il 4 Nov 2023
Had this problem on an 2023 Macbook Pro M2 and MATLAB 2022a. The fix worked as described above. Typically the home folder can also be changed into using cd ~/ . I will update MATLAB and this post at some point.
Xiaoqiu HE
il 16 Nov 2023
Thanks! This solved my problem! you helped me a lot! How do you figured out this solutioin? It's incredible!
Muhammad
il 3 Gen 2024
Thank you, it worked for me.
Zhenyu Ren
il 4 Gen 2024
Thanks, this works for me too.
Farhan
il 7 Gen 2024
Works for me too, Thanks.
DavidePiccinini
il 2 Feb 2023
1 voto
Similar issue for me R2020b running on Ubuntu Linux remote system. Client is MacOS 13.1 with XQuartz 2.8.5 (xorg-server 21.1.6).
The window become "normal" when I type on the keyboard in other programs (like I'm doing right now in Chrome), and turns black when I move the mouse.
Henrique Barbosa
il 14 Nov 2024
Modificato: Henrique Barbosa
il 14 Nov 2024
This is not an issue with the remote linux server, but with XQuartz (black background issue occurs with other applications too, not only Matlab).
On the XQuartz github:
They suggest to close XQuartz then issue this command on your mac:
defaults write org.xquartz.X11 enable_render_extension 0
Then run your application again (in our case, Matlab). This works for me, and seem like the right solution. The "defaults write" is stiky, so you only have to do this once.
By the way, if you see the following errors when starting Matlab (or other applications that use glx, like glxgears, etc...):
$ run_my_glx_application
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
No matching fbConfigs or visuals found
This is what I did. First, I allowed GLX on XQuartz:
defaults write org.xquartz.X11 enable_iglx -bool YES
Second, I went to XQuartz => Settings => Security => and "Allow connections from network clients.
Finally, I added the following to my .bashrc (on the remote linux server):
# Fix OpenGL applications accessed remotely
LIBGL_ALWAYS_INDIRECT=1
I hope this helps.
1 Commento
Kenneth
il 10 Gen 2025
That worked for me.
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!