Sunday, November 05, 2006

Twinview and Xinerama

I've been having a play (in the midst of studying for exams)!

I wasn't really all that sure about the difference between two terms that I had heard banded about with relation to Dual Head displays: Twinview and Xinerama.

It would appear that while an X server can happily support several screens that aren't linked, Xinerama allows a 'virtual' screen that spans both physical screens (or more, if you are particularly lucky) whereas Twinview was originally a workaround created by nvidia in the days before windows managers and X properly supported more than one monitor. That, at least is my limited understanding of the subject.

I had been running 2 19" TFTs at 1280x1024 in Xinerama using an nVidia 6200 DH. Although, not the speediest card in the world, it was managing admirably, but on occasion, was known to stutter and spit at the thought of having to move windows about.

After some reading some interesting posts on the subject of performance, I decided to try and see if Twinview would be more efficient. Helpfully, xorg.conf examples abound and I was able to tweak my xorg.conf file and without too much trouble, switch from xinerama to twinview.

I was surprised by the significant performance improvement. The next test will be trying to install the new beta nvidia drivers and beryl!

xorg.conf below:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
Identifier "Single screen"
Screen 0 "Screen" 0 0
InputDevice "Mouse" "CorePointer"
InputDevice "Keyboard" "CoreKeyboard"
EndSection

Section "Files"
FontPath "/usr/share/X11/fonts/truetype"
FontPath "/usr/share/X11/fonts/type1"
FontPath "/usr/share/X11/fonts/X11"
EndSection

Section "Module"
Load "GLcore"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection

## I N P U T D E V I C E S ##

Section "InputDevice"
Identifier "Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection

Section "InputDevice"
Identifier "Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

## M O N I T O R S ##

Section "Monitor"
Identifier "F-419-Left"
Option "DPMS"
DisplaySize 386 290
HorizSync 30-82
VertRefresh 40-60
EndSection

Section "Monitor"
Identifier "F-419-Right"
Option "DPMS"
DisplaySize 386 290
HorizSync 30-82
VertRefresh 40-60
EndSection

## D E V I C E S ##

Section "Device"
Identifier "Nvidia6200"
BoardName "GeForce 6200"
BusID "1:0:0"
Driver "nvidia"
VendorName "nVidia"
Option "TwinView" "yes"
Option "TwinViewOrientation" "CRT-1 RightOf CRT-0"
EndSection

## S C R E E N S ##

Section "Screen"
Identifier "Screen"
Device "Nvidia6200"
Monitor "F-419-Right"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

Thursday, October 26, 2006

Edgy Eft

Every morning this week has been met with a significant number of updates screaming for immediate installation and thanks to the handy updates manager, it hasn't been a chore. The reason, of course, for the glut of new packages and fixes is the release of Edgy Eft. The RC has been out for a week now and final release is upon us.

I've had no problems with the updates on my freshly installed desktop machine. I'll have to try a dist-upgrade on my backup server and see if it breaks!

Monday, October 16, 2006

Gnomebaker burnt!

It would appear that the default installation of GnomeBaker doesn't exactly "work".
apt-get install gnomebaker

While, this helpfully downloaded the aforementioned, installed it and created links to it in the Applications menu, trying to write a CD or DVD doesn't work. It would appear that there are some permissions errors and the app can't get access to the drive :o(. Running the app as root using sudo gnomebaker does work, but is hardly a workable solution in the long term!

I'll continue to browse the forum and blogs for some helpful hints, but at the moment, it seems to be: run it using sudo.

Friday, September 22, 2006

Beautiful fonts

To get the fonts on Edgy looking fab, it just takes a second to copy the folloing text to a blank file and save it as .fonts.conf in your home directory (/home/username/)
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>

Thursday, September 21, 2006

Edgy Eft

I decided that with Knot 3 hitting the shelves at Ubuntu, I would take the plunge and install it. Sure, it's a development branch and will be inherently unstable, but I reckon that it will be a good experience to install it, check out some of the new features and report some bugs.

My system spec is as follows:
  • AMD 64 3200 (Venice core)
  • 2 GB Corsair RAM
  • 200G Seagate SATA hard-drive
  • nVidia GeForce 6200 graphics - dual head
Installing Linux has never been simpler. Download your CD image, burn it to CD and pop it in the drive. Restart your machine and wait for the CD to boot (making sure that your BIOS is setup to boot from CD!).

You get presented with a Ubuntu desktop and an "install" icon and after answering some normal setup questions, the installer gets to work, partitioning and installing. My first problem came at restart with this bug:
BUG: Soft lockup detected on !CPU#0
After the machine was restarted manually :o( it booted double quick - we are still waiting for the splash screen so I had to read the log entries during the boot sequence.

Given that I have a GeForce 6200 nVidia card with dual head capabilities and 2 19" flat panels, it would be nice to use them! After getting them to work many times in the past, all it took was a quick apt-get nvidia-glx and copy and pasting my xorg.conf from this blog post. A simple gdm restart with Ctrl-Alt-Backspace later and I'm presented with the nVidia splashscreen and a beautiful Xinerama login screen.

We're in production at the moment, so it was hardly surprising that updates were available for me to install - simple procedure with the update manager and no problems yet.

Following the updates another restart was required and the same bug as above was encountered. I was returned to my desktop to set it up how I like - I would post a screenshot, but the handy screenshot utility is only grabbing half the screen!

First real problem arrived after the restart - trying to load the terminal didn't work. It started to load and ended up quiting before opening up the window... it's a pain, but not a deal braker, I'll just use the terminal (Ctrl+Alt+F1). I copied by backup files back to my Edgy machine and distributed them to their correct locations.

The final part of the upgrade was to get my must have pieces of software installed. To be honest, most are installed by default:
  • Firefox
  • Evolution
  • Gain
  • OpenOffice
  • Gimp
Some however, like my favorite music player (Muine) are not. For this, I needed to add the Universe repository, which is much simpler in Edgy than it was in Dapper (just an obvious tick box in Synaptic). Then searched for muine and added it and all it's handy plugins, gstreamer0.8-mad and gstreamer0.10-fluendo-mp3 for mp3 playback and a great piece of sync software, unison.

And that was it... only took about an hour, which I think has been my quickest reinstall of a system EVER.

I synced the backup repositories with my local machine to ensure that I had all the backups in place and gave unison the chance to create its archives. Copying the 8000+ mp3 files took a little longer than anything else I wanted to do, so the machines got the opportunity to do it overnight!

Friday, September 15, 2006

Ubuntu AMD64 Firefox

A couple of the things that you really want from the internet (on occasion), don't work with the default firefox install from a 64 ubuntu deployment. The two main dealbrakers are flash and java. Real media would be nice, but there are ways round that problem.

I found a nice answer to the problem at the ubuntu forum.

Wednesday, September 13, 2006

File synchronization

I've been searching for a linux based utility that will allow me to synchronise my files. It needs to be able to act as a backup utility and also as a sync utility for my laptop.

I finally found Unison which is only an "apt-get install" step away from Ubuntu users. If you are using unison, the config files are kept in ~/.unison

Running unison is pretty simple and like all good software, it works simply out of the box but provides plenty of advanced features for those who are interested and read the documentation!

Unison notices when you do your first sync and mentions it to you. It then runs through the directory contents and checks that you want to sync it. If you have a directory called scripts and want to sync it with a backup directory called backup, the two examples below show how you would sync local and remote directories.
unison scripts backup
unison scripts ssh://server//path/to/scripts
You'll be prompted for authentication and then all is the same as before. It has to be said that constantly typing paths does get tedious and you can therefore create a config file and place it within the .unison directory. For this example, create a file called scripts.prf:
# You must have exactly 2 root declarations
root = scripts
root = ssh://server//path/to/scripts

# If you wish to ignore files
ignore = Name .*
# ignores all files starting with . - ie. hidden files and directories
To execute the newly saved script, run:
unison scripts
There are many other repositries of information related to unison, such as in-depth discussion and the user manual