summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/service_harddrake6
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 2512fbf36..82a413b19 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -13,6 +13,7 @@
/etc/sysconfig/harddrake2/service.conf
o fix detecting nvidia proprietary driver when checking if current
xorg driver still supports current card (#54943)
+ o auto reconfigure x11 only on first time default driver have changed
o reconfigure X11 driver if current X11 driver is neither one of
currently supported driver for the card for drivers other than ATI
& NVidia too (eg: poulsbo)
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index b16df5901..d709a4fea 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -45,6 +45,7 @@ my $curr_kernel = c::kernel_version();
my ($kernel_major) = $curr_kernel =~ /^(\d+\.\d+)/;
my %previous_kernel_config = getVarsFromSh("$hw_sysconfdir/kernel");
+my %previous_xorg_config = getVarsFromSh("$hw_sysconfdir/xorg");
setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $kernel_major, IS_LAPTOP => bool2text($isLaptop) });
my %cfg = getVarsFromSh("$hw_sysconfdir/service.conf");
@@ -128,6 +129,11 @@ foreach my $device (@devices) {
# but really is just 'nvidia' in xorg.conf:
$card_data->{Driver2} =~ s/(nvidia)-.*/$1/;
+ # 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 (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) {
switch_x_driver($current_driver, $card_data->{Driver}, 'no more supported by this driver');
schedule_warn_about_switch() if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards;