Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Swapping between ATI and NVIDIA cards

  1. #1
    Join Date
    Mar 2010
    Beans
    3

    Swapping between ATI and NVIDIA cards

    Hello,

    I am running Ubuntu 9.10. My work requires me to frequently swap video cards between an ATI Radeon 5870 card and an NVIDIA GeForce 8800 GTX card. My question is: can the ATI driver (fglrx - catalyst 10.2) and the NVIDIA driver (nvidia 190.29) co-exist? Or do I need to reinstall the driver every time I change the card? I would like for the drivers to be able to co-exist so it would only be a matter of restarting my machine with the new card and choose the right xorg.conf file (perhaps from the GRUB menu). Is this possible?

    Thank you,

    Rodrigo

  2. #2
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    I have seen a post on the Arch forum where someone had made a script that allowed them to choose between two different graphic cards.

    I'll have a look & see if I can find it again.

    If you can't deal with bash script, I'm sure that if a I post it here someone will help you.

    First things first though, I need to find it for you.

  3. #3
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    No, sorry, it is a script for choosing between two xorg.conf files re. twin screen output, though I suspect it should be able to be used with little modification for your purposes, I hope?

    http://bbs.archlinux.org/viewtopic.p...712359#p712359


  4. #4
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    If you do get this to work for you, please post back here with the code so others can benefit from your experience?

    Thanks.

  5. #5
    Join Date
    Jun 2007
    Beans
    12,532

    Re: Swapping between ATI and NVIDIA cards

    I think it may be possible if you make sure fglrx's libGL.so and libglx.so aren't overwritten when you install the nvidia driver. You would also need to direct the nvidia driver to its version of these files in xorg.conf (I know that's possible, but don't remember the exact syntax off the top of my head).
    What would happen if your hard disk died right now?

  6. #6
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    Quote Originally Posted by Temüjin View Post
    I think it may be possible if you make sure fglrx's libGL.so and libglx.so aren't overwritten when you install the nvidia driver. You would also need to direct the nvidia driver to its version of these files in xorg.conf (I know that's possible, but don't remember the exact syntax off the top of my head).
    So the script in the thread I posted previously doesn't solve the problem?

  7. #7
    Join Date
    Jun 2007
    Beans
    12,532

    Re: Swapping between ATI and NVIDIA cards

    Quote Originally Posted by handy View Post
    So the script in the thread I posted previously doesn't solve the problem?
    It allows easy switching between two xorg.confs, so it might be useful, but it doesn't solve the issue with making sure ATI and Nvidia's proprietary versions of the GL/GLX shared libraries play nicely together.
    What would happen if your hard disk died right now?

  8. #8
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    Quote Originally Posted by Temüjin View Post
    It allows easy switching between two xorg.confs, so it might be useful, but it doesn't solve the issue with making sure ATI and Nvidia's proprietary versions of the GL/GLX shared libraries play nicely together.
    Can they be separated into different directories & linked to via script.

    Can that work?

  9. #9
    Join Date
    Mar 2010
    Beans
    3

    Re: Swapping between ATI and NVIDIA cards

    Yes, this works!

    For the GRUB part, I setup a script (DriverSelect.sh) that runs at boot-time as explained on this post:
    http://ubuntuforums.org/archive/inde...t-1287967.html

    For the libraries, I copied the NVIDIA and ATI files for libGL and libglx to a directory outside /usr/lib (f.e. /usr/{nvidia,ati}) and modified DriverSelect.sh to copy the files and create the symbolic links. Here's my DriverSelect.sh:

    Code:
    #!/bin/sh
    if grep -q nvdriver /proc/cmdline
    then
        # setup xorg.conf
        cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
    
        # setup libGL
        cd /usr/lib
        rm libGL.*
        cp /usr/nvidia/libGL.la .
        cp /usr/nvidia/libGL.so.190.29 .
        ln -s libGL.so.190.29 libGL.so.1
        ln -s libGL.so.1 libGL.so
    
        # setup libglx
        cd /usr/lib/xorg/modules/extensions
        rm libglx.*
        cp /usr/nvidia/libglx.so.190.29 .
        ln -s libglx.so.190.29 libglx.so
    else
        # setup xorg.conf
        cp /etc/X11/xorg.conf.fglrx /etc/X11/xorg.conf
    
        # setup libGL
        cd /usr/lib
        rm libGL.*
        cp /usr/ati/libGL.so.1.2 .
        ln -s libGL.so.1.2 libGL.so.1
        ln -s libGL.so.1.2 libGL.so
    
        # setup libglx
        cd /usr/lib/xorg/modules/extensions
        rm libglx.*
        cp /usr/ati/libglx.so .
    fi
    Thanks for your help!

    Rodrigo

  10. #10
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,405

    Re: Swapping between ATI and NVIDIA cards

    I love it when a plan comes together!

    Well done Rodrigo, & thanks for posting your solution, it is bound to help someone else.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •