From b762333e6db825702e1690eeed341ab3e7092a2f Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni Date: Wed, 7 Apr 2010 19:41:14 +0000 Subject: Remove 'Disable "dri"' from xorg.conf if nouveau is used Without this, after the upgrade from 2010.0 to 2010.1 X won't start if nv or nouveau was configured --- perl-install/standalone/service_harddrake | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone/service_harddrake') diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index a1ec50cc2..5845ee392 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -134,14 +134,26 @@ foreach my $device (@devices) { # auto reconfigure x11 only on first time default driver have changed: my $new_key = $card_data->{Driver} . $card_data->{Driver2}; setVarsInSh("$hw_sysconfdir/xorg", { XORG_DRV => $new_key }); - next if $previous_xorg_config{XORG_DRV} eq $new_key; + if ($previous_xorg_config{XORG_DRV} ne $new_key) { + if (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) { + my $reason = N("The graphic card '%s' is no more supported by the '%s' driver", + $device->{description}, $current_driver); + switch_x_driver($current_driver, $card_data->{Driver}, $reason); + schedule_warn_about_switch($reason) if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards; + # Update $current_driver with the new one + $current_driver = $card_data->{Driver}; + } + } - if (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) { - my $reason = N("The graphic card '%s' is no more supported by the '%s' driver", - $device->{description}, $current_driver); - switch_x_driver($current_driver, $card_data->{Driver}, $reason); - schedule_warn_about_switch($reason) if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards; - next; + # nv->nouveau or non_kms_nouveau->kms_nouveau can't have "Disable dri"! + if ($current_driver eq "nouveau") { + my $raw_x = Xconfig::xfree->read; + if ($raw_x) { + if (member("dri", $raw_x->get_disabled_modules)) { + $raw_x->remove_disable_module("dri"); + $raw_x->write; + } + } } } -- cgit v1.2.1