xrandr: a command set to fix your display(s)

Here you can post about your various experiences with PC hardware. You can also post about hardware that is not compatible with the linux kernel or not recommended for use with Porteus.
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

xrandr: a command set to fix your display(s)

Post#1 by francois » 14 Mar 2014, 03:12

I am starting this thread to accumulate some knowledge on xrandr, a command very useful to fix one or two screens attached to a computer computer.

In this first post the information comes from a thread I first issued on the slax forum. The link is here:
http://old.slax.org/forum.php?action=vi ... ostid30879 :evil: link no more available.

General instructions.
Porteus usually provides the maximum screen size possible for the screens attached to your computer. Xrandr commands easily fix dual display problems. To help with your display or screen difficulties please provide make and model of your screen and the output in command line of:

Code: Select all

xrandr

1.0 Fixing a single screen resolution xrandr.
See the experience of @Petr.kx, who was caught with a resolution under the one that could be attained with his display:
http://www.slax.org/forum.php?action=vi ... ostid37773 :evil: link no more available.

Here Petr.kx wanted to add a resolution 1400x900 with a frequency of 60 that was not provided stock by the xorg.conf setting:

Code: Select all

root@slax:~# gtf 1400 900 60
 # 1400x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 104.23 MHz
 Modeline "1400x900_60.00" 104.23 1400 1480 1632 1864 900 901 904 932 -HSync +Vsync
 root@slax:~# xrandr --newmode "1400x900_60.00" 104.23 1400 1480 1632 1864 900 901 904 932 -HSync +Vsync
 root@slax:~# xrandr --addmode VGA "1400x900_60.00"
2.0 Dual Monitors and xrandr. The Aptosid manual on xrandr (formerly Sidux):
http://manual.aptosid.com/en/hw-dev-mon-en.htm

3.0 Adjusting colors and brightness with xrandr: the gamma specification (this section is experimental, I am not sure that what I proposed is the real thing. However, the links are good and merit in depth reading and testing):
http://unix.stackexchange.com/questions ... -and-color
http://www.normankoren.com/makingfineprints1A.html
http://www.normankoren.com/makingfineprints1A.html

An ideal gamma configuration 1.05:1.15:1.136:
http://archive09.linux.com/articles/113936

Here is an example to correct your screen to what should be the right gamma values with the xrandr commands. This is about my dual display install, here the VAG1 display is corrected to the right gamma values:

Code: Select all

root@porteus:~# xrandr -q | grep connected
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 353mm x 198mm
VGA1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 477mm x 268mm
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
root@porteus:~# xrandr --output VGA1 --gamma 1.05:1.15:1.136
4.0 Links on xrandr.
There is very few well documented hyperlinks on xrandr, here are my best ones, XStrikeForce/HowToRandR12 - Debian Wiki:
http://wiki.debian.org/XStrikeForce/HowToRandR12

The xrandr manual:
http://www.x.org/archive/X11R7.5/doc/ma ... ndr.1.html

And finally, an interesting thread on Grandr, a graphic interface for xrandr.
http://freshmeat.net/projects/grandr_applet/

I hope these links will be useful.

No problem if it is not the case, just come with your questions. :wink:

Note: Tell us more about your hardware when you have problems with your display. From:
http://old.slax.org/forum.php?action=vi ... ntID=52631
1) the manufacturer and model of your display could be quite useful.
2) the manufacturer and model of your linux box and of the graphic card. The graphic card spec:

Code: Select all

lspci |grep VGA
lspci |grep Ethernet 
or if not positive

Code: Select all

lspci
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: xrandr: a command set to fix your display(s)

Post#2 by francois » 13 Sep 2014, 21:33

For reading purposes, a dimmer screen brightness is easier on the eye. This could be also a way to save on your laptop batteries.

Unable to adjust the second display (the stand alone) of my laptop installation thru kde settings, I found this interesting solution using xrandr that I have adapted:
http://askubuntu.com/questions/149054/h ... via-script
1.0 Get the xrandr tag for your the standalone display, here mine was VGA1:

Code: Select all

root@porteus:~# xrandr
Screen 0: minimum 320 x 200, current 2806 x 900, maximum 32767 x 32767
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1366x768       60.2*+
...
VGA1 connected primary 1440x900+1366+0 (normal left inverted right x axis y axis) 410mm x 256mm
   1440x900       59.9*+
...
On a scale from 0.0 to 1.0 adjust the brightness of your given screen or of both screens.

Code: Select all

root@porteus:~# xrandr --output VGA1 --brightness 0.5 
Or

Code: Select all

oot@porteus:~# xrandr --output VGA1 --brightness 0.5 --output LVDS1 --brightness 0.5
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: xrandr: a command set to fix your display(s)

Post#3 by francois » 04 Jul 2015, 18:59

xrandr error message fix for 'failed to get size of gamma for output default' :
https://bugs.launchpad.net/ubuntu/+sour ... ug/1078695
viewtopic.php?f=81&t=4774&start=15
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: xrandr: a command set to fix your display(s)

Post#4 by francois » 25 Jul 2015, 03:58

Added the pertinency of the hardware components and command to fetch the graphic card.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: xrandr: a command set to fix your display(s)

Post#5 by francois » 28 Jul 2015, 02:27

Adjusting to the right gamma values. An example is given in the first post.8)

But as an afterthought, gamma adjustment must be more complicated than I thought at first. :(
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

xrandr: a command set to fix your display(s)

Post#6 by francois » 25 Oct 2017, 01:38

Modified the information on the first post. This information on xrandr is really still useful. :)
Voltaire: Le mieux est l'ennemi du bien.

Post Reply