xorg: don't try to guess and configure resolution or hsync when KMS mode is enabled for xorg video driver
This commit is contained in:
parent
ffc8b1a50b
commit
96719bdd08
@ -365,44 +365,50 @@ if [ "$CONFCREATED" = "1" ]; then
|
|||||||
|
|
||||||
if [ -r /var/log/Xorg.5.log ]; then
|
if [ -r /var/log/Xorg.5.log ]; then
|
||||||
|
|
||||||
if [ "`grep 'hsync range of 28.00-33.00 kHz' /var/log/Xorg.5.log`" -o \
|
if [ "`grep '\[KMS\] Kernel modesetting enabled' /var/log/Xorg.5.log`" ]; then
|
||||||
"`grep 'The EDID read for display device CRT-0 is invalid' /var/log/Xorg.5.log`" ]; then
|
logmsg "$me" "info: "$"KMS enabled: assuming autodetect works for PANEL_SIZE and HSYNC_RANGE"
|
||||||
# no values could be autodetected by DDC, so use a failsafe low value (30-49)
|
PANEL_SIZE_DETECTED="true"
|
||||||
HSYNC_RANGE_NOT_DETECTED="true"
|
HSYNC_RANGE_NOT_DETECTED=""
|
||||||
fi
|
|
||||||
|
|
||||||
[ "`grep 'Printing DDC gathered Modelines' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'EDID vendor \"' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'Adding EDID-provided mode' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep -i 'Panel size from' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep -i 'Panel size is' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep -i 'Panel Size ' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'VESA VBE DDC read successfully' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'LCD on internal LVDS' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'LCD on internal LVDS' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
[ "`grep 'LVDS.* using initial mode' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
|
|
||||||
# nvidia driver: CRT-. EDID not got?
|
|
||||||
if [ "`grep 'Unable to read EDID for display device CRT-.' /var/log/Xorg.5.log`" -o \
|
|
||||||
"`grep 'Unable to get display device CRT-..s EDID' /var/log/Xorg.5.log`" ]; then
|
|
||||||
# nvidia driver: disable CRT-x from being used by default if DFP-0 is present
|
|
||||||
[ "`grep 'DFP-0' /var/log/Xorg.5.log`" ] && {
|
|
||||||
sed -i -e '/Section "Screen"/a\
|
|
||||||
Option "ConnectedMonitor" "DFP"' $XORGCONF
|
|
||||||
} || {
|
|
||||||
HSYNC_RANGE_NOT_DETECTED="true"
|
|
||||||
unset PANEL_SIZE_DETECTED
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
# nvidia driver: we trust in nvidia-auto-select
|
if [ "`grep 'hsync range of 28.00-33.00 kHz' /var/log/Xorg.5.log`" -o \
|
||||||
[ "`grep 'nvidia-auto-select' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
"`grep 'The EDID read for display device CRT-0 is invalid' /var/log/Xorg.5.log`" ]; then
|
||||||
|
# no values could be autodetected by DDC, so use a failsafe low value (30-49)
|
||||||
|
HSYNC_RANGE_NOT_DETECTED="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "`grep 'Printing DDC gathered Modelines' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'EDID vendor \"' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'Adding EDID-provided mode' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep -i 'Panel size from' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep -i 'Panel size is' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep -i 'Panel Size ' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'VESA VBE DDC read successfully' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'LCD on internal LVDS' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'LCD on internal LVDS' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
[ "`grep 'LVDS.* using initial mode' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
|
||||||
|
# nvidia driver: CRT-. EDID not got?
|
||||||
|
if [ "`grep 'Unable to read EDID for display device CRT-.' /var/log/Xorg.5.log`" -o \
|
||||||
|
"`grep 'Unable to get display device CRT-..s EDID' /var/log/Xorg.5.log`" ]; then
|
||||||
|
# nvidia driver: disable CRT-x from being used by default if DFP-0 is present
|
||||||
|
[ "`grep 'DFP-0' /var/log/Xorg.5.log`" ] && {
|
||||||
|
sed -i -e '/Section "Screen"/a\
|
||||||
|
Option "ConnectedMonitor" "DFP"' $XORGCONF
|
||||||
|
} || {
|
||||||
|
HSYNC_RANGE_NOT_DETECTED="true"
|
||||||
|
unset PANEL_SIZE_DETECTED
|
||||||
|
}
|
||||||
|
else
|
||||||
|
# nvidia driver: we trust in nvidia-auto-select
|
||||||
|
[ "`grep 'nvidia-auto-select' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fglrx driver
|
||||||
|
[ "`grep 'EDID Version:' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
||||||
|
|
||||||
|
[ "$autoresvideo" ] && PANEL_SIZE_DETECTED="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# fglrx driver
|
|
||||||
[ "`grep 'EDID Version:' /var/log/Xorg.5.log`" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
|
|
||||||
[ "$autoresvideo" ] && PANEL_SIZE_DETECTED="true"
|
|
||||||
|
|
||||||
[ "$XORG_DETECT_SCREEN_SIZE" = off -o "$lowresvideo" ] && unset PANEL_SIZE_DETECTED
|
[ "$XORG_DETECT_SCREEN_SIZE" = off -o "$lowresvideo" ] && unset PANEL_SIZE_DETECTED
|
||||||
|
|
||||||
[ "$HSYNC_RANGE_NOT_DETECTED" ] && {
|
[ "$HSYNC_RANGE_NOT_DETECTED" ] && {
|
||||||
|
Loading…
Reference in New Issue
Block a user