summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorNico Dietrich2006-04-04 22:18:07 +0200
committerNico Dietrich2006-04-04 22:18:07 +0200
commitd391528fe1c864fb707fdb78e33fb7a4d8e592a0 (patch)
tree23c06a03a97e1ad4689493c23609830d6e8eb192 /initrd
parentfix ssh in debian and ubuntu (diff)
downloadcore-d391528fe1c864fb707fdb78e33fb7a4d8e592a0.tar.gz
core-d391528fe1c864fb707fdb78e33fb7a4d8e592a0.tar.xz
core-d391528fe1c864fb707fdb78e33fb7a4d8e592a0.zip
Advanced Horizontal Frequency Deduction, Bugfixes
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@159 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg23
-rwxr-xr-xinitrd/initrd-stuff/bin/screenres21
2 files changed, 23 insertions, 21 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index f113300e..69094dc5 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -55,7 +55,7 @@ local Monitor='\tIdentifier "Default"\n
\tOption\t"CalcAlgorithm"\t"CheckDesktopGeometry"\n
\tHorizSync\tHS\n
\tVertRefresh\tVS\n
-\tUseModes\t"Default"\n
+\t#UseModes\t"Default"\n
\tOption\t"DPMS"\t"true"'
local Modes='\tIdentifier "Default"'
local Modelines='
@@ -117,6 +117,16 @@ systems color depth failed.\n $msg" nonfatal
CDP=${DEFAULTCOLORDPT}
fi
+#OPTIMIZEME: 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 [ -n "$hw_monitor" ] ; then
# just cut all starting from k(Hz) ...
HS=${hw_monitor%k*}
@@ -134,17 +144,6 @@ 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}
diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres
index 190a9bb4..d9d13e00 100755
--- a/initrd/initrd-stuff/bin/screenres
+++ b/initrd/initrd-stuff/bin/screenres
@@ -19,7 +19,7 @@
#
## For CRTs determine recommended screen modes ####################################################
-DEBUG=""
+DEBUG="yes"
function calculate_max_horizontal_freq()
{
@@ -29,9 +29,9 @@ function calculate_max_horizontal_freq()
#Search for a number followed by the term "Hz" in the same line as the highest resolution
freq_for_highest_res=`sed -n /$highest_resolution'/s/.*[^a-zA-Z0-9]\([0-9]\{2,3\}\)[ \t]*[Hh][Zz].*/\1/p' $tmp_ddcprobe_output | sort -nr|sed -n 1p`
fi
- highest_res_line_count=` echo $highest_resolution | sed -n 's/x[0-9]*//p'`
+ highest_res_line_count=` echo $highest_resolution | sed -n 's/.*[0-9]*x//p'`
[ -n "$DEBUG" ] && echo " # of lines in highest res.: $highest_res_line_count"
- horiz_freq_khz=$(( $highest_res_line_count * $freq_for_highest_res /1000))
+ horiz_freq_khz=$(( $highest_res_line_count * $freq_for_highest_res / 950)) # 950 = 0,95 * 1000 (invisible range * Kilohertz)
[ -n "$DEBUG" ] && echo " Assumed Horizontal Frequency: $horiz_freq_khz"
}
function determine_recommended_crt_modes()
@@ -168,18 +168,12 @@ if [ -n "$DEBUG" ];then
echo " ($tft_probability)"
fi
-########################################
-
# Find the lines with two times 3 to 4 digits delimited by an x. Print with the two values reverted, so sort sorts w.r.t the 2nd value. Then swap back
screen_resolutions=`sed -n '/edid/I,$s/.*[ \t]\([0-9]\{3,4\}\) *x *\([0-9]\{3,4\}\).*/\2 x \1/p' ${tmp_ddcprobe_output}| sort -rn | sort -rnu | sed -n 's/\([0-9]\{3,4\}\) x \([0-9]\{3,4\}\).*/"\2x\1"/p' `
screen_resolutions=`echo $screen_resolutions`
echo "Supported Screen Modes: $screen_resolutions"
-if [ $tft_probability -lt 50 ]; then
- determine_recommended_crt_modes;
-fi
-echo "Recommended Screen Modes: $screen_resolutions"
######## Vertical and horizontal frequency ranges #########
# find a line with the word range and and numbers with a minus in the middle (e.g 123-321)
@@ -191,6 +185,15 @@ if [ -z "$frequency_ranges" ]; then
horiz_freq_range="31.5-$horiz_freq_khz"
else horiz_freq_range=$1
fi
+########################################
+
+
+if [ $tft_probability -lt 50 ]; then
+ determine_recommended_crt_modes;
+fi
+
+echo "Recommended Screen Modes: $screen_resolutions"
+
#Fixme: How to Calculate the Vertical Refresh rate?
echo "Horizontal Frequency Range (kHz): $horiz_freq_range"
echo "Vertical Frequency Range (Hz): $2"