LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 06-23-2007, 11:17 AM   #1
Veskit
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
Problem : 2 Graphic Cards !!!!


Hello,

I've just installed Ubuntu Feisty (amd64) on my vaio SZ4, and of course I want to make both graphic cards work (INTEL GMA 950 an Geforce 7400 Go)
I've found some explanation on how to make a "xorg-switcher"

1) I've installed Feisty with intel GMA 950 all is working great (3D, beryl ....)

2) Then I wanted to install NVIDIA 7400, everything is great with nvidia drivers, my xorg.conf is edited and all is working (3D, beryl ...)

3)I'm preparing the xorg-switcher having a xorg.conf.stamina (for intel GMA) and xorg.conf.speed (for nvidia). I'm creating a xorg switcher

Quote:
#!/bin/bash
#switch xorg

VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
fi
then
# chmod +x /etc/init.d/xorg-switcher
# ln -s /etc/init.d/xorg-switcher /etc/rc2.d/S12xorg-switcher
ok the switcher is working great my 2 cards are working

BUT ! when I switch to the intel GMA and check for "direct rendering" I have

Quote:
$ glxinfo | grep direct

Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ": 0.0".
Error: couldn't find RGB GLX visual
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ": 0.0".
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0 ".
Installing NVIDIA drivers have removed "direct rendering" for intel GMA

can someone help me with that ? I've lost 3D acc on intel GMA and can't use beryl

I'm a big newb on ubuntu I've just starded....

Recently I've just found this:here

and after making a :
libglx.so.stamina, and libglx.so.1.stamina
(when intel GMA was working in phase 1))

libglx.so.speed, and libglx.so.1.speed
(when Geforce 7400 was working in phase 2))

I edited my xorg-switcher

Quote:
#!/bin/bash
#switch xorg

VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf-speed /etc/X11/xorg.conf
modprobe drm
modprobe nvidia-agp
rm /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/libGL.so -f
ln -s /usr/lib/xorg/modules/extensions/libglx.so.speed /usr/lib/xorg/modules/extensions/libglx.so
ln -s /usr/lib/libGL.so.1.speed /usr/lib/libGL.so.1
else
modprobe intel-agp
cp -f /etc/X11/xorg.conf-stamina /etc/X11/xorg.conf
rm /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/libGL.so -f
ln -s /usr/lib/xorg/modules/extensions/libglx.so.stamina /usr/lib/xorg/modules/extensions/libglx.so
ln -s /usr/lib/libGL.so.1.stamina /usr/lib/libGL.so.1

fi
But it's still not working plz if someone can help me, It's been 4 days that I'm spending days and nights to fix this problem and I think i'm getting pretty close...

Thanks a lot

Veskit

if you find an answer plz email me : takayanagi_masataka@hotmail.com
 
Old 06-23-2007, 11:55 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I don't know about Ubuntu, but when the nVidia drivers are installed on a Fedora system from the nVidia driver script, the X11 rendering library is replaced by a "better" one from nVidia. Unfortunately, this "better" library is not compatible with other manufacturer's X11 library usage.

If this is the cause of your problem, you'll need to have your "switcher" also switch the library, and prevent pre-linking X.org.
 
Old 06-24-2007, 05:56 AM   #3
Veskit
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by PTrenholme
I don't know about Ubuntu, but when the nVidia drivers are installed on a Fedora system from the nVidia driver script, the X11 rendering library is replaced by a "better" one from nVidia. Unfortunately, this "better" library is not compatible with other manufacturer's X11 library usage.

If this is the cause of your problem, you'll need to have your "switcher" also switch the library, and prevent pre-linking X.org.
Ok, and do you know where I can find those libs ? I mean, it's just switching 2 files but I really don't know where they can be.

/usr/lib/libGL.so and /usr/lib/xorg/modules/extensions/libglx.so are not enough ?

Thanks,

Veskit
 
Old 06-24-2007, 12:10 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Sorry, no. Being lazy, I just use the RPMs from livna built for Fedora systems. You might find the information you want in the "sticky" note at the top of the Fedora forum where the problem is described, with links to some discussions.

Perhaps you can identify which (if any) xorg libraries were modified by looking for "unexpected" creation or modification dates on the library files.

Remember, though, that I don't even know if what I described actually applies to your system.

Too get the "original" libraries, it might be simplest to boot to level 3, uninstall the Xorg stuff, and reinstall it (being careful to not uninstall dependencies (like, for example, all you graphic application)). If Ubuntu has tools like apt or smart for managing software, perhaps a simple "repair" operation might set things right. (Note: Foregoing is speculation, and not recommendation for action until you have verified that it will solve your problem. Also, a good, complete, backup of your system before messing around might be a good thing® to have available.)
 
Old 06-26-2007, 03:20 AM   #5
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Like PTrenholme mentioned, your pc will use nvidia opengl library even thought currently use intel(Easy to say that, they conflict!). So, the way I recommend use another kind of method to install/reinstall display driver before startx.

probably you can use a script in /etc/init.d/rc.local to perform this job:-
Quote:
#/bin/bash
BRAND=`lspci | grep "VGA" | awk '{print $5}'`
if [ $BRAND eq 'nVIDIA']
step to reinstall/reconfigure your nvidia driver
else
step to remove nvidia driver
step to reinstall your intel driver

fi
Since you did configure display driver properly for nvidia before, then I assume you get what i mean.
*Please reply us how you do this.

Regards,
Ks
 
Old 06-26-2007, 03:53 AM   #6
Veskit
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by kstan
Like PTrenholme mentioned, your pc will use nvidia opengl library even thought currently use intel(Easy to say that, they conflict!). So, the way I recommend use another kind of method to install/reinstall display driver before startx.

probably you can use a script in /etc/init.d/rc.local to perform this job:-


Since you did configure display driver properly for nvidia before, then I assume you get what i mean.
*Please reply us how you do this.

Regards,
Ks
First of all thanks PTrenholme and kstan for your help. After one week of research I finally found GLX libs and manage to adapt the switcher script. Day by Day I'm getting more used to Linux (especially Ubuntu)

I can't post the script atm because I'm at work but basically it's even more simple than "desinstall/reinstall", all you have to do is :

if nvidia then
replace xorg.conf by xorg.conf.nvidia
remove GLX intel
similink of GLX nvidia (2 files to replace)
else
replace xorg.conf by xorg.conf.intel
remove GLX nvidia
similink of GLX intel (2 files to replace)

the point that I missed is that the 2 GLX libs are not at the same place if it's nvidia or intel

intel libglx.so is in /usr/lib/xorg/extension/modules
and nvidia one is in /usr/lib/xorg/extension

so you musn't mess with the path (which I did )

Everything is ok now !

Thanks a lot for your support and fast replies

Veskit
 
Old 06-27-2007, 04:07 PM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
<edit>
I was thinking about what you'd written above, and it struck we that just redefining the syslinks might be (slightly) more efficient.

Here's some (untested) code that might do that for xorg.conf, and (if it does), the library symlink changes could easily be added. Please note the "untested" comment.
Code:
#!/bin/bash
#
# Switch xorg.conf to an alternative conf file:
#
# Note: If this script is not run with "root" privelages,
#       the user running it must have permission to run
#       commands set in /etc/sudoers
#
#-----------------
#
# Save the current directory location and move to /etc/X11
#
pushd /etc/X11/ > /dev/null
#
# Verify that the current xorg.conf is a symlink, and save it if it's not
#
# Note that, for example, installing a new device, may result in a new xorg.conf being created.
if ! [ -h xorg.conf ]
then
    sudo mv -b xorg.conf xorg.conf.save
    sudo ln -s xorg.conf.save xorg.conf
fi
#
# Identify the desired new conf file
#
# This section assumes that all alternate conf files are named xorg.conf.name
# If another convention is used, you will need to change this section.
#
type=""
let count=0
for file_name in `ls xorg.conf*`
do
    ext=$(echo $file_name | cut -f 3 -d '.')
#   Check for an extension name
    if [ -z $ext ]
    then
#       No extension found.
        continue
    else
#       Found one, increment the count and add it to the list
        let count=++count
        type="$type $ext"
    fi
done
# Did we find any alternatives?
if [ $count -eq 0 ]
then
    echo No alternative configuration files were found in $(pwd).
    popd > /dev/null
    exit 0
fi
# Found some. Get the name of the one to use.
if [ $count -gt 0 ]; then
    echo Enter the number corresponding to the configuration you want to load.
    select conf in $type
    do
      if [ -z conf ];
      then
          echo No changes made. >> /dev/stderr
	  popd > /dev/null
          exit 1
      else
          target=$conf
          break
      fi
    done
else
# We should never get here (count would have to be negative)
    echo Impossible condition: count=$count which is less than 0. Aborting. >>/dev/stderr
    popd > /dev/null
    exit 2
fi
#
# O.K., we're changing to $target (if we've got a target)
#
if ! [ -z $target ] # This should always be true
then
    sudo rm xorg.conf
    sudo ln -s xorg.conf.$target xorg.conf
else
# But, in case it isn't . . .
    echo No new configuration file was selected. >> /dev/stderr
fi
#
# All done. Reset the working directory and exit.
#
popd > /dev/null
</edit>

Not a question you asked, but the livna solution (of linking nVidia to it's own library set with "non-standard" names) lets you actually use an nVidia card and another vendor's card at the same time. (On different monitors, of course.)

So, if you want the "real linux experience", you can set up a media wall with several monitors and drive them all off of one box, using different cards. Most "modern" cards support two different monitors, so, with five boards you could run a 3 x 3 screen array.

Just a thought . . . (And, no, I've never tried it. You need more money than I have to play in that league.)

Last edited by PTrenholme; 06-28-2007 at 03:17 PM.
 
Old 06-27-2007, 07:24 PM   #8
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Quote:
Originally Posted by Veskit
First of all thanks PTrenholme and kstan for your help. After one week of research I finally found GLX libs and manage to adapt the switcher script. Day by Day I'm getting more used to Linux (especially Ubuntu)

I can't post the script atm because I'm at work but basically it's even more simple than "desinstall/reinstall", all you have to do is :

if nvidia then
replace xorg.conf by xorg.conf.nvidia
remove GLX intel
similink of GLX nvidia (2 files to replace)
else
replace xorg.conf by xorg.conf.intel
remove GLX nvidia
similink of GLX intel (2 files to replace)

the point that I missed is that the 2 GLX libs are not at the same place if it's nvidia or intel

intel libglx.so is in /usr/lib/xorg/extension/modules
and nvidia one is in /usr/lib/xorg/extension

so you musn't mess with the path (which I did )

Everything is ok now !

Thanks a lot for your support and fast replies

Veskit
Honestly speaking, I have same problem with you and I not yet fix it(Normally I run in speed mode).
 
Old 06-29-2007, 03:42 AM   #9
Veskit
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
PTrenholme I've tried to read 3 time your script but I guess i'm too nwb yet to test the "real Linux experience"
But since kstan have the same problem i'm gonna write a little "howto" (excuse my bad english and my newbiness)

First of all, you have to be in stamina mode with 3D rendering ok
(reinstall Intel driver is the fastest way if it's not working)

Backup the xorg.conf and the libs GLX, something like :

Quote:

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.stamina
# cp /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.stamina
# cp /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.stamina
Then install Nvidia drivers

Quote:

# apt-get install nvidia-glx-new
# nvidia-xconfig --composite --add-argb-glx-visuals -d 24
in your xorg.conf add 2 lines

Quote:

# gedit /ect/X11/xorg.conf

Section "Screen"
...
Option "TripleBuffer" "true"
Option "NoLogo" "true"
...
EndSection
Reboot and test nvidia 3D rendering

if it's ok, backup the nvidia xorg and GLX libs (I'm at work I don't remember exactly the name of the libglx.so)


Quote:

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.speed
# cp /usr/lib/xorg/modules/libglx.so.1.0.955 /usr/lib/xorg/modules/libglx.so.speed
# cp /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.speed
Now edit the xorg-switcher it should be something like :

Quote:

# switcher stamina / speed mode

VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
modprobe drm
modprobe nvidia-agp
rm /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/libGL.so.1 -f
ln -s /usr/lib/xorg/modules/libglx.so.speed /usr/lib/xorg/modules/libglx.so
ln -s /usr/lib/libGL.so.speed /usr/lib/libGL.so.1
else
cp -f /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
modprobe intel-agp
rm /usr/lib/xorg/modules/libglx.so /usr/lib/libGL.so.1 -f
ln -s /usr/lib/xorg/modules/extensions/libglx.so.stamina /usr/lib/xorg/modules/extensions/libglx.so
ln -s /usr/lib/libGL.so.stamina /usr/lib/libGL.so.1
fi

It should be ok

Veskit

Last edited by Veskit; 06-29-2007 at 03:51 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphic cards well supported by Linux, any brand? tirengarfio Linux - Hardware 5 12-04-2006 09:57 AM
Graphic cards, especially VIA and/or nVIDIA grautu Linux - Hardware 2 09-11-2006 06:46 AM
Two screens on separate graphic-cards. Possible on linux? Ac1db0rN Linux - Software 2 03-13-2005 09:16 AM
suse 9.1 freezing with multiple graphic cards. jasonlife SUSE / openSUSE 0 01-17-2005 03:53 PM
Is there any comparsion chart available for graphic cards? lamiczka Linux - Hardware 1 02-17-2004 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration