summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2011-04-17 11:08:15 +0000
committerAnssi Hannula <anssi@mandriva.org>2011-04-17 11:08:15 +0000
commit39368d9aaea5f9b18e6b03e332bba2268d4a2992 (patch)
treea9bfea15a960298e2b0162f4a5cb588c9f0cbb86
parentefa657fde1008c47b12df6b6464463e7d6699943 (diff)
downloaddrakx-backup-do-not-use-39368d9aaea5f9b18e6b03e332bba2268d4a2992.tar
drakx-backup-do-not-use-39368d9aaea5f9b18e6b03e332bba2268d4a2992.tar.gz
drakx-backup-do-not-use-39368d9aaea5f9b18e6b03e332bba2268d4a2992.tar.bz2
drakx-backup-do-not-use-39368d9aaea5f9b18e6b03e332bba2268d4a2992.tar.xz
drakx-backup-do-not-use-39368d9aaea5f9b18e6b03e332bba2268d4a2992.zip
service_harddrake: Do not switch a display driver if speedboot has already started X
server, in that case simply disable speedboot for next boot.
-rw-r--r--perl-install/NEWS2
-rwxr-xr-xperl-install/standalone/service_harddrake8
2 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 734770470..f206da2ad 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,8 @@
o add/remove nokmsboot boot option if needed when switching the driver
o ask for a reboot after a driver switch if needed, and load the new driver
if no reboot is needed
+ o do not switch a display driver if speedboot has already started X server,
+ in that case simply disable speedboot for next boot
Version 13.42 - 24 February 2011
- increase default disk size to suggest /home partition
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 63104fa57..c47b9fa96 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -198,10 +198,18 @@ foreach my $device (@devices) {
# auto reconfigure x11 only on first time default driver have changed:
my ($should_reconfigure, $reason) = should_reconfigure_x_driver($card_data, $device, $current_driver);
if ($should_reconfigure) {
+ if (-e "/tmp/.X11-unix/X0") {
+ # We are too late, X server is already running.
+ # It was probably speedboot, disable it for next boot.
+ substInFile { s!^$curr_kernel .*\n!! } "/var/lib/speedboot/status" if -e "/var/lib/speedboot/status";
+ # Restore state as we were not able to switch the driver yet.
+ setVarsInSh("$hw_sysconfdir/xorg", { XORG_DRV => $previous_xorg_config{XORG_DRV} });
+ } else {
$reboot_needed |= 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};
+ }
}
# nv->nouveau or non_kms_nouveau->kms_nouveau can't have "Disable dri"!