在 Ubuntu 20.04(Lenovo Thinkpad)上,100% 的显示比例很小,200% 的显示比例仍然很小

在 Ubuntu 20.04(Lenovo Thinkpad)上,100% 的显示比例很小,200% 的显示比例仍然很小

刚刚买了一台联想 Thinkpad,安装了 Ubuntu 20.04,下面是我在检查显示比例选项时的全屏截图

  • 100% 比例:如你所见,字体/符号非常小 在此处输入图片描述

  • 200% 比例:仍然很小,因此我不得不使用 300%(这是一个较大的比例,但在 250% 时没有分数缩放选项,仅在 100 到 200 之间可用) 在此处输入图片描述

有人知道为什么会这样吗?为什么 100% 的比例看起来如此之小,而不是像往常一样是一个合理的选择?这可能是联想的问题,而不是 Ubuntu 20.04 的问题吗?我之前在戴尔上使用过 Ubuntu 16.04 和 18.04(但不是 20.04),从来没有出现过问题。或者可能是由于分辨率?

答案1

Ubuntu 不知道您的屏幕尺寸,因此不知道其像素密度。

例如,在 15 英寸的屏幕上,100% 可能很小,但在具有相同分辨率的 32 英寸屏幕上,100% 就足够了。这就是为什么您可以手动更改缩放比例以适合您的屏幕尺寸。

您的联想笔记本电脑的像素密度比戴尔笔记本电脑更高。

答案2

解决方法

当未启用小数比例时,运行以下命令。

在此处输入图片描述

gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.GetCurrentState

例子:

$ gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.GetCurrentState
(uint32 7, [(('eDP-1-1', 'SDC', '0x4141', '0x00000000'), [('[email protected]', 1366, 768, 59.998008728027344, 1.0, [1.0, 2.0], {'is-preferred': <true>}), ('[email protected]', 1360, 768, 59.798992156982422, 1.0, [1.0, 2.0], {}), ('[email protected]', 1360, 768, 59.960025787353516, 1.0, [1.0, 2.0], {'is-current': <true>}), ('[email protected]', 1280, 720, 120.00162506103516, 1.0, [1.0, 2.0], {}), ('[email protected]', 1280, 720, 119.98211669921875, 1.0, [1.0, 2.0], {}), ('[email protected]', 1280, 720, 59.855125427246094, 1.0, [1.0, 2.0], {}), ('[email protected]', 1280, 720, 59.744712829589844, 1.0, [1.0, 2.0], {}), ('[email protected]', 1024, 768, 120.07466888427734, 1.0, [1.0], {}), ('[email protected]', 1024, 768, 60.003841400146484, 1.0, [1.0], {}), ('960x720@120', 960, 720, 120.0, 1.0, [1.0], {}), ('[email protected]', 928, 696, 120.101318359375, 1.0, [1.0], {}), ('[email protected]', 896, 672, 120.02888488769531, 1.0, [1.0], {}), ('[email protected]', 1024, 576, 119.90670776367188, 1.0, [1.0], {}), ('[email protected]', 1024, 576, 119.91866302490234, 1.0, [1.0], {}), ('[email protected]', 1024, 576, 59.899215698242188, 1.0, [1.0], {}), ('[email protected]', 1024, 576, 59.819515228271484, 1.0, [1.0], {}), ('[email protected]', 960, 600, 119.865478515625, 1.0, [1.0], {}), ('[email protected]', 960, 600, 119.99750518798828, 1.0, [1.0], {}), ('[email protected]', 960, 540, 119.92568969726562, 1.0, [1.0], {}), ('[email protected]', 960, 540, 119.97574615478516, 1.0, [1.0], {}), ('[email protected]', 960, 540, 59.6290283203125, 1.0, [1.0], {}), ('[email protected]', 960, 540, 59.818218231201172, 1.0, [1.0], {}), ('800x600@120', 800, 600, 120.0, 1.0, [1.0], {}), ('[email protected]', 800, 600, 60.316539764404297, 1.0, [1.0], {}), ('[email protected]', 800, 600, 56.25, 1.0, [1.0], {}), ('[email protected]', 840, 525, 120.01870727539062, 1.0, [1.0], {}), ('[email protected]', 840, 525, 119.76650238037109, 1.0, [1.0], {}), ('[email protected]', 864, 486, 59.91534423828125, 1.0, [1.0], {}), ('[email protected]', 864, 486, 59.5703125, 1.0, [1.0], {}), ('[email protected]', 800, 512, 120.33700561523438, 1.0, [1.0], {})], {'is-builtin': <true>, 'display-name': <'Built-in display'>})], [(0, 0, 1.0, uint32 0, true, [('eDP-1-1', 'SDC', '0x4141', '0x00000000')], @a{sv} {})], {'renderer': <'xrandr'>, 'layout-mode': <uint32 2>, 'global-scale-required': <true>, 'legacy-ui-scaling-factor': <1>, 'max-screen-size': <(16384, 16384)>})
$

从上面的结果中,请注意在输出“(unit32 7”的开头,值 7 是变化的,这非常重要。请注意您情况下的该值。

接下来读取具有许多不同值的常见模式..像这样

'[email protected]', 1366, 768, 59.998008728027344, 1.0, [1.0, 2.0]

[email protected]模式识别
1366物理像素的宽度
768物理像素高度
59.998008728027344刷新率
1.0根据计算结果选择合适的规模
[1.0, 2.0]上述模式支持的尺度[email protected]

这意味着在可用的模式中(根据输出有很多模式),如果你选择[email protected]此模式,则只有两个可用的比例[1.0, 2.0]

现在启用分数比例并再次运行命令..

$ gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.GetCurrentState
(uint32 7, [(('eDP-1-1', 'SDC', '0x4141', '0x00000000'), [('[email protected]', 1366, 768, 59.998008728027344, 1.0, [1.0, 2.0], {'is-preferred': <true>}), ('[email protected]', 1360, 768, 59.798992156982422, 1.0, [1.0, 1.2307692766189575, 1.4545454978942871, 1.7777777910232544, 2.0], {}), ('[email protected]', 1360, 768, 59.960025787353516, 1.0, [1.0, 1.2307692766189575, 1.4545454978942871, 1.7777777910232544, 2.0], {'is-current': <true>}), ('[email protected]', 1280, 720, 120.00162506103516, 1.0, [1.0, 1.25, 1.5094339847564697, 1.7391303777694702, 2.0], {}), ('[email protected]', 1280, 720, 119.98211669921875, 1.0, [1.0, 1.25, 1.5094339847564697, 1.7391303777694702, 2.0], {}), ('[email protected]', 1280, 720, 59.855125427246094, 1.0, [1.0, 1.25, 1.5094339847564697, 1.7391303777694702, 2.0], {}), ('[email protected]', 1280, 720, 59.744712829589844, 1.0, [1.0, 1.25, 1.5094339847564697, 1.7391303777694702, 2.0], {}), ('[email protected]', 1024, 768, 120.07466888427734, 1.0, [1.0, 1.2487804889678955, 1.4970760345458984], {}), ('[email protected]', 1024, 768, 60.003841400146484, 1.0, [1.0, 1.2487804889678955, 1.4970760345458984], {}), ('960x720@120', 960, 720, 120.0, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 928, 696, 120.101318359375, 1.0, [1.0, 1.2473118305206299], {}), ('[email protected]', 896, 672, 120.02888488769531, 1.0, [1.0, 1.251396656036377], {}), ('[email protected]', 1024, 576, 119.90670776367188, 1.0, [1.0, 1.2799999713897705, 1.4883720874786377], {}), ('[email protected]', 1024, 576, 119.91866302490234, 1.0, [1.0, 1.2799999713897705, 1.4883720874786377], {}), ('[email protected]', 1024, 576, 59.899215698242188, 1.0, [1.0, 1.2799999713897705, 1.4883720874786377], {}), ('[email protected]', 1024, 576, 59.819515228271484, 1.0, [1.0, 1.2799999713897705, 1.4883720874786377], {}), ('[email protected]', 960, 600, 119.865478515625, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 960, 600, 119.99750518798828, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 960, 540, 119.92568969726562, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 960, 540, 119.97574615478516, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 960, 540, 59.6290283203125, 1.0, [1.0, 1.25, 1.5], {}), ('[email protected]', 960, 540, 59.818218231201172, 1.0, [1.0, 1.25, 1.5], {}), ('800x600@120', 800, 600, 120.0, 1.0, [1.0, 1.25], {}), ('[email protected]', 800, 600, 60.316539764404297, 1.0, [1.0, 1.25], {}), ('[email protected]', 800, 600, 56.25, 1.0, [1.0, 1.25], {}), ('[email protected]', 840, 525, 120.01870727539062, 1.0, [1.0, 1.25], {}), ('[email protected]', 840, 525, 119.76650238037109, 1.0, [1.0, 1.25], {}), ('[email protected]', 864, 486, 59.91534423828125, 1.0, [1.0, 1.2558139562606812], {}), ('[email protected]', 864, 486, 59.5703125, 1.0, [1.0, 1.2558139562606812], {}), ('[email protected]', 800, 512, 120.33700561523438, 1.0, [1.0, 1.2799999713897705], {})], {'is-builtin': <true>, 'display-name': <'Built-in display'>})], [(0, 0, 1.0, uint32 0, true, [('eDP-1-1', 'SDC', '0x4141', '0x00000000')], @a{sv} {})], {'renderer': <'xrandr'>, 'layout-mode': <uint32 3>, 'supports-changing-layout-mode': <true>, 'x11-fractional-scaling': <true>, 'legacy-ui-scaling-factor': <1>, 'max-screen-size': <(16384, 16384)>})
$

这次再次观察线条,

'[email protected]', 1360, 768, 59.960025787353516, 1.0, [1.0, 1.2307692766189575, 1.4545454978942871, 1.7777777910232544, 2.0]

观察现在可用的比例已经改变。这意味着您可以从上面的输出中设置 1.23.......... 或 1.45.......... 或 1.77....... 或 2.0

因为我的笔记本电脑是 1366x768,所以可用的比例较少。但是当我将它连接到我的 4K 电视时,我将有更多的可用比例。就你的情况而言,你的笔记本电脑像素很高,你可以有更多选项来获得所需的分辨率3840x2168

首先运行命令

gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.GetCurrentState

并记下值

例如:

  1. 7在 Unit32 7 上命令输出的开头

  2. [email protected]处于首选模式,并且适合近乎需要的规模

我的要求的示例行:

('[email protected]', 1360, 768, 59.798992156982422, 1.0, [1.0, 1.2307692766189575, 1.4545454978942871, 1.7777777910232544, 2.0]
  1. 1.7777777910232544是我最喜欢的尺度,例如...

  2. eDP-1-1这是我的显示,根据您的情况进行更改。

现在设置比例,在您的情况下,您肯定会有 2.25 或 2.50 几乎相等的值..编辑以下命令以适合您的值..

gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.ApplyMonitorsConfig 7 1 "[(0, 0, 1.7777777910232544, 0, true, [('eDP-1-1', '[email protected]', [] )] )]" "[]"

上述命令和源代码的解释如下:https://unix.stackexchange.com

成功的命令示例:下面的 gif 无法准确显示,但就我的情况而言结果很好。

在此处输入图片描述

相关内容