xrandr killed my video! How do I get dvi0 back?

I have a new machine with OpenSUSE 11.2 and KDE 4.3. I have 2 monitors. The second monitor is set to extend the screen to the right. Everytime I logged on, I had to reset the resolution to auto and set the second monitor to the right. The setup didn’t seem to be remembered and kdm definitely fell to the smaller resolution when I logged off.

I stopped using krandr because it did strange things (it always seemed to wipe out the setup when I simply started it), and used xrandr. When I queried, using xrandr, it showed the main monitor on DVI0 and the second monitor on VGA2. The hardware and commands used are shown below.

I created a bash script to activate and deactivate the second monitor using the 2 commands below. It was working nicely. On, off, on, off, it was exactly what I wanted. I added it to my KDE auto start through the Computer Setting dialog. I tried it a couple of times in succession but then something happened.

The main monitor is gone, and by gone I mean orange light, grub complains about the vga= resolution (“undefined video mode” and doesn’t show higher resolutions). I only have the second monitor/VGA2 and when I query xrandr it shows DVI0 shows disconnected!. When I boot, I see the console messages on DVI0, but as soon as it gets to kdm, it switches to VGA2 and DVI0 has no video signal. To add weirdness, when I do a clt-alt-f1 it appears on DVI0.

How do I get DVI0 back?

How do I get automatic hardware detection back?


Thank you.

Monitors and Video Card:
Main Monitor: Acer AL2216W bd
Resolution: 1680x1050
Second Monitor: Sceptre X96-Naga II
Resolution: 1280x1024
Video: GEFORCE 9600 GT 1GB DDR3
Driver: OpenSUSE nv

xrandr --output DVI0 --auto --pos 0x0 --output VGA2 --auto --right-of DVI0

xrandr --output DVI0 --auto --pos 0x0 --output VGA2 --off

The problem is fixed. Yeh! But I’m not sure what solved it. Argh.

I tried many things, including different monitors, live cd, making sure everything was powered down/then powering up. The Spectre monitor was connected with a vga-dvi adapter, that has been changed to a direct dvi.

I now have both monitors. It works, and it actually works better now. I am no longer using the nv driver but the nvidia, and I now have an xorg.conf file w/twinview.

Some reference pages:
Configuring graphics cards/Dual Head Mode - openSUSE

Multiple Screens Using XRandR - openSUSE