summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2011-04-27 19:40:18 +0000
committerAnssi Hannula <anssi@mageia.org>2011-04-27 19:40:18 +0000
commit07051a296a1335d13f51880245443cb87ba96a73 (patch)
treeb902c70ddc11017579e7de326af09286d076e5cf /lib
parent0da6af78aaed13218c892e5134d780af476f3df4 (diff)
downloaddrakx-kbd-mouse-x11-07051a296a1335d13f51880245443cb87ba96a73.tar
drakx-kbd-mouse-x11-07051a296a1335d13f51880245443cb87ba96a73.tar.gz
drakx-kbd-mouse-x11-07051a296a1335d13f51880245443cb87ba96a73.tar.bz2
drakx-kbd-mouse-x11-07051a296a1335d13f51880245443cb87ba96a73.tar.xz
drakx-kbd-mouse-x11-07051a296a1335d13f51880245443cb87ba96a73.zip
prefer boot display devices when probing cards (fixes at least an issue
with an SLI laptop as reported by Maarten Vanraes)
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/card.pm4
1 files changed, 3 insertions, 1 deletions
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;