diff options
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index d69af68bd..3891370ed 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -65,7 +65,7 @@ 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) }); +setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $kernel_major, IS_LAPTOP => bool2text($isLaptop), NOKMSBOOT => $nokmsboot }); my %cfg = getVarsFromSh("$hw_sysconfdir/service.conf"); # default to 'yes' on upgrade: @@ -312,7 +312,13 @@ foreach my $hw_class (@harddrake::data::tree) { $modules_conf->write; } - @added || @was_removed or $cfg{"DETECT_$Ident"} ne 'force' and next; + # When using the Live ISOs, the proprietary driver is enabled or disabled according to which boot + # menu entry is selected. We can use the presence or absence of "nokmsboot" to detect which was + # selected. If persistence is enabled, we must force a reconfiguration if the selection changes. + my $force_xconf = $Ident eq 'VIDEO' && -e '/run/mgalive/persistent' + && $nokmsboot != $previous_kernel_config{NOKMSBOOT}; + + @added || @was_removed || $force_xconf or $cfg{"DETECT_$Ident"} ne 'force' and next; next if $Ident eq 'MOUSE' && $kernel_major ne $previous_kernel_config{KERNEL} && $cfg{"DETECT_$Ident"} ne 'force'; @@ -361,7 +367,9 @@ foreach my $hw_class (@harddrake::data::tree) { modules::load_category($modules_conf, 'bus/usb'); $modules_conf->write; } elsif ($Ident eq "VIDEO") { - next if $noxconf; + # Once an xorg.conf has been created, continue to use it, even if "noxconf" is specified. This + # allows the user to switch back to the free driver without uninstalling the proprietary driver. + next if $noxconf && !($force_xconf || -f '/etc/X11/xorg.conf'); # explicitely NOT read the existing config (eg: new profile with globetrotter) harddrake::autoconf::xconf($modules_conf, {}, member($cfg{SETUP_FB}, qw(NO no)), $cfg{RESOLUTION_WANTED}); $reboot_needed |= after_x_driver_switch(); |