From 9cbb8946287014bbca1f51062914d2d8c68b39e6 Mon Sep 17 00:00:00 2001 From: Felix Endres Date: Wed, 29 Mar 2006 22:18:05 +0000 Subject: New functionality for retrieving the frequency ranges of the monitor from ddcprobe output Yet inclusion into xorg.conf is not activated until it is tested. git-svn-id: http://svn.openslx.org/svn/openslx/ld4@131 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/hwautocfg | 16 +++++++++++++--- initrd/initrd-stuff/bin/screenres | 10 +++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'initrd') diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index cfd2c74a..c09157e2 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -133,6 +133,18 @@ else complete\n or non existant. The $0 script tried for a fully automatic\n\ configuration of display" fi + +#Auskommentiert, da noch nicht getestet +#FIXMEE: Optimiere den dreifachen aufruf von Screenres +#VERTSR=`screenres | sed -n '/Vertical Frequency Range/s/[^0-9]* \([0-9-]*\)/\1/p'` +#HORISR=`screenres | sed -n '/Horizontal Frequency Range/s/[^0-9]* \([0-9-]*\)/\1/p'` +#if [ -n "$HORISR" ]; then +# HS=$HORISR +#fi +#if [ -n "$VERTSR" ]; then +# VS=$VERTSR +#fi + if [ -z "$HS" ] ; then error " $msg timings requested but could not \ establish\n horizontal frequency in kHz." nonfatal HS=${HSYNCRANGE} @@ -145,9 +157,7 @@ if [ -z "$MR" ] ; then error " $msg resolution requested but not \ established." nonfatal MR=${MAXRES} fi - - -monmanual=yes +monmanual=yes ## compute max resolution #for res in 640x400 640x480 800x600 1024x768 1280x1024 1400x1050 1600x1200 diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres index ad263ae9..842a594a 100755 --- a/initrd/initrd-stuff/bin/screenres +++ b/initrd/initrd-stuff/bin/screenres @@ -54,7 +54,7 @@ fi if [ $pix_per_qcm -gt 1599 ]; then tft_probability=$(($tft_probability - 15)) else tft_probability=$(($tft_probability + 15)) fi -echo -ne "Is a TFT:\t" +echo -ne "Is a TFT: " if [ $tft_probability -ge 50 ]; then echo -n "true" else echo -n "false" @@ -86,4 +86,12 @@ if [ $tft_probability -lt 50 ]; then screen_resolutions=` echo $screen_resolutions | sed -n 's/"[0-9x]*" \(.*\)/\1/p'` fi fi + echo "Recommended Screen Modes: $screen_resolutions" + +######## Vertical and horizontal frequency ranges ######### + +frequency_ranges=`sed '/range/!d;s/[^0-9]*\([1-9][0-9]\)[ \t]*-[ \t]*\([1-9][0-9]*\)[^0-9]*\([1-9][0-9]*\)[ \t]*-[ \t]*\([1-9][0-9]*\).*/\1-\2 \3-\4/' ${tmp_ddcprobe_output}` +set -- $frequency_ranges # split into $1 und $2 +echo "Vertical Frequency Range (kHz): $1" +echo "Horizontal Frequency Range (Hz): $2" -- cgit v1.2.3-55-g7522