AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[xrandr](ubuntu)

Martin Hope
Jole
Asked: 2022-06-30 04:19:36 +0800 CST

无法更改 LXDE 上的分辨率

  • 0

我在 Nvidia Jetson Nano 小型计算机上安装了带有 LXDE 的 Ubuntu 18.04,当没有连接显示器时,我的分辨率为 640x480。启动首选项-->“监视器设置”不会导致屏幕上出现任何内容,并且来自终端的“lxrandr”返回“分段错误”。

然后,我尝试手动添加分辨率 1280x768,但不断出现“找不到输出”S-video”或将模式更改为 HDMI-0 时出现“找不到模式 1280x768”(见屏幕截图)。

我能做些什么来改变分辨率?我正在通过 NoMachine 访问设备。

尝试截图

xrandr
  • 1 个回答
  • 35 Views
Martin Hope
cpederson
Asked: 2020-11-24 23:47:26 +0800 CST

无法使用英特尔显卡在 Ubuntu 20.04 上设置 2560x1440 分辨率

  • 5

所以我在笔记本电脑上连接了一台惠普显示器作为外接显示器。显示器的文档说使用他们提供的 HDMI 电缆的最佳分辨率是 2560x1440 @ 60 Hz。当我启动 Windows 时,我可以获得该分辨率。但无论我尝试什么,我都无法在 Ubuntu 20.04 中获得该分辨率。

我的笔记本电脑上没有 DisplayPort 连接,所以我使用随附的 HDMI 电缆。

我尝试使用 设置分辨率xrandr --admode,但新模式失败:

$ cvt 2560 1440 60
# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
$ xrandr --newmode "2560x1440" 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
$ xrandr --addmode XWAYLAND1 2560x1440
$ xrandr --output XWAYLAND1 --mode 2560x1440
xrandr: Configure crtc 1 failed

这是输出xrandr --verbose:

Screen 0: minimum 16 x 16, current 3840 x 1441, maximum 32767 x 32767
XWAYLAND0 connected 1920x1080+1920+361 (0x24) normal (normal left inverted right x axis y axis) 290mm x 170mm
    Identifier: 0x21
    Timestamp:  20221
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 0.0
    Clones:    
    CRTC:       0
    CRTCs:      0
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    non-desktop: 0 
        supported: 0, 1
  1920x1080 (0x24) 173.000MHz -HSync +VSync *current +preferred
        h: width  1920 start 2048 end 2248 total 2576 skew    0 clock  67.16KHz
        v: height 1080 start 1083 end 1088 total 1120           clock  59.96Hz
XWAYLAND1 connected 1920x1200+0+0 (0x25) normal (normal left inverted right x axis y axis) 600mm x 340mm
    Identifier: 0x23
    Timestamp:  20221
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 0.0
    Clones:    
    CRTC:       1
    CRTCs:      1
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    non-desktop: 0 
        supported: 0, 1
  1920x1200 (0x25) 193.250MHz -HSync +VSync *current +preferred
        h: width  1920 start 2056 end 2256 total 2592 skew    0 clock  74.56KHz
        v: height 1200 start 1203 end 1209 total 1245           clock  59.88Hz

这是输出lspci -k | grep -EA3 'VGA|3D|Display'

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
    DeviceName:  Onboard IGD
    Subsystem: Dell HD Graphics 620
    Kernel driver in use: i915
--
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
    Subsystem: Dell Sunrise Point-LP Integrated Sensor Hub
    Kernel driver in use: intel_ish_ipc
    Kernel modules: intel_ish_ipc

并且glxinfo | grep -i vendor:

server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
    Vendor: Intel (0x8086)
OpenGL vendor string: Intel

我正在使用 Mesa Intel® HD Graphics 620 (KBL GT2) 卡运行 Ubuntu 20.04.1 LTS。Gnome 版本是 3.35.3,使用 Wayland 作为窗口系统。

关于如何让显示器显示最佳分辨率的任何建议?

编辑 1

我尝试切换到 Xorg,而不是 Wayland。我仍然遇到同样的问题。如果我启动到 Xorg,以下是相关行xrandr --verbose:

HDMI-1 connected 1920x1200+1920+0 (0xa1) normal (normal left inverted right x axis y axis) 597mm x 336mm
    Identifier: 0x43
    Timestamp:  76498
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 1.0
    Clones:    
    CRTC:       1
    CRTCs:      0 1 2
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    EDID: 
        00ffffffffffff00220e753401010101
        091e0103803c22782a9325a9544d9e25
        0c5054a10800d1c081c081809500a9c0
        a940b300d100565e00a0a0a029503020
        350055502100001a000000fd00323c1e
        5a19000a202020202020000000fc0048
        502045323733710a20202020000000ff
        0036434d303039303939430a202001cc
        020319b149101f041303120211016703
        0c0010000032e2002b023a801871382d
        40582c450055502100001e023a80d072
        382d40102c458055502100001e565e00
        a0a0a029503020350055502100001a00
        00000000000000000000000000000000
        00000000000000000000000000000000
        00000000000000000000000000000023
    _MUTTER_PRESENTATION_OUTPUT: 0 
    HDCP Content Type: HDCP Type0 
        supported: HDCP Type0, HDCP Type1
    Content Protection: Undesired 
        supported: Undesired, Desired, Enabled
    max bpc: 12 
        range: (8, 12)
    content type: No Data 
        supported: No Data, Graphics, Photo, Cinema, Game
    Colorspace: Default 
        supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
    aspect ratio: Automatic 
        supported: Automatic, 4:3, 16:9
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 92 
        supported: 92
    non-desktop: 0 
        range: (0, 1)
  1920x1200 (0xa1) 154.000MHz +HSync -VSync *current
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1920x1080 (0xa2) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
  1920x1080 (0xa3) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
  1920x1080 (0xa4) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
  1600x1200 (0xa5) 162.000MHz +HSync +VSync
        h: width  1600 start 1664 end 1856 total 2160 skew    0 clock  75.00KHz
        v: height 1200 start 1201 end 1204 total 1250           clock  60.00Hz
  1680x1050 (0x4b) 119.000MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz
        v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz
  1600x900 (0xa6) 108.000MHz +HSync +VSync
        h: width  1600 start 1624 end 1704 total 1800 skew    0 clock  60.00KHz
        v: height  900 start  901 end  904 total 1000           clock  60.00Hz
  1280x1024 (0x52) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1440x900 (0xa7) 88.750MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock  55.47KHz
        v: height  900 start  903 end  909 total  926           clock  59.90Hz
  1280x720 (0xa8) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1280x720 (0xa9) 74.250MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
        v: height  720 start  725 end  730 total  750           clock  50.00Hz
  1280x720 (0xaa) 74.176MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
        v: height  720 start  725 end  730 total  750           clock  59.94Hz
  1024x768 (0x67) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x76) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  720x576 (0xab) 27.000MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
        v: height  576 start  581 end  586 total  625           clock  50.00Hz
  720x480 (0xac) 27.027MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
        v: height  480 start  489 end  495 total  525           clock  60.00Hz
  720x480 (0xad) 27.000MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
        v: height  480 start  489 end  495 total  525           clock  59.94Hz
  640x480 (0xae) 25.200MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
        v: height  480 start  490 end  492 total  525           clock  60.00Hz
  640x480 (0x85) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x400 (0xaf) 28.320MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
        v: height  400 start  412 end  414 total  449           clock  70.08Hz

编辑2:

在grep 2560日志中查看后,我查看/var/log/syslog并发现以下几行:

Nov 25 13:57:04 laptop systemd[1606]: Starting GNOME Shell on X11...                        
Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): EDID vendor "BOE"
Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Printing DDC gath
Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x10
Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x10
Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (--) modeset(0): HDMI max TMDS fre
Nov 25 13:57:04 laptop gnome-shell[1853]: Failed to use stored monitor configuration: Invalid mode 2560x1440 (59.864616) for monitor 'HPN HP E273q'

这就是启动时发生的事情。如果我尝试通过更改分辨率xrandr,我会得到:

Nov 25 13:09:47 laptop gnome-shell[1853]: Failed to use stored monitor configuration: Invalid mode 2560x1440 (59.864616) for monitor 'HPN HP E273q'                                                   
Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Allocate new frame buffer 4480x1440 stride                                                                                 
Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (EE) modeset(0): failed to set mode: Invalid argument                                                                                       
Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Allocate new frame buffer 3840x1200 stride                                                                                 
Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): EDID vendor "BOE", prod id 1703                                                                                            
Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Printing DDC gathered Modelines:                                                                                           
Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x1080"x0.0  138.78  1920 1968 2000 2080  1080 1083 1088 1112 +hsync -vsync (66.7 kHz eP)                     
Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x1080"x0.0  111.02  1920 1968 2000 2080  1080 1083 1088 1112 +hsync -vsync (53.4 kHz e)                      
Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (--) modeset(0): HDMI max TMDS frequency 250000KHz

编辑3:

我可以在 30 Hz 下获得 2560x1440 以使用xrandr. 只是 60.00(或 55、或 59.9 等)不起作用。

multiple-monitors xrandr display-resolution intel-graphics hdmi
  • 3 个回答
  • 7238 Views
Martin Hope
Brandon
Asked: 2020-10-21 13:51:52 +0800 CST

带有外接显示器的 Gnome 3 标准亮度控制

  • 3

Gnome 的内置亮度控制适用于我的笔记本电脑显示器,但我希望它也能改变外接显示器的亮度。我已经想出了如何使用xrandr来控制外接显示器的亮度¹,并且我还找到了一种dbus基于 - 的方法来控制我的笔记本电脑显示器的亮度²,这似乎与 Gnome 的操作方式相对应。

我知道我可以设置自定义键盘快捷键来运行我自己的脚本,但是当我更改设置时,我失去了 Gnome 显示的漂亮的弹出式亮度显示。真的,我只想用我的亮度键来控制两台显示器,我可以想出很多不同的方法:

  1. 我可以使用 Gnome 的本机亮度控制注册我的外接显示器,以便它同时控制两者吗?
  2. 否则,我可以在 Gnome 完成后使用默认亮度控制来运行我自己的脚本吗?
  3. 或者,作为最后的手段,是否有一个类似于 Gnome 的简单工具来触发我自己的亮度弹出窗口?

我不需要帮助编写脚本或将它们附加到按键上。我试图弄清楚我不知道如何调整或挂钩标准 Gnome 功能。或者如果我不能,如果有一种简单、标准的方式来显示类似于 Gnome 的临时弹出显示。

¹我可以通过以下方式控制我的两台显示器,尤其是我的外接显示器xrandr:

xrandr --current --verbose # list all display devices
xrandr --output DP-3 --brightness N # N varies from 0.0 to 1.0, where 0 is literally black

² 我只能通过gdbus以下命令控制我的笔记本电脑显示器:

gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepUp
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepDown
xrandr brightness gnome-shell dbus
  • 1 个回答
  • 1135 Views
Martin Hope
Alex Cristea
Asked: 2020-10-20 00:26:10 +0800 CST

无法连接其他显示器,联想 L470

  • 1

无论我尝试哪种连接方式(VGA、HDMI 通过 DisplayPort、DVI 通过 DisplayPort),显示器都没有收到笔记本电脑的信号。我有 Ubuntu 20.04 和 Windows 10 的双启动,所以我在 Windows 上尝试过它并且没有问题。我的猜测是 ubuntu 出了点问题。所以我尝试向 xrandr 添加模式,尝试重新安装图形驱动程序,我尝试了较旧的内核版本,但没有任何效果。

输出xrandr:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected primary 1920x1080+0+0 0mm x 0mm
   1920x1080     77.00*

输出lshw -C -display:

*-display UNCLAIMED       
       description: VGA compatible controller
       product: HD Graphics 620
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:f0000000-f0ffffff memory:e0000000-efffffff ioport:e000(size=64) memory:c0000-dffff

的输出dpkg --get-selections | grep mesa

libegl-mesa0:amd64              install
libgl1-mesa-dri:amd64               install
libgl1-mesa-dri:i386                deinstall
libgl1-mesa-glx:amd64               install
libglapi-mesa:amd64             install
libglu1-mesa:amd64              install
libglx-mesa0:amd64              install
mesa-utils                  install
mesa-va-drivers:amd64               install
mesa-vdpau-drivers:amd64            install
mesa-vulkan-drivers:amd64           install

如果你能帮助我,我很高兴。

有任何想法吗?

multiple-monitors xrandr laptop intel-graphics lshw
  • 1 个回答
  • 110 Views
Martin Hope
Bravo2bad
Asked: 2020-09-28 23:00:31 +0800 CST

升级后分辨率被重置,Xrandr 无法获取输出默认值的 gamma 大小

  • 2

我在Ubuntu 20.04上,升级后,我的分辨率在重新启动时被重置。我从1920x1080分辨率变为800x600。

我通常使用arandr来调整我的分辨率,但现在我只有 800x600 选项。我的输出被命名VGA或类似的东西。现在它被称为default.

当我输入命令xrandr -q时,我得到了这个:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 800 x 600, current 800 x 600, maximum 800 x 600
default connected 800x600+0+0 0mm x 0mm
   800x600       75.00*

有人可以帮我紧急解决这个问题吗?像这样工作几乎是不可能的。

顺便说一句,我已经尝试过这些: 尝试添加新的屏幕分辨率 和https://stackoverflow.com/questions/47391669/xrandr-displaying-failed-to-get-size- of-gamma-for-output-default没有任何成功。

当我输入 thislspci | grep VGA时,我得到了这个输出:

01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] (rev a1)

我真的不知道这是否重要,但我看到人们在几篇文章中给出了他们的 GPU 规格。

xrandr display-resolution display
  • 1 个回答
  • 6482 Views
Martin Hope
Justanothermatt
Asked: 2020-08-11 08:58:28 +0800 CST

如何将屏幕旋转为纵向模式

  • 1

我已经尝试了迄今为止发现的大多数解决方案,但仍然无济于事。我有一台运行 Ubuntu 18.04.4 的 29 英寸宽屏戴尔显示器。首先我进入显示设置并尝试切换到纵向模式,它让我退出,我重新登录,没有任何改变。我尝试横向翻转,它工作得很好.

接下来,我尝试使用各种xrandr命令(见下文)

xrandr 命令

xrandr --output HDMI-1 --rotate right
xrandr -o right

如果需要,我可以获得任何输出日志,我只是不知道你们可能需要查看哪个。我认为问题中最奇怪的部分是风景在两个方向上都有效,但纵向在任何一个方向上都不起作用。在此先感谢您的帮助:)

multiple-monitors xrandr display hdmi orientation
  • 1 个回答
  • 430 Views
Martin Hope
Toby Eggitt
Asked: 2020-08-07 09:35:19 +0800 CST

为会话配置监视器?

  • 0

我有三台显示器连接到我的 Ubuntu 18.04 盒子,我正在努力让它们自动配置我想要的方式。它们都默认工作,但我需要选择哪个是主要的,并配置分辨率、位置和缩放因子。就我而言,我认为常规的“设置->设备->显示”是不够的。有两个原因,首先,似乎没有选择主监视器的方法,其次,我需要一个小数比例因子,并且设置仅提供 100% 或 200%。

我编写了一个简单的脚本来使用 xrandr 实现我想要的,并且在我登录后手动执行时它可以工作。我想要并且到目前为止未能实现的是让这个脚本自动执行。理想情况下,它将在显示登录屏幕之前执行并且对所有用户都有效,但如果它仅在登录后立即发生的初始化期间执行就足够了。

到目前为止,我尝试将脚本添加为 /etc/rc5.d/S01configure-monitors,这似乎部分有效,但肯定不能正常工作。我还尝试将其添加为 /etc/X11/Xsession.d/45configure-monitors 和 .../97configure-monitors。这两个也失败了(尽管我能够验证所有位置变体都导致脚本被执行)

这样做的正确方法是什么?

TIA,托比。

multiple-monitors xrandr desktop-environments display gnome-session
  • 1 个回答
  • 81 Views
Martin Hope
Deepak Mishra
Asked: 2020-06-21 04:55:03 +0800 CST

自定义分辨率 Ubuntu 20.04

  • 3

我最近安装了 Ubuntu 20.04 LTS,和往常一样,显示分辨率选项只有 1024x768 和 800x600。我的显示器是AOC e943Fwsk,它不正式支持1920x1080。但我也在这台电脑上安装了 Windows 10,通过 Radeon软件我可以添加自定义分辨率,所以我添加了1920x1080并且它可以工作。在额外信息的监视器设置菜单中,它显示:

resolution: 1920(H)X1080(V)
H.Frequency: 68KHz
V.Frequency: 60Hz

现在的问题是当我尝试使用xrandr在 ubuntu中设置1920x1080分辨率时,我的显示器显示。我不明白为什么它在 Windows 中有效,但在 ubuntu 中无效。也许模式行需要修改,但我不知道要修改什么。 之后,我尝试添加1600x900并且它可以工作,但在监视器菜单中显示额外信息:input not supported

resolution: 1440(H)X900(V)
H.Frequency: 56KHz
V.Frequency: 60Hz

但是ubuntu中的分辨率是1600x900。Active Signal Resolution我知道这是我知道如何在 Windows 中解决但在 ubuntu中Desktop Resolution没有任何想法的区别。但这不是主要问题。问题是添加1920x1080。我在 Radeon 软件和 Windows 设置中附加了自定义分辨率信息。

这是我所做的:

$ cvt 1920 1080
output: # 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync80
$ xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
$ xrandr --addmode DVI-0 "1920x1080_60.00"

之后,此分辨率被添加到设置中,因此更改为它,但是input not supported。

在此处输入图像描述

在此处输入图像描述

xrandr display-resolution 20.04 modelines
  • 1 个回答
  • 21033 Views
Martin Hope
Stonecraft
Asked: 2020-06-20 00:35:56 +0800 CST

启动脚本中的 Xrandr 命令无效,但脚本确实从终端运行和命令工作

  • 1

我似乎无法在启动时获得 xrandr 命令来旋转我的显示器。

剧本:

cat /etc/X11/Xsession.d/999_test                                                                                                     
xrandr --output DVI-D-3 --off --output HDMI-3 --off --output VGA-1 --mode 1920x1080 --pos 0x0 --rotate left --output DVI-D-2-1 --off --output DP-2-1 --off --output DP-2-2 --off --output HDMI-2-1 --off --output DP-2-3 --off --output DisplayPort-1-3 --off --output DisplayPort-1-4 --off --output DisplayPort-1-5 --off --output HDMI-A-1-1 --off --output DVI-D-1-1 --off

xclock &

并且脚本本身正在运行,因为如果我添加xclock &到脚本的末尾,我会使用 xclock 启动我的会话,但我的屏幕没有旋转(直到我从终端运行命令)

登录后,如果我运行

 sh /etc/X11/Xsession.d/999_test

它完全按预期工作,旋转我的显示器并打开 xclock。

我没有看到任何与 xrandr 或我的脚本名称相关的错误~/.xsession-errors。那是我期望找到他们的地方吗?我正在使用 Lubuntu 20.04

编辑:因为我之前一直在使用 LXDE,它的监视器管理不太先进,所以我认为我需要运行它。即使我不需要,我仍然想弄清楚为什么这不起作用。我认为通过以999我的脚本开头命名它会最后执行,因此不会被其他任何东西覆盖。

autostart xrandr lubuntu 20.04 lxqt
  • 1 个回答
  • 1062 Views
Martin Hope
D__
Asked: 2020-06-19 11:08:25 +0800 CST

xrandr 缩放对外部屏幕没有影响,过扫描

  • 1

我正在尝试在 Xubuntu、笔记本电脑和外部屏幕(HP 24w)上设置适当的多显示器 HiDPI 缩放。两者都是 1920x1080,但笔记本电脑是 14 英寸,而外接显示器是 20 英寸。理想的缩放比例是在我的笔记本电脑上放大 1.5 倍(否则一切都太小),在我的外部屏幕上放大 1.0 倍,后者高于前者。

因为我想dwm在 Xorg 上用作我的窗口管理器(没有单独的 DPI 设置),所以我首先设置Xft.dpi: 144了系统范围的 1.5 升级(这按预期工作:笔记本电脑上的一切看起来都很好,外部的一切都很大屏幕),现在我正在尝试使用xrandr. 在浏览了很多解决方案并阅读了手册页之后,我想出了以下命令:

xrandr --dpi 144 --fb 2880x2700 \
       --output HDMI-1-1 --mode 1920x1080 --pos 0x0 --scale 1.5x1.5 \
       --output eDP-1-1 --mode 1920x1080 --pos 0x1620 --scale 1x1

哪个(在我的解释中)应该执行以下操作:创建单个虚拟屏幕,将虚拟屏幕的顶部 3/5(按比例缩小 2/3)提供给外部屏幕;并在笔记本电脑屏幕上显示剩余的底部 1920x1080 像素,无需重新缩放。

差不多就是这样,只是命令在外屏上似乎没有任何效果--scale 1.5x1.5:有一个巨大的过扫描,顶部图像的底部和右侧部分在物理外屏之外。

我在这里错过了什么吗?根据我的谷歌搜索,这似乎是一个可以解决的问题,但我无法通过上述方式成功。我究竟做错了什么?我对此很陌生。

multiple-monitors xorg xrandr display xubuntu
  • 1 个回答
  • 241 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve