From 37ade89f394d420d645abf89c7bd7e4a8e992415 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 18 Aug 2004 08:51:59 +0000 Subject: force ACPI on a laptop with recent bios --- perl-install/install_steps.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'perl-install/install_steps.pm') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 04b1f55a0..e3e66ee4c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -837,11 +837,16 @@ sub setupBootloaderBefore { if (cat_("/proc/cmdline") =~ /\b(pci)=(\S+)/) { bootloader::set_append($o->{bootloader}, $1, $2); } - if (cat_("/proc/cmdline") =~ /\bacpi=off/) { - bootloader::set_append($o->{bootloader}, acpi => 'off'); - } - if (cat_("/proc/cmdline") =~ /\bacpi=ht/) { - bootloader::set_append($o->{bootloader}, acpi => 'ht'); + if (my ($acpi) = cat_("/proc/cmdline") =~ /\bacpi=(\w+)/) { + if ($acpi eq 'ht') { + #- the user is using the default, which may not be the best + my $year = detect_devices::dmidecode()->{BIOS_Year}; + if (detect_devices::isLaptop() && $year >= 2002) { + log::l("forcing ACPI on a laptop with recent bios ($year)"); + $acpi = 'on'; + } + } + bootloader::set_append($o->{bootloader}, acpi => $acpi); } if (cat_("/proc/cmdline") =~ /\bnoapic/) { bootloader::set_append($o->{bootloader}, 'noapic'); -- cgit v1.2.1