summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-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;
+ }
+ }
}
}