12

I'm using xcalib to invert colors on my computer at home. I have two monitors at work, and unfortunately the xcalib -i -a inverts only one of them (the one I don't want to invert). I haven't found any solutions for this issue so I'm looking for a replacement for xcalib.

The goal is to be able invert only selected monitor's colors or both at the same time. By the way I'm using Mint 13 Mate.

Update: The computer is Dell Optiplex 990 with integrated Intel card.

lspci -k | grep VGA

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

Data from xrandr:

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
VGA1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+   50.0  
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       50.0     60.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   720x576        50.0  
   720x480        59.9  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DP1 disconnected (normal left inverted right x axis y axis)
  • What graphics driver are you using (radeon, fglrx, nvidia, nouveau, …)? This is often relevant with multi-monitor issues. – Gilles 'SO- stop being evil' Sep 9 '13 at 22:06
  • @Gilles check the updated post – tomrozb Sep 10 '13 at 6:15
5

I know it's an old question but I'm answering for posterity. xrandr-invert-colors is a small app which does exactly what we need.

I have both xcalib and xrandr-invert-colors bound to different shortcuts, so that if I do want to invert only my secondary monitor, I can execute both (xcalib will re-invert the primary monitor to normal colours).

Get it at https://github.com/zoltanp/xrandr-invert-colors

3

If you want to invert both screens with one command, you will have to stick with the really nice script:

xrandr-invert-colors

If this is unavailable for you, and it's acceptable to run two commands in one go, use this:

xcalib -i -a -s 0 && xcalib -i -a -s 1

Which will invert both screens at the same time. If you have three or more screens, just append them with && xcalib -i -a -s 2 etc.

I'm on archlinux and prefer the xrandr-invert-colors solution since it is available from the user repository and easy assignable to a keyboard shortcut.

1

NOTE: The OP, myself, and @Marco have confirmed that there is no way to do this with xcalib. I'm leaving this here so that others do not proceed down that path!

I think this xcalib command will do what you want:

$ xcalib -s 1 -i -a

I believe it numbers the screens starting at 0. So a 1 would be the next screen.

excerpt from the xcalib usage output

$ xcalib -help
xcalib 0.8
Copyright (C) 2004-2007 Stefan Doehla <stefan AT doehla DOT de>
THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY!

usage:  xcalib [-options] ICCPROFILE
     or xcalib [-options] -alter

where the available options are:
    -display <host:dpy>     or -d
    -screen <screen-#>      or -s
    -clear                  or -c
    -noaction <LUT-size>    or -n
    -verbose                or -v
    -printramps             or -p
    -loss                   or -l
    -invert                 or -i
    -gammacor <gamma>       or -gc
    -brightness <percent>   or -b
    -contrast <percent>     or -co
    -red <gamma> <brightness-percent> <contrast-percent>
    -green <gamma> <brightness-percent> <contrast-percent>
    -blue <gamma> <brightness-percent> <contrast-percent>
    -alter                  or -a
    -help                   or -h
    -version

last parameter must be an ICC profile containing a vcgt-tag

Example: ./xcalib -d :0 -s 0 -v bluish.icc
Example: ./xcalib -red 1.1 10.0 100.0
  • xcalib does not work with multiple screens, it only inverts one single screen. – Marco Sep 9 '13 at 16:52
  • @Marco - not according to this thread: ubuntuforums.org/showthread.php?t=1482995 – slm Sep 9 '13 at 16:57
  • @Marco - are you the Marco in that thread (the one you included)? As to the thread I referenced I'm not sure what to make of it then? Would the use of the NVidia driver change anything? – slm Sep 9 '13 at 17:02
  • @Marco is right. It doesn't work for me. The xrandr command returns just one screen (0) as 3840x1080. As as mentioned above, only one screen gets inverted with xcalib. – tomrozb Sep 9 '13 at 17:04
  • @toro - I do not have this setup so can not try/reproduce, was only offering the command I found via googling. Seemed like a good lead. Did you happen to try it? I'm curious what it did then for the other guy. – slm Sep 9 '13 at 17:05

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.