13

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)
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
tomrozb
  • 325

3 Answers3

6

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

Campbell
  • 230
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.

q9f
  • 2,358
2

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
slm
  • 369,824
  • 1
    xcalib does not work with multiple screens, it only inverts one single screen. – Marco Sep 09 '13 at 16:52
  • @Marco - not according to this thread: http://ubuntuforums.org/showthread.php?t=1482995 – slm Sep 09 '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 09 '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 09 '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 09 '13 at 17:05
  • @Marco - nice to meet you BTW. – slm Sep 09 '13 at 17:05
  • @slm I've tried everything with xcalib. This is why I'm looking for something else, because xcalib simply doesn't work for 2 monitors configuration. – tomrozb Sep 09 '13 at 17:08
  • @toro - OK thanks for clarifying, will not spend any additional cycles on your's or mine's part with xcalib. – slm Sep 09 '13 at 17:09
  • I think it's more promising to use tools that work with two screens (xrandr --gamma, xgamma, redshift, etc.) and find a way to invert the screen. Using xcalib is a dead end in my opinion. I didn't find a good solution, yet. – Marco Sep 09 '13 at 17:12
  • What about this Compiz plugin, Negative: http://wiki.compiz.org/Plugins/Neg? Is Compiz an option? – slm Sep 09 '13 at 17:14
  • @slm That plugin works. But changing the window manager for something as simple as inverting the colours is a bit drastic IMO and might have more side effects that benefits. – Marco Sep 09 '13 at 17:20
  • @Marco - IMO I 100% agree. Just offering it up to the OP to see if it fit his/her needs. Given that was you on the forum thread, can I assume you have a ace up your sleeve and know of a better way? 8-) – slm Sep 09 '13 at 17:22
  • @slm Not really. I tried redshift for a few months, but the red tint is obnoxious. Actually I'm still stuck with xcalib. I mostly use it for insanely designed web pages (white on black) which I just tend to immediately close. And if I really want to read them, I hit a keybinding which moves the browser window to the screen that xcalib operates on and inverts it. It's not perfect, but sufficient for my use case, so I never bothered to really fix it. – Marco Sep 09 '13 at 17:29
  • @Marco I'm using it exactly the same way for now - moving browser tab to the other screen. I'm looking for working solution as simple as xcalib, but working in any conditions. – tomrozb Sep 09 '13 at 17:42