jca*_*314 6 ubuntu xorg xrandr monitors
我必须使用 VGA 转 DVI 电缆和 HDMI 电缆来运行两台显示器。我正在尝试反转两台显示器上的颜色,但我只能反转其中之一:
$ xcalib -invert -alter -s 0 #works
$ xcalib -invert -alter -s 1
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 129 (XFree86-VidModeExtension)
Minor opcode of failed request: 19 (XF86VidModeGetGammaRampSize)
Value in failed request: 0x17
Serial number of failed request: 10
Current serial number in output stream: 10
Run Code Online (Sandbox Code Playgroud)
我拔下 HDMI 电缆并重新插入。现在,该xcalib -invert -alter -s 0命令反转另一个监视器。换句话说,两台显示器暂时都倒置了,但我必须重新连接一台显示器才能实现这一点。
这是我的设置:
$ xrandr
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 510mm x 287mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x720 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
720x400 70.1
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
1920x1080 60.0*+
1680x1050 59.9
1280x1024 60.0
1440x900 59.9
1280x720 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
720x400 70.1
Run Code Online (Sandbox Code Playgroud)
显卡:
$ lspci |egrep -i vga
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS880 [Radeon HD 4200]
Run Code Online (Sandbox Code Playgroud)
这是带有 gnome 面板的 Ubuntu 服务器 12.04 LTS。该问题仍然出现在 Ubuntu 14.04 上,但解决方法不起作用。
小智 2
您将无法使用 xcalib 来反转显示器。您必须使用以下实用程序来克服此限制。
请注意,截至上次测试(2014 年,xcalib 版本 0.8)时,xcalib 尚无法反转多显示器设置中所有显示器上的颜色,因为所有显示器均由 X11 服务器呈现为单个屏幕。因此,这个限制来自 X11 服务器。xrandr-invert-colors 没有这个限制,因为它使用 XRandR API,它可以正确处理所有连接的显示器。
参考: https: //github.com/zoltanp/xrandr-invert-colors