summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--lib/Xconfig/card.pm4
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 713809a..8a83da8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
- display_driver_helper: do not load radeon driver if the proprietary
driver is temporarily disabled on a PowerXpress system
+- prefer boot display devices when probing cards (fixes at least an issue
+ with an SLI laptop as reported by Maarten Vanraes)
Version 0.95 - 23 April 2011
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index 979de95..7a10606 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -93,12 +93,14 @@ sub probe() {
#- my @c = { driver => 'Card:Matrox Millennium G400 DualHead', description => 'Matrox|Millennium G400 Dual HeadCard' };
my @c = detect_devices::matching_driver__regexp('^(Card|Server|Driver):');
- my @cards = map {
+ # prefer the boot device
+ my @cards = sort { $b->{boot_device} cmp $a->{boot_device} } map {
my @l = $_->{description} =~ /(.*?)\|(.*)/;
my $card = {
description => $_->{description},
VendorName => $l[0], BoardName => $l[1],
BusID => "PCI:$_->{pci_bus}:$_->{pci_device}:$_->{pci_function}",
+ boot_device => chomp_(cat_($_->{sysfs_device} . "/boot_vga")) || 0,
};
if (my ($card_name) = $_->{driver} =~ /Card:(.*)/) {
$card->{BoardName} = $card_name;