LINUX MATLAB GUI is laggish and slowly

29 views (last 30 days)
After solving the issue of black GUI tied to XQuartz follwoing this answer ( https://www.mathworks.com/matlabcentral/answers/1622355-matlab-gui-displays-black-with-xquartz#answer_1191600 ), the GUI on LINUX, however, is extremely laggish and slowly. I mean dragging the boarder of workplace is slowly responded. The coding is still fine. I am using my MacBook (M1 chip) connected remotely to my workstation via Royal TSX enabled with X11 forwarding from XQuartz. It seems that the issue is related to ssh -x and it all occurs to R2022a, R2023b, and R2024a. Emergent help!

Accepted Answer

Divyam
Divyam on 13 Dec 2024
Since you are using an SSH connection to connect with your workstation, ensure that the network that you are using has low latency.
You could also try to compress all your data to improve the functionality over a slow network by using the "-C" flag.
ssh -X -C % https://explainshell.com/explain?cmd=ssh+-X+-C+user%40host
This laggish behavior could also be a result of X11 security extension controls and to bypass these controls, you could replace the "-X" flag in your command with the "-Y" flag. Although this leads to a less secure session, it should improve the performance of MATLAB on your remote desktop.
ssh -Y -C % https://explainshell.com/explain?cmd=ssh+-Y+-C+user%40host
I am unsure about the root cause behind this issue but as a rule of thumb, GUI applications are bound to be laggish when working on them with an SSH connection that uses a modem or a high latency network. Personally I would suggest using VNC or X2Go for remote desktop access over using X11 configuration with ssh.
To read more about the "-X" and "-Y" flags you can check out this discussion: https://unix.stackexchange.com/questions/619083/ssh-is-better-to-use-x-or-y
  3 Comments
Divyam
Divyam on 16 Dec 2024
Yes @YUEQIAN, it is not generally recommended to use X11 with large applications that involve data transfer. You can accept the answer if you found it satisfactory.

Sign in to comment.

More Answers (0)

Categories

Find more on Software Development Tools in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!