5

I must use a VGA-to-DVI cable and a HDMI cable to run two monitors. I'm trying to invert the colors on both monitors but I can only invert one of them:

$ 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

I unplugged the HDMI cable and plugged it back in again. Now, the xcalib -invert -alter -s 0 command inverts the other monitor. In other words, both monitors are inverted for the moment but I had to re-connect one monitor to get that to happen.

Here is my setup:

$ 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  

Graphics card:

$ lspci |egrep -i vga
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS880 [Radeon HD 4200]

This is Ubuntu server 12.04 LTS w/gnome-panel. The problem still occurs on Ubuntu 14.04 but the work-around does not work.

  • What graphics card do you have? What driver (free or proprietary) to you run? – Gilles Mar 6 '14 at 23:47
  • egrep -i "video driver" /var/log/Xorg.0.log shows me X.Org Video Driver: 11.0 – jcalfee314 Mar 7 '14 at 15:21
  • interestingly, in my setup, xrandr says 'Can't open display', most strange! – drevicko Apr 17 '14 at 1:59
  • I have a work-around... It got more complicated with Ubuntu 14.04 (with an extra step to -s HDMI...). Basically, I invert once (one screen) using -s 0 the I unplug and re-plug my HDMI cable. Then I invert again (same screen same command).. Finally I invert -s HDMI-0.. and both monitors are inverted. I can then toggle one of them with the -s 0. So, aside from this being so ridiculous this holds me over. – jcalfee314 Aug 26 '14 at 14:00
2

You won't be able to use xcalib to invert your monitor. You will have to use the following utility to overcome this limitation.

Note that as of date of last testing (2014, xcalib version 0.8) xcalib has not been able to invert the colors on all monitors in a multi-monitor setup, because all monitors are presented by the X11 server as a single screen. Thus this limitation is coming from the X11 server. xrandr-invert-colors does not have this limitation, because it uses XRandR API, which correctly handles all attached monitors.

Reference: https://github.com/zoltanp/xrandr-invert-colors

1

From trial and error xcalib's -screen parameter takes the zero indexed number of your monitor according to your xrandr output, ie, in your case xcalib -s 0 (the default) will control VGA-0 and xcalib -s 1 will control HDMI-0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.