From 07051a296a1335d13f51880245443cb87ba96a73 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Wed, 27 Apr 2011 19:40:18 +0000 Subject: prefer boot display devices when probing cards (fixes at least an issue with an SLI laptop as reported by Maarten Vanraes) --- NEWS | 2 ++ lib/Xconfig/card.pm | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.1