diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-23 11:19:41 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-23 11:19:41 +0000 |
commit | 378cf6e8d966283db0e05c4727867a53c94c5663 (patch) | |
tree | 414c4be9074d52db50d0e798b5d69ca1c90ec774 /lib/Xconfig | |
parent | e3445ee77906f98107f37ed8fdb3d20eeb07322a (diff) | |
download | drakx-kbd-mouse-x11-378cf6e8d966283db0e05c4727867a53c94c5663.tar drakx-kbd-mouse-x11-378cf6e8d966283db0e05c4727867a53c94c5663.tar.gz drakx-kbd-mouse-x11-378cf6e8d966283db0e05c4727867a53c94c5663.tar.bz2 drakx-kbd-mouse-x11-378cf6e8d966283db0e05c4727867a53c94c5663.tar.xz drakx-kbd-mouse-x11-378cf6e8d966283db0e05c4727867a53c94c5663.zip |
- XFdrake:
o if the EDID gives a valid EISA_ID, a valid 16/10 preferred resolution, but
no HorizSync/VertRefresh, use a generic flat panel HorizSync/VertRefresh
reproduced on a Elonex PLC - MSI Notebook PR600, EISA_ID CMO1526
Diffstat (limited to 'lib/Xconfig')
-rw-r--r-- | lib/Xconfig/monitor.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm index 6d67478..1e7795f 100644 --- a/lib/Xconfig/monitor.pm +++ b/lib/Xconfig/monitor.pm @@ -164,8 +164,14 @@ sub configure_automatic { add2hash($monitor, $mon); log::l("EISA_ID corresponds to: $monitor->{ModelName}"); } elsif (!$monitor->{HorizSync} || !$monitor->{VertRefresh}) { - log::l("unknown EISA_ID and partial DDC probe, so unknown monitor"); - delete @$monitor{'VendorName', 'ModelName', 'EISA_ID'}; + if ($monitor->{preferred_resolution} + && Xconfig::xfree::resolution2ratio($monitor->{preferred_resolution}) eq '16/10') { + log::l("no HorizSync nor VertRefresh, using preferred resolution (hopefully this is a flat panel)"); + add2hash($monitor, generic_flat_panel($monitor->{preferred_resolution})); + } else { + log::l("unknown EISA_ID and partial DDC probe, so unknown monitor"); + delete @$monitor{'VendorName', 'ModelName', 'EISA_ID'}; + } } } elsif ($monitor->{VendorName}) { if (my $mon = find { $_->{VendorName} eq $monitor->{VendorName} && $_->{ModelName} eq $monitor->{ModelName} } monitors_db()) { @@ -271,7 +277,7 @@ sub probe_using_X { $resolution = eval($resolution) or return; if (my $res = $resolution->[0]{preferred_resolution}) { - generic_flat_panel_($res->{X}, $res->{Y}); + 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" }; @@ -280,11 +286,15 @@ sub probe_using_X { sub probe_DMI() { my $res = detect_devices::probe_unique_name('Resolution'); - $res && generic_flat_panel($res); + $res && generic_flat_panel_txt($res); } sub generic_flat_panel { my ($resolution) = @_; + generic_flat_panel_($resolution->{X}, $resolution->{Y}); +} +sub generic_flat_panel_txt { + my ($resolution) = @_; my ($X, $Y) = $resolution =~ /(\d+)x(\d+)/ or log::l("bad resolution $resolution"), return; generic_flat_panel_($X, $Y); } |