summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-18 04:32:40 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-18 04:32:40 +0000
commit191cfc01229ae1b875e6c2c0370d2ed20004a5a4 (patch)
tree70da016e54629489095ef0cefd59cf3c679c6ef3 /perl-install/Xconfig/card.pm
parent735a9fc9852608380814958f3c60e5f203aa4d8b (diff)
downloaddrakx-191cfc01229ae1b875e6c2c0370d2ed20004a5a4.tar
drakx-191cfc01229ae1b875e6c2c0370d2ed20004a5a4.tar.gz
drakx-191cfc01229ae1b875e6c2c0370d2ed20004a5a4.tar.bz2
drakx-191cfc01229ae1b875e6c2c0370d2ed20004a5a4.tar.xz
drakx-191cfc01229ae1b875e6c2c0370d2ed20004a5a4.zip
merge from MDK-10-branch: add support for ATI_GLX and NVIDIA_GLX cohabitation
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index d4ce05c99..0d21dcf7d 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -54,13 +54,16 @@ sub to_raw_X {
$raw_X->get_ServerLayout->{Xinerama} = { commented => !$card->{Xinerama}, Option => 1 }
if defined $card->{Xinerama};
- $raw_X->set_load_module('glx', !$card->{DRI_GLX_SPECIAL}); #- glx for everyone, except proprietary nvidia
+ $raw_X->set_load_module('glx', !$card->{DRI_GLX_SPECIAL} && $card->{Driver2} ne 'fglrx'); #- glx for everyone, except proprietary nvidia
$raw_X->set_load_module('dri', $card->{use_DRI_GLX} && !$card->{DRI_GLX_SPECIAL});
# This loads the NVIDIA GLX extension module.
# IT IS IMPORTANT TO KEEP NAME AS FULL PATH TO libglx.so ELSE
# IT WILL LOAD XFree86 glx module and the server will crash.
$raw_X->set_load_module('/usr/X11R6/lib/modules/extensions/libglx.so', $card->{DRI_GLX_SPECIAL});
+ if ($card->{Driver2} ne 'nvidia') {
+ $raw_X->set_load_module('/usr/X11R6/lib/modules/extensions/libglx.a', 1);
+ }
$raw_X->remove_Section('DRI');
$raw_X->add_Section('DRI', { Mode => { val => '0666' } }) if $card->{use_DRI_GLX};
@@ -309,6 +312,18 @@ sub install_server {
$card->{DRI_GLX_SPECIAL} = 1;
$card->{Options}{IgnoreEDID} = 1;
}
+ my %driver_to_libgl_config = (
+ nvidia => "$::prefix/etc/ld.so.conf.d/.conf.nvidia",
+ fglrx => "$::prefix/etc/ld.so.conf.d/.conf.ati",
+ );
+ if (my $file = $driver_to_libgl_config{$card->{Driver2}}) {
+ if (-e $file) {
+ symlinkf(basename($file), "$::prefix/etc/ld.so.conf.d/GL.conf");
+ }
+ } else {
+ eval { rm_rf("/etc/ld.so.conf.d/GL.conf") };
+ }
+ system("/sbin/ldconfig") if $::isStandalone;
if ($card->{Driver2} eq 'fglrx' &&
-e "$::prefix/usr/X11R6/lib/modules/dri/fglrx_dri.so" &&
-e "$::prefix/usr/X11R6/lib/modules/drivers/fglrx_drv.o") {