ubuntu 18.04/20.04下,扩展显示屏设置不同scale

显示器参数:

  • 笔记本内置显示器(eDP-1)分辨率:3840x2160
  • 外接显示器(HDMI1)分辨率:1920x1200

以上参数可以通过xrandr命令获得。

问题

扩展模式下,内外显示器无法独立设置scale,导致内置显示器的scale设置为200%时,外接显示器的文字显得很大。

解决办法

使用xrandr设置。

  • 先在系统display处设置scale为200%;
  • 然后执行以下命令:
xrandr --auto --output eDP-1 --pos 0x0 --mode 3840x2160 --primary --scale 0.9999x0.9999 --output HDMI-1 --mode 1920x1200 --right-of eDP-1 --pos 3840x0 --scale 2x2

恢复设置

拔开外接显示器后,可能会出现不正确的显示比例。此时可以恢复默认设置(100%scale):

 xrandr --auto

或者恢复内置显示器200%scale:

xrandr --auto --output eDP-1 --pos 0x0 --mode 3840x2160 --primary --scale 1x1

永久设置方法

以上方法设置,重启后会失效。要实现永久设置,可以采用以下方法:

  • 修改 /etc/profile文件,添加需要永久设置的指令
  • 保存重启

如果经常需要插拔或切换不同分辨率的扩展屏幕,建议还是不要永久设置。我的的方案是在~/.bashrc设置了alias,需要的时候就执行,如:

## for dual monitor better display, reference from [ubuntu 18.04下,扩展显示屏设置不同scale](https://blog.csdn.net/lyh458/article/details/118676907)
alias dm="xrandr --auto --output eDP-1 --pos 0x0 --mode 3840x2160 --primary --scale 0.9999x0.9999 --output HDMI-1 --mode 1920x1200 --right-of eDP-1 --pos 3840x0 --scale 2x2"
## reset the default display setting
alias sm="xrandr --auto --output eDP-1 --pos 0x0 --mode 3840x2160 --primary --scale 1x1"

参考自:

  • 多屏幕不同DPI配置踩坑记
  • Ubuntu18.04 永久设置分辨率1920x1080
  • Linux下使用 xrandr 命令设置屏幕分辨率
  • Xrandr -简体中文
  • XRandR Examples

http://www.niftyadmin.cn/n/1765359.html

相关文章

ROS中topic重映射理解及验证(remap标签)

先附上个人总结&#xff1a; remap在node标签<node> ... </node>之外的作用域是其之后的所有节点&#xff1b; <node> ... </node> <!-- 不受remap影响 --> <remap /> <node> ... </node> <!-- 受remap影响 -->rema…

Ubuntu安装Nemo替代默认文件管理器Nautilus

Ubuntu安装nemo替代默认文件管理器Nautilus Nemo, the default Cinnamon file manager, is far superior to Gnome’s default Files application (Nautilus) in terms of features. Nemo was forked from Nautilus 3.4, so it includes features removed from Nautilus, like …

解决Ubuntu下安装rust时出现的curl (23) Failure writing output to destination错误

安装及更新rust 教程很多&#xff0c;不详细讲述了&#xff0c;给出几个典型的教程&#xff1a; 官方 curl --proto https --tlsv1.2 -sSf https://sh.rustup.rs | sh如果有网络问题&#xff0c;参考下面几个教程&#xff1a; rust 使用国内镜像&#xff0c;快速安装方法li…

Ubuntu下安装urdf可视化软件urdf-viz

Ubuntu下安装urdf可视化软件urdf-viz urdf-viz是一款开源的可视化URDF/XACRO模型的软件&#xff0c;用户可以利用urdf-viz检查模型的准确性及简单地手动控制&#xff1b;支持Windows/MacOS/Linux&#xff0c;非常好用。 安装方法 urdf-viz 是使用Rust-lang编写&#xff0c;所…

矩阵内积求导/包含Hadamard root的矩阵求导/matrix elements-wise square root/矩阵逐元素平方根求导/F范数求导

包含Hadamard root的矩阵求导案例比较少&#xff0c;此案例仅供参考&#xff1a; 1 题目 给定 X∈Rn\mathbf{X} \in \mathbb{R}^{n}X∈Rn&#xff0c;A∈Rnn\mathbf{A} \in \mathbb{R}^{n \times n}A∈Rnn&#xff0c;f(X)∑i1n∣AX∣i2δ2f(\mathbf{X})\sum_{i\mathbf{1}}^{n…

Hadamard Product求导案例

1 问题 给定 x∈Rn1\mathbf{x} \in \mathbb{R}^{n \times 1}x∈Rn1&#xff0c;A∈Rnn\mathbf{A} \in \mathbb{R}^{n \times n}A∈Rnn&#xff0c;f(x)(Ax)⊙(Ax)\mathbf{f}(\mathbf{x})\sqrt{(\mathbf{A} \mathbf{x}) \odot (\mathbf{Ax})}f(x)(Ax)⊙(Ax)​。 其中(⋅)\sqrt{…

双系统无法启动ubuntu时报错,出现`bluetooth: hci0: command 0xfc09 tx timeout`问题

报错 win11、ubuntu双系统&#xff0c;在ubuntu启动时报以下错误&#xff0c;一直无法启动&#xff1a; bluetooth: hci0: command 0xfc09 tx timeout bluetooth: hci0: failed to send firmware data (-110) bluetooth: hci0: sending frame failed (-19)我的环境 windows …

vmvare虚拟机下安装win11,跳过TPM限制

因为Windows 11对PC的硬件配置有要求&#xff0c;所以如果想用传统的方案在VM上安装win11会无法安装&#xff0c;本文教大家如何跳过硬件限制&#xff0c;直接安装。 安装步骤如下&#xff1a; 1 利用传统方法先新建虚拟机 Step 1: 新建虚拟机 Step 2: 典型安装 Step 3: …