I'm trying to change the contrast with xcalib
with the command xcalib -co 70
but I get the following error:
Error - unsupported ramp size 0
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityThis is actually a bug as reported upstream in debian and various other places. It seems newer version of X caused this. A user reported a workaround for intel drivers and it worked for me.
First of all, do make sure that the appropriate drivers are actually installed: $ sudo apt install xorg xserver-xorg-video-intel
You need to create a xorg .conf
file to force usage of intel drivers. Create a file /etc/X11/xorg.conf.d/20-intel.conf
and put these lines there.
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
EndSection
On Ubuntu 18.04 and newer, the file /etc/X11/xorg.conf
should contain Driver "intel"
under the Section "Device"
. The Identifier
may be called differently.
Now reboot or restart X (sudo systemctl restart display-manager
).
On Ubuntu 16.04 and earlier
The other answer has worked for me quite well.
On Ubuntu 18.04
I came across this thread stating that the xcalib
in the Ubuntu repository is too old - built in 2008. There have been updates to the xcalib repository. So, you can clone the git repository from there, and build and install.
Firstly, you need to have git, make and cmake:
sudo apt install git cmake make
You will also require the following libraries:
sudo apt install libx11-dev libxrandr-dev libxxf86vm-dev
And the main steps:
git clone https://github.com/OpenICC/xcalib.git
cd xcalib
cmake CMakeLists.txt
sudo make install
You can uninstall by running:
sudo make uninstall
One (those new to Linux) can search for these by
apt-cache search [some-keyword]
Besides,
My Experience
For me (on XPS 9570) (and at least one more), the other solution didn't work on Ubuntu 18.04 - it simply didn't work, besides the fact that it disables brightness keys. I have relied on that solution for inverting screen colours for quite some time - it did work on (X)Ubuntu 16.04, Debian Stretch.
Now, thanks to google - I have been googling since more 3 days - to me, it seems google keeps searching for your query when you're offline, so that it can give you more relevant results when you search for it again.
As described by @Serge Stroobandt I created the /etc/X11/xorg.conf.d/20-intel.conf
file and put these lines there
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
EndSection
This eliminated the 'unsupported ramp size' error but created a new missing letters issue. I then proceeded to modify /etc/X11/xorg.conf.d/20-intel.conf
to contain the following body. This fixed the missing letters issue. But now I take a big performance hit. I wish there was a better solution. I tried @WorkWise Tweak Tool > Fonts > Antialiasing change from Subpixels Antialiasing to Standard Grayscale Aliasing
but it didn't fix the missing letters issue.
For now just put this body in your 20-intel.conf
file and that's as good as it's going to get.
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
EndSection
Option "AccelMethod" "string"
Select acceleration method. There are a couple of backends available for accelerating the DDX. "UXA" (Unified Acceleration Architecture) is the mature backend that was introduced to support the GEM driver model. It is in the process of being superseded by "SNA" (Sandybridge's New Acceleration). Until that process is complete, the ability to choose which backend to use remains for backwards compatibility. In addition, there are a pair of sub-options to limit the acceleration for debugging use. Specify "off" or "none" to disable all acceleration, or "blt" to disable render acceleration and only use the BLT engine.
Default: use SNA (render acceleration)
-a
or-alter
as described in this previous Q&A How to adjust contrast with xcalib