Switching between the Intel 4500HD and ATI 3650 Cards

This has been driving me up the freaking wall. I have a Lenovo T500 with a hybrid Intel 4500HD card and an ATI Radeon Mobility 3650 card. Windows Vista is cool enough to be able to switch between the two for the most part, but this problem has been interesting in Linux.

I've tried both Kubuntu and openSuse Linux distros with erratic results. The main problem, is that the computer will boot and will just have a blank screen, or a blank screen with a cursor on it. I can't switch consoles with the usual ctrl+alt+f1 (or other f-keys for that matter), and get a visual response. I found later that I can sometimes log in and do stuff, although I wont see anything on the screen. Sometimes it just locks up completely.

I thought this would just be a simple matter of swapping out xorg.conf files!

Here's what I learned
The Intel driver that comes with Linux does not play well with the ATI 'fglrx' driver. This is unfortunate, as I've found the fglrx driver is generally more power efficient and supposedly functions better than the open source 'radeon' driver that comes with my distros. This was the primary cause of most of the problems. This was hard to track down, as it initially appeared to be a problem with the DRI and GLX extensions, (which it was, but those were the symptoms caused by the root problem of the drivers fighting).

Also, keep in mind that when defining two separate xorg.conf files, you need to use the 'BusId' setting in your 'Device' section of xorg.conf.

Both xorg.conf files that I used were built with sax2. The only difference between the two, really is the device section.

Solution
If you want to be able to switch between the ATI and Intel cards, you gotta get rid of the 'fglrx' driver. As far as I can tell, these two drivers can't play together at all. This is bad news for all the Lenovo guys out there with these cards.

Configure two xorg.conf files. I called one 'xorg.intel.conf' and the other 'xorg.ati.conf'. Then copy the one that you want to use to '/etc/X11/xorg.conf', reboot, change the setting in the BIOS to the card you want to use, and boot Linux.

If you want to be fancy, you can write a shell script that runs on start up that tries to identify which card is selected in BIOS and copies the file automatically.

I found this script somewhere on a forum (if this is yours, please let me know who you are so I can give credit where credit is due):

#!/bin/bash
#xorg.conf switcher shell script

VIDEO=`/sbin/lspci |grep -i VGA|grep -c ATI`

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.ati.conf /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.intel.conf /etc/X11/xorg.conf
fi

You basically create the file as root in '/etc/init.d', (I called mine xorg_conf as was listed in the instructions I read). You then create a symlink to the run-level you want this to run in. For me, I'm using openSuse, so my simlink was:

ln -s /etc/init.d/xorg_conf /etc/init.d/rc.d/rc2.d/S12xorg_conf

Don't forget to make the file '/etc/init.d/xorg_conf' executable with:

sudo chmod +x /etc/init.d/xorg_conf

Device sections:
INTEL

Section "Device"
  BoardName    "Mobile Intel GM45 Express Chipset"
  Driver       "intel"
  Identifier   "Device[0]"
  Option       "EXANoComposite"
  VendorName   "Intel"
  BusId        "0:2:0"
EndSection

ATI

Section "Device"
  BoardName    "ATI Mobility Radeon HD 3650 (M86 9591)"
  Driver       "radeon"
  Identifier   "Device[0]"
  Option       "Capabilities" "0x00000000"
  Option       "VideoOverlay" "on"
  Option       "OpenGLOverlay" "off"
  Option       "FSAAEnable" "off"
  Option       "FSAAScale" "0"
  Option       "XAANoOffscreenPixmaps" "true"
  VendorName   "ATI"
  BusId        "1:0:0"
EndSection

Comments

Similar problem

Hi, ive got a similar problem, i've a Sony Vaio VGN-Z570FN with an Intel 4500HD and a Nvidia 9300GS. Reading your post i found several similitudes with the issues that im having...
The question is, can you do that the 2 devices work at the same session like in Vista?

Thanks

There is a driver that came with my computer...

My Thinkpad came with a driver that lets me switch the cards on the fly. I think its mainly from ATI. Also, there is a BIOS setting that lets me switch between 'Integrated Graphics', 'Discrete Graphics', and 'Switchable Graphics'. If its on 'Switchable Graphics', the driver can swap back and forth.

Generally, I usually only use the Intel card as I don't game much anymore. When I boot into windows though, I usually just force it into 'Discrete Graphics' mode. (To sum up, I don't really take advantage of it).