diff options
author | Anssi Hannula <anssi@mageia.org> | 2013-05-03 22:47:36 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mageia.org> | 2013-05-03 22:47:36 +0000 |
commit | ea14c5b597c2570582461c69d95abff2f7b83845 (patch) | |
tree | 4cfdf8cdba101d266d20f6bd9ea750165db2d93d /lib/Xconfig/monitor.pm | |
parent | 221d409f295746c5b3bab201159b40031bb45c2a (diff) | |
download | drakx-kbd-mouse-x11-ea14c5b597c2570582461c69d95abff2f7b83845.tar drakx-kbd-mouse-x11-ea14c5b597c2570582461c69d95abff2f7b83845.tar.gz drakx-kbd-mouse-x11-ea14c5b597c2570582461c69d95abff2f7b83845.tar.bz2 drakx-kbd-mouse-x11-ea14c5b597c2570582461c69d95abff2f7b83845.tar.xz drakx-kbd-mouse-x11-ea14c5b597c2570582461c69d95abff2f7b83845.zip |
Xconfig: never fallback to assuming a 1024x768 monitor if probing failed
Instead select an automatic "Plug'n Play" monitor (mga#9272).
Diffstat (limited to 'lib/Xconfig/monitor.pm')
-rw-r--r-- | lib/Xconfig/monitor.pm | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm index 2622057..c21e5c2 100644 --- a/lib/Xconfig/monitor.pm +++ b/lib/Xconfig/monitor.pm @@ -10,28 +10,6 @@ use any; use log; -sub good_default_monitor() { - detect_devices::is_xbox() ? 'Generic|640x480 @ 60 Hz' : - arch() =~ /ppc/ ? - (detect_devices::get_mac_model() =~ /^iBook/ ? 'Apple|iBook 800x600' : 'Apple|iMac/PowerBook 1024x768') : - (detect_devices::isLaptop() ? 'Generic|Flat Panel 1024x768' : 'Generic|1024x768 @ 60 Hz'); -} - -sub default_monitor { - my ($card_Driver) = @_; - if (detect_devices::is_virtualbox() || detect_devices::isLaptop() || $card_Driver eq 'siliconmotion' && arch() =~ /mips/) { - # HACK: since there is no way to get the EDID on gdium, the resolution is passed to the kernel - # so we can rely on it - # in vbox, we return Plug'n'Play because the vbox integration addons - # will take care of everything for us - # On laptops the X server should usually be able to autodetect everything. - { VendorName => "Plug'n Play" }; - } else { - good_default_monitor() =~ /(.*)\|(.*)/ or internal_error("bad good_default_monitor"); - { VendorName => $1, ModelName => $2 }; - } -} - my @VertRefresh_ranges = ("50-70", "50-90", "50-100", "40-150"); my @HorizSync_ranges = ( @@ -90,8 +68,8 @@ sub configure_auto_install { foreach my $monitor (@$monitors) { if (!is_valid($monitor)) { - put_in_hash($monitor, default_monitor($card_Driver)); - configure_automatic($monitor) or internal_error("good_default_monitor (" . good_default_monitor() . ") is unknown in MonitorsDB"); + put_in_hash($monitor, { VendorName => "Plug'n Play" }); + configure_automatic($monitor) or internal_error("default monitor is unknown in MonitorsDB"); } } $raw_X->set_monitors(@$monitors); @@ -122,8 +100,7 @@ sub choose { my $merged_name = do { my $merged_name = $merge_name->($monitor); if (!exists $h_monitors{$merged_name}) { - $merged_name = is_valid($monitor) ? 'Custom' : - $merge_name->(default_monitor($raw_X->get_Driver)); + $merged_name = is_valid($monitor) ? 'Custom' : "Plug'n Play"; } $merged_name; }; |