summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/service_harddrake
diff options
context:
space:
mode:
authorPaulo Ricardo Zanoni <pzanoni@mandriva.com>2010-04-07 19:41:14 +0000
committerPaulo Ricardo Zanoni <pzanoni@mandriva.com>2010-04-07 19:41:14 +0000
commitb762333e6db825702e1690eeed341ab3e7092a2f (patch)
treeee74044873c954444e10f36e35ddb393e1be0d74 /perl-install/standalone/service_harddrake
parentc646a434058f4b734b34d48e5cf287799a35418e (diff)
downloaddrakx-b762333e6db825702e1690eeed341ab3e7092a2f.tar
drakx-b762333e6db825702e1690eeed341ab3e7092a2f.tar.gz
drakx-b762333e6db825702e1690eeed341ab3e7092a2f.tar.bz2
drakx-b762333e6db825702e1690eeed341ab3e7092a2f.tar.xz
drakx-b762333e6db825702e1690eeed341ab3e7092a2f.zip
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
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-xperl-install/standalone/service_harddrake26
1 files changed, 19 insertions, 7 deletions
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;
+ }
+ }
}
}