high DPI display issue in MATLAB R2021a

49 ビュー (過去 30 日間)
Yang Liu
Yang Liu 2021 年 6 月 3 日
Result and one-line proposed solution:
User-specific settings, `settings.matlab.desktop.DisplayScaleFactor`in particular, in MATLAB R2021a are not saved in R2021a. This setting seems to be correctly addressed in other versions, such as R2019b (tested) and R2020a (shown in the url below).
Test platform:
MATLAB R2021a on Ubuntu 20.04 LTS (and MATLAB R2019b on the same OS for comparison)
Details:
I found this issue because I was seeking for the high DPI solution for MATLAB R2021a. I found a related question as listed below. I tried the suggested solution, which seems to work perfectly on MATLAB R2020a. However, it does not work on my side.
s = settings;s.matlab.desktop.DisplayScaleFactor
s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2
At first, I thought it might be the OS, since I am using the relatively new fractional scaling feature of Ubuntu 20.04 to better use 4K monitors. Out of curiosity, I tried R2019b on the same computer and it worked perfectly. Then I realize that the issue might be that R2021a forgot to write the display factor setting to the user directory (instead of global setting which requires sudo in Linux because I do not need sudo to change this setting). Then I compare `~/.matlab/R2021a` and `~/.matlab/R2019b` and eventually found that in `matlab.mlsettings/fsroot/settingstree/matlab/display/settings.json`, new setting `DisplayScaleFactor` was not saved. By comparing it with the value in `~/.matlab/R2019b`, I added
{"attributes":{"readonly":false,"runtimeDefaultFcn":{},"settingValueValidator":{},"validationFcn":{},"visible":true},"hasValue":true,"isUserDefined":false,"isVector":false,"name":"DisplayScaleFactor","value":"2"}
in the settings string and save it, it turned out to be solved perfectly.
Related question:
  4 件のコメント
Ahmed Riza
Ahmed Riza 2022 年 10 月 24 日
There is no such folder in R2022b and I also have the same problem. Can't find a way to get hidpi working on a Fedora 36 Linux laptop! Very annoying.
Johannes Anastasiadis
Johannes Anastasiadis 2022 年 12 月 1 日
Hi.
I had the same problem on Fedora 37 with R2022b.
I found the setting at matlab.mlsettings/fsroot/settingstree/matlab/desktop/settings.json . It was already there with scaling factor 1. Maybe because I tried
s = settings;s.matlab.desktop.DisplayScaleFactor
s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2
before. I just had to change DisplayScaleFactor it to 2 and it worked.
@Emanuele Russomanno it is a zipped folder called matlab.mlsettings inside of ~/.matlab/R2022b. I had to unzip it, make the change, zip it again and rename it. Possible error: when zipping again a root folder named matlab can appear inseide the zip file. Duouble check if the structure of the file is exaclty as before. Backup the original file for that purpose.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by