Author Topic: xrandr may be under-utilized  (Read 1049 times)

Offline utu

  • Jr. Member
  • **
  • Posts: 46
xrandr may be under-utilized
« on: September 19, 2011, 05:32:07 PM »
If you're using an LXDE version of Linux, you may have used, or at least seen, lxrandr.
In PCLinuxOS 11.06 mini it comes up with the menu choices PC>More Apps>Config>LX Monitor.

lxrandr is a GUI which uses xrandr. This GUI is a 'convenience' item; the magic is in
the underlying command program. As is often the case, this GUI is not as nearly as smart
as its daemon.  My interest in all this was brought about by PCLinuxOS not giving me
a 1366x768 choice for my laptop display, and insisting on 1024x768 instead. My laptop
uses Intel Mobile 4 Series GM45 graphics.  

There are, of course several work-arounds for this problem; that's a common feature of Linux.
But, I had trouble finding a common work-around for both LXDE and KDE versions of PCLinuxOS.
By far the simplest of all the work-arounds I found was a one-line addition to
/etc/X11/xinit.d/16x11-display: 'xrandr' --output LVDS1 --mode 1366x768'.
More details on this at at http://www.pclinuxos.com/forum/index.php/topic,95077.0.html;
The gist of that thread is as follows: If one enters 'xrandr' with no arguments in a
command line, one gets a result like:
 
[guest@localhost xinit.d]$ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1024x768       60.0 +
   1366x768       60.0*+
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
[guest@localhost xinit.d]$

Initially, my lxrandr only showed three resolution choices, not including 1366x768.
xrandr output indicates four choices, including 1366x768 for my display, LVDS1.
Referring to 'man xrandr' examples you get the idea behind my 16x11-display command line.
That command line could probably be put in /etc/rc.local, but there are other possibilities,
depending on the Linux distribution. I chose xinit.d because I was already in that vicinity
solving a touchpad problem. Now, my lxrandr also shows four choices, including 1366x768.

So, that's the background on my experience with xrandr.  But I think this may be just a hint
at what's available in this program.  Two areas look promising:  multiple displays, and
applicability beyond Intel hardware.

Reading the xrandr man page, you'll discover that the idea behind xrandr is to create a means
of controlling multiple displays. Multiple, right now, being two-displays-per-graphics-unit.
Even my inexpensive laptop has a secondary display output. One might acquire an additional
larger-than-laptop display and try-out this feature. The following link might be a starting
point: http://intellinuxgraphics.org/dualhead.html.  And...

Reading a 2007 Debian wiki page, you'll discover the applicability goes well beyond Intel:
(Quoting http://wiki.debian.org/XStrikeForce/HowToRandR12 for example:)
As of today, the following drivers/boards support RandR 1.2:
    the Intel driver on all boards (since 1.9.91),
    the NV driver on G80 and higher boards (since 2.0.95),
    the ATI driver on r200/r300/r400/r500/r600 boards (since 6.7.191) where RandR 1.2 replaces MergedFB,
    the MGA driver on all boards (since 1.9.99)
    the RadeonHD driver on r500/r600 boards (since 1.1)

So, for these several reasons, that's why I think xrandr may be under-utilized.

« Last Edit: September 23, 2011, 02:00:20 PM by utu »

Offline Kurdistan

  • Full Member
  • ***
  • Posts: 177
Re: xrandr may be under-utilized
« Reply #1 on: September 20, 2011, 06:53:59 AM »
arandr is a xrandr GUI friendly version. When it will appear in the repo, it would be much easier then CLI-way.  :)
Running PCLinuxOS on my USB. PCLinuxOS went bang on me. I have X-u-b-u-n-t-u on my laptop for now. Will give PCLinuxOS a try in the feature.

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1900
  • Certified Windows Hater
Re: xrandr may be under-utilized
« Reply #2 on: September 20, 2011, 07:52:12 AM »
Nice and helpful post. I connect a HDTV (1920X1080) through HDMI to my laptop to watch movies and I'm trying to figure out how to make it work in full HD without needing to restart the OS or reconfigure the resolution every time.

BTW correct your link for intel linux graphics (there is a dot in the end of the link that gives an error :))

For the whole world, you are someone.
For someone, you are the whole world.

Offline utu

  • Jr. Member
  • **
  • Posts: 46
Re: xrandr may be under-utilized
« Reply #3 on: September 23, 2011, 02:05:20 PM »
Thanks for the correction, agmg.
I hope to hear some details on your dual display exploits.