It appears that you are running MATLAB R2018a on Ubuntu 18.04 which is not compatible according to https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2018a-linux.pdf
That could be one of the reason for the behavior which you are observing