我有一个集成的 ION GPU,它由专有驱动程序支持,但我始终无法让开源驱动程序工作。我希望左侧屏幕正常,但右侧屏幕旋转。我该如何实现这一目标?
答案1
我花了一段时间才解决这个问题,所以我想与其他人分享。我假设 nvidia 驱动程序 和nvidia-settings
已安装。 (在 Arch 上,运行sudo pacman -S nvidia nvidia-utils
。)
首先,我们需要生成一个xorg.conf
using nvidia-settings
.从 GUI 终端运行sudo nvidia-settings
.
- 从左侧菜单中选择“X 服务器显示配置”。
- 在右侧,将“配置”更改为“单独的 X 屏幕(需要重新启动 X”)。
- 选中“启用 Xinerama”。
- 点击“保存到X配置文件”;
/etc/xorg.conf
会起作用,或者您可以将其作为新文件添加到/etc/xorg.conf.d
- 例如/etc/xorg.conf.d/10-monitors.conf
.
现在,我们需要编辑这个文件。在您最喜欢的编辑器中将其打开为root
.例如,运行gksu gedit /etc/xorg.conf
或sudo vim /etc/xorg.conf
.
找到正确的Section "Screen"
.我通过找到正确的Section "Monitor"
然后找到相应的来做到这一点Section "Screen"
。
找到看起来像这样的行
Option "metamodes" "DFP-1: 1920x1080 +0+0"
并添加{ Rotation=Left }
,所以它看起来像
Option "metamodes" "DFP-1: 1920x1080 +0+0 { Rotation=Left }".
笔记
DFP-1
可能是DFP-0
,具体取决于您正在旋转的显示器;决议也可能有所不同。
例子
我的xorg.conf
读法如下
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 28
Screen 1 "Screen1" 1280 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbLayout" "gb"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "HP w2228h"
HorizSync 24.0 - 83.0
VertRefresh 48.0 - 76.0
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL 1703FP"
HorizSync 30.0 - 80.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "ION"
BusID "PCI:3:0:0"
Screen 1
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "ION"
BusID "PCI:3:0:0"
Screen 0
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "On"
Option "Stereo" "0"
Option "metamodes" "DFP-1: 1920x1080 +0+0 { Rotation=Left }"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "On"
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP-0: 1280x1024 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection
参考
答案2
最新版本的闭源 NVIDIA 驱动程序似乎支持 randr(请参阅http://www.phoronix.com/scan.php?page=news_item&px=MTA5NTY)。只需使用最新的驱动程序和您选择的 RandR 前端即可。例如,arandr 允许您移动显示器并改变它们的方向。