Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In order to invert colours on monitor, I invoke:

xcalib -invert -alter

The problem is, that on Dual-Monitor setup it inverts colors only on first screen.

I can not use Compitz gadgets for color inverting, cause my setup is

  • Two rotated (pivot) Monitors

Dual-Screen when both are Piovot is not working with composing on my card.

Xorg seems only solution.

xcalib is great cause I can switch depending on app, immediately.

Cany suggestions, solutions how to invert colors on both screens with xcalib ?

P.S.

-screen parameter does not work:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  130 (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

Here is my xrandr screen configuration:

~$ xrandr                                                                                                                                                              
Screen 0: minimum 320 x 200, current 2400 x 1920, maximum 3840 x 3840                                                                                                  
DFP1 connected 1200x1920+1200+0 left (normal left inverted right x axis y axis) 518mm x 324mm                                                                          
   1920x1200      60.0*+                                                                                                                                               
   1680x1050      60.0 +                                                                                                                                               
   1440x900       59.9 +                                                                                                                                               
   1280x800       60.0 +                                                                                                                                               
   1920x1080      60.0     50.0     30.0     25.0     24.0                                                                                                             
(...)                                                                                                                   
DFP2 connected 1200x1920+0+0 left (normal left inverted right x axis y axis) 518mm x 324mm                                                                             
   1920x1200      60.0*+                                                                                                                                               
   1920x1080      60.0 +                                                                                                                                               
   1776x1000      60.0 +                                                                                                                                               
   1680x1050      60.0 +                                                                                                                                               
   1440x900       59.9 +                                                                                                                                               
   1280x800       60.0 +   75.0                                                                                                                                        
   1152x648       60.0 +                                                                                                                                               
   1600x1200      60.0                                                                                                                                                 
   1400x1050      60.0                                                                                                                                                 
   1280x1024      75.0     60.0                                                                                                                                        
(...)                                                                        
CRT1 disconnected (normal left inverted right x axis y axis)                                                                                                           
CRT2 disconnected (normal left inverted right x axis y axis)   

As you can see, they are rotated - 1200x1920 setup on one virtual screen with maximum 3840 x 3840. I think, that's reason why it's like "one" screen with 2400x1920, splitted on both (so, xcalib applies only to primary one). But, it's only my hypothesis, maybe reason is different.

share|improve this question

4 Answers 4

up vote 2 down vote accepted

The manpage indicates that there is a -screen (short -s) parameter. That should do it! Just use two xcalib commands with different -s parameters.

share|improve this answer
    
I know this. It does not work. Good you've mentioned about it, I've forgotten. I will update my problem statement. –  Grzegorz Wierzowiecki Sep 13 '11 at 21:06
1  
Your xrandr output says you have the Xorg configured as one screen (only Screen 0 at the top). xcalib interfaces directly with Xorg server, so it can't see more screens. I believe you need to configure multiple Screen sections in your /etc/X11/xorg.conf for this to work properly. –  rozcietrzewiacz Sep 13 '11 at 21:32
    
Unfortunately , when I do this, pivot on both screens does not work :(. Thank you for hint, now I know where to look for improvement. –  Grzegorz Wierzowiecki Sep 13 '11 at 22:02
    
Did you try Option "Rotate" in your xorg.conf? Or do you need to rotate the screens after X is started? –  rozcietrzewiacz Sep 16 '11 at 9:41
1  
I'm also looking for a solution, -s 1 doesn't work when dynamically adding screens with --output VGA1 --auto. –  lkraav Jan 2 '12 at 22:11

Try xcalib -d :0 -invert -alter

The -d option refers to the device, and it worked for me when -s didn't

share|improve this answer
    
In my case it does not help... -d :1 -> Can't open display :1 etc. –  Grzegorz Wierzowiecki Nov 24 '12 at 12:59
1  
-d refers to the display, not the device. BTW, I encountered the same problem and would like to know the solution. –  cyker Jan 15 '13 at 1:46

Here is a small utility program that does what you want:

https://github.com/zoltanp/xrandr-invert-colors
share|improve this answer
1  
Please don't just post a link (and useless filler text); include some relevant detail so that there is sufficient context around the answer. –  jasonwryan Nov 5 '13 at 22:13

I've found that advice :

http://ubuntuforums.org/showthread.php?t=1482995

of using "Desktop Effects" (I have such in KDE), there is one that allows of inverting colours of all screens or just selective windows.

Since on my current hardware Compiz or similar stuff works fine, I can take advantage of such "Desktop Effects". However I wonder, how to use such on other window managers (like fluxbox)... but that's topic for separate question :). (P.S. after taking some look into sources of that effect: kwin/.../invert.cpp it looks like it's just adding hooks for processing windows rendered in separate buffers at it's done in compositing window managers, so maybe only KWin is required, with ability to run with other things than KDE - to be experimented ;) )

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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