不存储多个监视器的设置

我正在运行Ubuntu 12.04。 在联想Thinkpad T400上。 我将外接显示器连接为第二个显示器 。 笔记本电脑站在外部屏幕下。 笔记本电脑的原始分辨率为1440×900(16:10),外接显示器为1280×1024(5:4)。 有两个图形适配器:一个内置Intel GMA 4500 MHD和一个独立的ATI卡。 目前,已启用集成的Intel

我使用Displays应用程序来安排显示器的位置,使它看起来像这样:

所需的显示配置

问题:
每当我重新启动计算机时,配置都会丢失。 首先,显示镜像而不是扩展 。 我必须按Fn + F7两次才能切换到扩展模式。 其次, 显示设置仍然如下所示:

重启后的Diplay配置

我知道这在我运行Ubuntu 10.10时工作过一次。 我无法分辨,因为它不起作用。 你知道如何永久存储设置吗?


有时当我启动Ubuntu并按Fn + F7时没有任何反应。 当我打开显示器 I并将外部屏幕放在上面并按“应用”按钮时没有任何反应。 然后,大约一分钟后,设置突然应用。 你知道是否有一个日志文件可以帮助分析行为?

您可以采取两种基本方法。 第一种是利用randr ,它允许您创建一个大型虚拟显示器,您可以在其中放置显示器。 第二个是利用xinerama ,它允许你有2个单独的X屏幕,它们将作为一个大显示器。 我将在这里介绍两者,您可以决定哪种更适合您的需求。


RandR – resize和旋转

您可以使用XRandR动态启用双头

xrandr --output foo --above bar 

这个叫做arandr的gui前端也在12.04 repos中,但看起来你想要一个更静态的配置。

它可以像创建/etc/X11/xorg.conf.d/10-monitor.conf一样简单,内容如下:

 Section "Monitor" Identifier "Monitor0" EndSection Section "Monitor" Identifier "Monitor1" Option "Above" "Monitor0" EndSection 

此方法意味着randr设置。 如果将xrandr与不同分辨率的显示器一起使用,则存在一些明显的缺点。 Windows可能放置不当,一个屏幕上可能有黑色区域等。

在没有命令行选项的情况下运行xrandr时 ,您可以找到需要在10-monitor.conf中使用的标识符 。 然后重新启动Ubuntu以查看是否已加载设置。


Xinerama要启用xinerama,您需要修改/etc/X11/xorg.conf

 Section "ServerFlags" Option "Xinerama" "true" EndSection 

它可能很简单,因为X非常适合基于硬件检测自动配置事物。 但是,如果只是打开xinerama扩展程序并不能提供您想要的function,您可以选择完全配置X以使用xinerama 。 有几种方法可以配置X.你可以在/etc/X11/xorg.conf.d/中有多个文件,一些用于监视器,一些用于设备等。我将介绍一个xorg.conf文件,包含使用我当前设置的修改版本的所有设置。

 Section "ServerLayout" Identifier "DualHead" Screen 0 "Screen0" 0 0 Screen 1 "Screen1" Above "Screen0" Option "Xinerama" "1" # You can specify xinerama here EndSection Section "Device" Identifier "Device0" # A Device section for each monitor Driver "nvidia" # Specify the driver to use VendorName "NVIDIA Corporation" BoardName "GeForce GT 430" BusID "PCI:1:0:0" # Use lspci | grep VGA to find BusID Screen 0 # Do note the screen number EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GT 430" BusID "PCI:1:0:0" Screen 1 # Do note the screen number EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Gateway HX2000" HorizSync 31.0 - 83.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "DELL 1907FPV" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 EndSection 

显然你需要修改它以适合你的硬件,但基本的骨架就在那里。

请注意,我最近读过英特尔可能xinerama有关的问题 。 您可能会发现自己需要使用独立显卡。

我不确定这是否有效,但值得一试:禁用英特尔; 启用ati; 安装专有的ati / amd驱动程序; 按照您的需要配置双显示器桌面; validationamd催化剂软件(admin)中的配置; 检查您的设置现在是否持久。 我有一个桌面,但使用催化剂工具是我能够保持双显示器设置持久性的唯一方法。

您可以在〜/ .xprofile中手动设置多个监视器设置。 例如,要将永久额外的监视器设置到主监视器的左侧,我输入〜/ .xprofile,如下所示:

 xrandr --output VGA1 --left-of LVDS1 

所有信息都来自Ubuntu wiki: https : //wiki.ubuntu.com/X/Config/Resolution