On The Road with Vicky Lamburn

The murmurings of another voice in the congregation

Archive for October 15th, 2007

Ecstatic: XrandR 1.2 means decent Linux Screen Management at Last

with 44 comments

Let me sum it up in about three words:

It just works.

Let me kid you not this is huge news. The only downside is that the GUI is not there yet but any one with a basic idea about the terminal and the command line can see this working now in its full glory; in my case I’ve tested it with Ubuntu 7.10 Gusty Gibbon (release candidate.)

Easy Radeon TV Out and Linux

Ok, I’m not sure how well this works on other Radeon GPUs but on my T40 which has a basic Mobility Radeon 7500. A popular chip that has been in many machines from Apple, Dell, other IBMs and many more. But hasn’t it been a complete stupdity basically; no ill meaning meant for those who have made solutions and worked on previous code. Here’s what you need on the command line to enable S-video output:

xrandr --addmode S-video 800x600
xrandr --output S-video --mode 800x600

That’s it. It works.

Only downside is PAL does not seem to work at present (scrambled display) but NTSC works fine. Only downside is many CRT PAL TVs will show NTSC in black and white. However some PAL TVs can cope with 60Hz NTSC signals fine. It works great here!

VGA Output

Ok I have a VGA output on my T40 but it could easily be a DVI output if need be. To mirror generally all you need to do is plug in the display and it works. To see what xrandr has detected as such; type in xrandr at the prompt and ‘magically’ it’s found the resolutions it believes the screen can display though sometimes these can be lies. But mostly it’s correct.

So if I had a 1024×768 main display and wanted to mirror at that resolution, I’d enter:

xrandr --output VGA-0 --mode 1024x768

That’s it.

Turn off Display

Say I wanted to turn off my laptop display:

xrandr --output LVDS --off

Or if I wanted to turn off the DVI output:

xrandr --output DVI-0 --off

Extend Desktop over two displays

(Say my laptop display is 1024×768 and my external display to the right is 1600×1200.)

This requires in my case one tweak to the xorg.conf file on a Radeon 7500 using the ‘radeon’ driver. In the Screen section by default you should see something like:

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc Radeon..."
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "1024x768"
Virtual 2624 1200
EndSubSection
EndSection

The addition is the Virtual line where the size is the maximum width of the displays added together by the height of the biggest resolution height. So in this case the width is 1024+1600 = 2624. Between my laptop and external screen, the latter has the highest vertical resolution so that’s 1200 (instead of 768.)As another example I have a 1400×1050 laptop screen and a 1440×900 external screen so:

  • Width: 1400 + 1440 = 2840
  • Height: (1050 is larger than 900 so…) = 1050
  • So the line to insert is: Virtual 2840×1050

After sorting out the xorg.conf file from the command line after restarting the X Server (Ctrl+Alt+Backspace, Log Out or Reboot) enter:

xrandr --output VGA-0 --right-of LVDS
xrandr --output VGA-0 --mode 1600x1200

That’s it. Not quite as straight forward but still bloody simple. All we need now is a robust GUI and we’re laughing!

Conclusion

This is such a big improvement it’s not funny. This almost brings Linux up to speed with Windows and Mac OS X with regards to screen management. All it needs is a decent robust GUI and I may step up to this challenge…

I believe the radeon, nv and intel drivers support xrandr 1.2. Please let me know if others do. Certainly the radeon driver does.

Written by lilserenity

October 15, 2007 at 9:05 pm