4

I installed xcalib using:

sudo apt-get install xcalib

Then I could invert color using:

xcalib -i -a

However after I restarted my computer this is not working. Why?

I tried removing xcalib using both:

sudo apt-get remove xcalib

and

sudo apt-get purge xcalib

and re-installed xcalib.

Still xcalib isn't inverting colors. How do I fix this?

Thanks!

p.s.: My question is different from this as I don't get any error message.

Inspired_Blue
  • 601
  • 2
  • 11
  • 26

3 Answers3

2

I solved that problem by installing the newest version of xcalib, as detailed here:

Firstly, you need to have git, make, cmake, and some libraries:

sudo apt install git cmake make libx11-dev libxrandr-dev libxxf86vm-dev

Then do:

git clone https://github.com/OpenICC/xcalib.git
cd xcalib
cmake CMakeLists.txt
sudo make install

That works even if you do not get an error message. It works on Ubuntu 19.10 and 18.04. Also with Unity desktop manager.

Rodrigo
  • 21
  • 4
1

The problem here is that Ubuntu uses old version of xcalib, that leverages X11 capabilities to change screen output. And there are a numerous issues with that:

  • Newer versions of Ubuntu use Wayland by default instead of Xorg/X11.
  • If you use proprietary nvidia drivers, the required X11 features are not supported either.

So, what to do then, if one of the probable reasons above is your case too? Well, replacing Wayland with Xorg is a trivial task in Ubuntu. But how about drivers? I've been using xcalib for screen modification, like image inversion, and I was very frustrated from the fact, that it stopped working for nvidia drivers! I even tried to live with nouveau (an open-source version), but it was not so stable as the proprietary analog.

Luckily, I found the great solution to the problem! It was described in current thread here. But it was not explained WHY newer xcalib got back to work for all the cases and even beyond! And, I think, it's worth providing more details on that...

If you look into this commit on xcalib github (dated on Feb 17, 2013), you will notice, that one dramatic change in tool's logic was implemented: since that commit XRandr API used instead of old approach, that allows us to easily use newer xcalib versions for most of the cases, that didn't work before!

I missed this neat fix, while was trying to resolve my issue, because after reading, that needed X11 features were not supported, I just decided, that updating xcalib to the recent version would not help, and wasted a lot of my time because of that!

So, you just need to install the last version of xcalib in your system and... this should be enough to make it work again!

0

I had all these same problems on ubuntu 18.4. The following worked (Easiest way to invert colors on Ubuntu 18.04):

git clone https://github.com/zoltanp/xrandr-invert-colors.git
cd xrandr-invert-colors
 # install dependency libxcb-randr0-dev :
sudo make deps-apt
make
sudo make install

... and run with /usr/local/bin/xrandr-invert-colors.

Ahwar
  • 105
tjd
  • 1