【问题标题】:Xorg increase virtual screen size past 8192 x 8192Xorg 将虚拟屏幕大小增加到 8192 x 8192
【发布时间】:2018-03-16 02:58:33
【问题描述】:

我有一台 4K 显示器 (3840 x 2160) 和两台 QHD 显示器 (2560 x 1440),我想将它们并排放置。但目前这是不可能的,因为所需的水平虚拟分辨率为 8960 像素(3840+2560+2560),但 X 服务器设置的最大(水平)虚拟分辨率为 8192 像素。有什么办法可以将最大虚拟分辨率提高到 8192x8192 像素以上?

到目前为止我已经尝试过什么:

  • 我没有 xorg.conf 文件 - 我尝试自己手动创建一个文件,包括 "Display" 子部分并在其中设置不同的 "Virtual" 值,重新启动后,没有任何变化。
  • 尝试了各种xrandr 命令变体,将--fb 和/或--panning 参数设置为所需的最大值(8960x2160+0+0),再次无济于事。 (输出:xrandr: screen cannot be larger than 8192x8192 (desired size 8960x2160)

我确实在某处(编辑:here)读到了英特尔的图形处理器不支持大于 8192x8192 像素的虚拟屏幕分辨率(我的系统使用 Core i7-6700HQ CPU 和 @ 987654332@ 图形处理器),但遗憾的是我无法确认此信息 - 希望不是这种情况。

编辑:确实可能不是这样:

#: glxinfo -l | grep GL_MAX_TEXTURE_SIZE
GL_MAX_TEXTURE_SIZE = 16384
GL_MAX_TEXTURE_SIZE = 16384

我的 xrandr 输出(目前我的第三台显示器位于右下角,因此虚拟屏幕分辨率为 8192x3600):

Screen 0: minimum 320 x 200, current 8192 x 3600, maximum 8192 x 8192
eDP-1 connected primary 3840x2160+2560+0 (normal left inverted right x axis y axis) 346mm x 194mm
3840x2160     60.00*+
2048x1536     60.00
1920x1440     60.00
1856x1392     60.01
1792x1344     60.01
1600x1200     60.00
1400x1050     59.98
1280x1024     60.02
1280x960      60.00
1024x768      60.04    60.00
960x720       60.00
928x696       60.05
896x672       60.01
800x600       60.00    60.32    56.25
700x525       59.98
640x512       60.02
640x480       60.00    59.94
512x384       60.00
400x300       60.32    56.34
320x240       60.05
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 2560x1440+4519+2160 (normal left inverted right x axis y axis) 527mm x 296mm
2560x1440     59.95*+
2048x1152     59.90
1920x1200     59.95
1920x1080     60.00    50.00    59.94    24.00    23.98
1920x1080i    60.00    50.00    59.94
1600x1200     60.00
1680x1050     59.88
1280x1024     75.02    60.02
1280x800      59.91
1152x864      75.00
1280x720      60.00    50.00    59.94
1024x768      75.03    60.00
800x600       75.00    60.32
720x576       50.00
720x576i      50.00
720x480       60.00    59.94
720x480i      60.00    59.94
640x480       75.00    60.00    59.94
720x400       70.08
DP-2 connected 2560x1440+0+285 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440     59.95*+
1280x720      59.86
HDMI-2 disconnected (normal left inverted right x axis y axis)

【问题讨论】:

  • 很可能您必须编辑源代码以覆盖这些限制
  • 问题中的链接指向一个补丁,但尽管改变了广告限制,它实际上并没有帮助。
  • @LaszloValko 将不胜感激有关如何做到这一点的任何见解。
  • 像 @MarcinOwsiany 一样,我在带有 Polaris 22 XL / Radeon RX Vega M GL 显卡的 HP Spectre x360 上的 openSUSE Tumbleweed 下应用了问题链接中的内核补丁。之后,我可以使用 xrandr 请求宽度大于 8192 像素的配置,但是本机笔记本电脑屏幕会变黑,或者命令会因“配置 crtc”错误而失败。下面的解决方案创建了两个单独的虚拟屏幕,但我宁愿只有一个。硬件应该支持它,但我无法让它工作。如果有人有更多信息,请告诉我们。
  • FTR,有一个补丁集似乎可以解决这个在 intel-gfx 列表上浮动了将近一年的确切问题:lists.freedesktop.org/archives/intel-gfx/2019-January/…

标签: screen-resolution display multiple-monitors xorg external-display


【解决方案1】:

我能够通过以下步骤解决此问题,以生成和修改 xorg.conf 文件并将其放入 /etc/X11/xorg.conf

我在 Ubuntu 16.04 上使用 gnome-session-fallback 使用 metacity,每当我尝试使所有三个全分辨率时,我都会收到有关虚拟大小无法超过 8192x8192 的错误。

我不确定你是否在 gnome unity metacity 上。

在重新启动之前 - 生成一个 xorg.conf.new 文件。

$ sudo X :2 -configure 
# will make a file /home/$USER/xorg.conf.new or ~/xorg.conf.new

$ cat ~/xorg.conf.new |grep Screen|more
Screen      0  "Screen0" 0 0
Screen      1  "Screen1" RightOf "Screen0"
Section "Screen"
Identifier "Screen0"
Section "Screen"
Identifier "Screen1"

例如,我有两个 Screen Sections,我正在尝试使用 3 个监视器 - 我认为您不需要三个 Screen Sections,无论生成什么。

Monitor 1: 3840x2160 x 32 in
Monitor 2: 3840x2160 x 32 in
Monitor 3: 1920x1080 x 22 in

如果您需要高于此大小,请检查您的 glx 是否可以处理 8192x8192 以上。

glxinfo -l | grep GL_MAX_TEXTURE_SIZE
GL_MAX_TEXTURE_SIZE = 16384
GL_MAX_TEXTURE_SIZE = 16384

修改/home/username目录中的xorg.conf.new文件并添加glxinfo命令Virtual 16384中的大小

sudo nano ~/xorg.conf.new

Display 小节下,Depthof 24 在两个部分 Screen 添加 Virtual 16384

 Section "Screen"
 Identifier "Screen0"
 Device     "Card0"
 Monitor    "Monitor0"
 SubSection "Display"
    Viewport   0 0
    Depth     1
 EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     4
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     8
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     15
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     16
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     24
    Virtual 16384 16384  <-- ADD THIS.
 EndSubSection
 EndSection

 Section "Screen"
 Identifier "Screen1"
 Device     "Card1"
 Monitor    "Monitor1"
 SubSection "Display"
    Viewport   0 0
    Depth     1
 EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     4
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     8
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     15
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     16
EndSubSection
SubSection "Display"
    Viewport   0 0
    Depth     24
    Virtual 16384 16384 <-- ADD THIS.
 EndSubSection
 EndSection

xorg.xonf.new 复制到/etc/X11/xorg.conf,然后重新启动。

  sudo cp /home/user/xorg.conf.new /etc/X11/xorg.conf # Modify user
  sudo shutdown -r now

当您重新登录时,将您的显示器设置为 gnomemetacityunity 或任何您使用的。

更新:

重启、注销或解锁后,我发现显示器设置没有保存。

这个可能的gnome 问题可能与此错误有关:

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1292398

这个修复是从这篇帖子的多个答案的一部分中找到的:

https://askubuntu.com/questions/6137/saving-monitor-settings

我更喜欢从终端运行此脚本,因为我在登录后首先打开一个。

首次使用错误配置登录 - 未正确放置显示器:

cd ~/.config
mv ~/.config/monitors.xml{,.bak}

现在使用系统设置设置您的显示器,以创建具有正确设置的新 ~/.config/monitors.xml 文件。

从我的 repo 中复制 Nicolas Bernaerts 的固定脚本:https://raw.githubusercontent.com/alextomko/monitors/master/monitors 并将其放在从终端运行的路径中。

$ ls -l ~/bin
# if you don't have this directory then create it - do not be logged in as root here.

$ mkdir /home/$USER/bin

$ echo $PATH
# should show /home/username/bin if the dir existed or if you had to create.

$ wget -P ~/bin https://raw.githubusercontent.com/alextomko/monitors/master/monitors
$ chmod +x ~/bin/monitors


# Log out, lock, reboot or whatever it takes to make monitor settings lost for you and run the script.
$ monitors

【讨论】:

  • xorg.conf 文件生成对我来说失败:sudo X :2 -configure 或其任何变体(例如,使用不同的屏幕编号,没有 sudo 等)会产生“致命的服务器错误”:Caught signal 11 (Segmentation fault) - Server aborting .为了解决这个问题,我在/etc/X11/xorg.conf.d/ 下添加了一个85-screen.conf 文件,并在其中添加了Screen 部分(完整文件内容here),除非我弄错了,否则它本质上应该与@ 中的相同987654369@ 文件。重新启动但最大虚拟分辨率仍为 8192x8192。我错过了什么吗?
  • 我还在xorg.conf.d/10-monitor.conf 中尝试了一个带有虚拟屏幕部分link 的文件,但它似乎也没有任何效果。我碰巧此时仍然有那个文件,但我认为它没有任何作用。只有在我能够在该xorg.conf.new 文件中生成当前X 配置之后,它似乎才可以与两个屏幕部分上的Virtual 16384 添加一起使用。查看完整的 xorg.conf.new 文件,也许您可​​能需要通过进入 tty 模式并终止您的 x-server 来生成一个这样的过程。
  • 完整的xorg.conf.new 文件link。我可能会尝试类似这个过程,我发现通过在 tty 模式下杀死 lightdm 并在帖子 #3 link 上的以下过程之后执行 sudo X -configure 来进行配置@
  • 你也有intel 对吗? sudo lshw -C video | grep product:xrandr --listproviders。我有一些随机便宜的机载英特尔。也许也可以尝试sudo dpkg-reconfigure xserver-xorg 看看它是否成功并重新尝试生成 xorg.conf。
  • echo $DISPLAY 为我显示:0 所以如果我做任何非活动屏幕:1 :2 :3 :4 :5 :6 :7 and on 任何创建文件的工作。也许你的屏幕# 是:2,值得一试。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-01-14
相关资源
最近更新 更多