summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/service_harddrake6
1 files changed, 6 insertions, 0 deletions
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;