diff options
author | Anssi Hannula <anssi@mageia.org> | 2011-05-04 20:14:16 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mageia.org> | 2011-05-04 20:14:16 +0000 |
commit | 29ddfae35e834d3658f935bebeb896986a0139ce (patch) | |
tree | e42036e90345f3a5336905217d463adf6ab45d32 /lib/Xconfig | |
parent | cb02523d4f2abebe395d4ab93f8d299492edcde6 (diff) | |
download | drakx-kbd-mouse-x11-29ddfae35e834d3658f935bebeb896986a0139ce.tar drakx-kbd-mouse-x11-29ddfae35e834d3658f935bebeb896986a0139ce.tar.gz drakx-kbd-mouse-x11-29ddfae35e834d3658f935bebeb896986a0139ce.tar.bz2 drakx-kbd-mouse-x11-29ddfae35e834d3658f935bebeb896986a0139ce.tar.xz drakx-kbd-mouse-x11-29ddfae35e834d3658f935bebeb896986a0139ce.zip |
Do not try to probe monitor information via X server on laptops (it
doesn't work with recent X servers).
Diffstat (limited to 'lib/Xconfig')
-rw-r--r-- | lib/Xconfig/main.pm | 2 | ||||
-rw-r--r-- | lib/Xconfig/monitor.pm | 33 |
2 files changed, 4 insertions, 31 deletions
diff --git a/lib/Xconfig/main.pm b/lib/Xconfig/main.pm index 0a63a54..d92c27f 100644 --- a/lib/Xconfig/main.pm +++ b/lib/Xconfig/main.pm @@ -68,7 +68,7 @@ sub configure_everything { my $X = {}; my $ok = 1; - my $probed_info = Xconfig::monitor::probe($raw_X->get_Driver); + my $probed_info = Xconfig::monitor::probe(); $options->{VideoRam_probed} = $probed_info->{VideoRam_probed}; $ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options); $ok &&= $X->{monitors} = Xconfig::monitor::configure($in, $raw_X, int($raw_X->get_devices), $probed_info, $auto); diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm index d3f6688..0fc2c31 100644 --- a/lib/Xconfig/monitor.pm +++ b/lib/Xconfig/monitor.pm @@ -84,7 +84,7 @@ sub configure_auto_install { if (!is_valid($monitors->[0])) { my ($first_card) = Xconfig::card::probe(); $card_Driver = $first_card->{Driver} if $first_card; - put_in_hash($monitors->[0], probe($card_Driver)); + put_in_hash($monitors->[0], probe()); } foreach my $monitor (@$monitors) { @@ -143,7 +143,7 @@ sub choose { local $::noauto = 0; #- hey, you asked for plug'n play, so i do probe! delete @$monitor{'VendorName', 'ModelName', 'EISA_ID', 'HorizSync', 'VertRefresh'}; if ($head_nb <= 1) { - if (my $probed_info = probe($raw_X->get_Driver)) { + if (my $probed_info = probe()) { put_in_hash($monitor, $probed_info); } else { log::l("Plug'n Play probing failed, but Xorg may do better"); @@ -213,8 +213,7 @@ sub is_valid { } sub probe { - my ($o_card_Driver) = @_; - probe_DDC() || probe_DMI() || probe_using_X($o_card_Driver); + probe_DDC() || probe_DMI(); } #- some EDID are much too strict: @@ -285,32 +284,6 @@ sub use_EDID { $monitor; } -sub probe_using_X { - my ($card_Driver) = @_; - - detect_devices::isLaptop() or return; - - $card_Driver ||= do { - require Xconfig::card; - my @cards = Xconfig::card::probe(); - $cards[0]{Driver}; - } or return; - - require modules; - my @old_modules = modules::loaded_modules(); - my $resolution = run_program::rooted_get_stdout($::prefix, 'monitor-probe-using-X', '--perl', $card_Driver); - modules::unload(difference2([ modules::loaded_modules() ], \@old_modules)); - - $resolution = eval($resolution) or return; - - if (my $res = $resolution->[0]{preferred_resolution}) { - generic_flat_panel($res); - } else { - log::l("at least one EDID was found in Xorg.log, so let Xorg autodetect the monitor"); - { VendorName => "Plug'n Play" }; - } -} - sub probe_DMI() { my $res = detect_devices::probe_unique_name('Resolution'); $res && generic_flat_panel_txt($res); |