Ok, so after having been into town, done a bit of shopping, stopped for a pint and a bowl of spicey chicken noodles, I thought I would have another try.
I managed to get some success by adding the lines listed in bold below to the 'screen' section of /etc/X11/xorg.conf
Code:
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: NULL; DFP-1: nvidia-auto-select +0+0, DFP-0: NULL"
EndSection
This now means that I can switch to my external monitor by using:
and back again to the laptop display panel using:
However, there is one flaw, and that is that unless X is started with the external monitor attached, xrandr does not display the correct modes. For example, if X is started with the external monitor, xrandr shows:
Code:
Screen 0: minimum 1280 x 800, current 1600 x 1200, maximum 1600 x 1200
default connected 1600x1200+0+0 0mm x 0mm
1280x800 50.0
1600x1200 51.0* 50.0
Great, the two resolutions we need, but if X is started without the External monitor attached:
Code:
Screen 0: minimum 320 x 240, current 1280 x 800, maximum 1280 x 800
default connected 1280x800+0+0 0mm x 0mm
1280x800 50.0*
1152x768 51.0
1024x768 52.0
800x600 53.0 54.0
640x480 55.0
640x384 56.0
576x384 57.0
512x384 58.0
400x300 59.0 60.0
320x240 61.0
So by having to restart X to get xrandr to recognise the correct resolutions it defeats the whole point of the excersise!
I think I may be at a dead end now because it seems that only the Open Source nvidia driver supports hot plugging, and if I'm going to be going back to the open source driver, I might as well use xrandr like this:
Code:
xrandr --output LVDS --mode off;xrandr --output DVI1 --mode auto
Then I don't have to mess around with metamodes.
I think all this combined with the way some apps still loose their title bar when running compiz means that hacking around trying to get the proprietary driver to work just ain't worth it at the moment.
But the chicken noodles and beer deserve full credit for my progress this afternoon.