[Intel-gfx] Problems configuring unique xorg.conf file

Nasa nasa01 at comcast.net
Fri Aug 27 01:14:09 CEST 2010


----- "Felix Miata" <mrmazda at earthlink.net> wrote:

> On 2010/08/26 10:47 (GMT) Nasa composed:
> 
> > I am trying to configure a rather obscure resolution (800x480) which
> is the
> > native resolution for my monitor.  The monitor doesn't provide EDID
> or DDC 
> > information (it's connected over VGA).  And the default settings by
> the 
> > driver produces displays that don't fit the monitor properly.  I
> would like
> > to construct a xorg.conf file with appropraite vertical refresh
> rates, horizontal
> > syncs, and/or modelines to work correctly with the monitor. 
> However, there
> > doesn't seem a way to turn off the driver defaults for those items.
> I tried options
> > like NoDDC, UseEDID, etc with no luck.  I also tried using xrandr to
> change 
> > resolutions after X has started.  The results end up being worse
> than the 
> > intial problem I was trying to fix (ie: the screen is bigger than
> the area
> > available to display it).  I expect my inability to find a suitable
> solution
> > is due to my lack of knowledge -- so I hope someone can fill me in
> to what 
> > I am missing.  Thanks in advance,
> 
> > Chipset:  945GM
> 
> From openSUSE 11.3 on i845G
> http://fm.no-ip.com/Tmp/Linux/Xorg/xinitrc-113-t2240-1600x1200v1920
> should
> serve as a template for you to construct an /etc/X11/xinit/xinitrc
> file with
> required xrandr commands included to be run _before_ $WINDOWMANAGER
> starts.
> 
> Note that the reason for preferring high refresh rates on CRT displays
> does
> not exist on flat panel displays. I've yet to find any flat panel
> that
> doesn't work perfectly in close proximity to 60 if not exactly 60.
> So,
> K.I.S.S., and use CVT and/or GTF without bothering with refresh spec.
> 'gtf
> 800 480' will default to 60, which would invariably be just right.
> 
> Supposedly xorg.conf can still be used with legacy Intel chips to do
> the same
> things as xinitrc/xrandr do, but I've yet to confirm it, succeeding
> only on
> MGA so far.

Given Meego's setup where is the appropriate place to put the xrandr 
commands?  I was confused on this point when I tried that before...

X seems to be started from 3 files in /etc/X11/xinitrc (xinitrc, 
xinitrc-common, and Xclients)

I opted to add the lines to xinitrc thus:

# Mandatorily source xinitrc-common, which is common code shared between the
# Xsession and xinitrc scripts which has been factored out to avoid duplication
. /etc/X11/xinit/xinitrc-common

xrandr --newmode "840x480_60.00"   31.25  840 864 944 1048  480 483 493 500 -hsync +vsync
xrandr --addmode VGA1 840x480_60.00
xrandr --output VGA1 --mode 840x480_60.00
xrandr --fbmm 152x91

# The user may have their own clients they want to run.  If they don't,
# fall back to system defaults.
if [ -f $HOME/.Xclients ]; then
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
    exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \
    exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients
else
    # Failsafe settings.  Although we should never get here
    # (we provide fallbacks in Xclients as well) it can't hurt.
    [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
    [ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
    [ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
    [ -x /usr/bin/twm ] && /usr/bin/twm
fi



As there isn't a .Xclients file in the user directory -- the /etc/X11/xinit/Xclients
is what is executed next:

#!/bin/bash

GSESSION="$(which gnome-session 2>/dev/null)"
STARTKDE="$(which startkde 2>/dev/null)"
STARTXFCE="$(which startxfce4 2>/dev/null)"
STARTMOB="$(which startmoblin 2>/dev/null)"

# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
    . /etc/sysconfig/desktop
    if [ "$DESKTOP" = "GNOME" ]; then
        PREFERRED="$GSESSION"
    elif [ "$DESKTOP" = "KDE" ]; then
        PREFERRED="$STARTKDE"
    elif [ "$DESKTOP" = "XFCE" ]; then
        PREFERRED="$STARTXFCE"
    elif [ "$DESKTOP" = "MOBLIN" ]; then
        PREFERRED="$STARTMOB"
    fi
fi

if [ -n "$PREFERRED" ]; then
    exec "$PREFERRED"
fi

# now if we can reach here, either no desktop file was present,
# or the desktop requested is not installed.

if [ -n "$STARTMOB" ]; then
    # by default, we run Moblin.
    exec "$STARTMOB"
elif [ -n "$STARTXFCE" ]; then
    exec "$STARTXFCE"
elif [ -n "$GSESSION" ]; then
    # if Moblin isn't installed, try gnome
    exec "$GSESSION"
fi

# Failsafe.

# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0

# Argh! Nothing good is installed. Fall back to twm
{
    # gosh, neither fvwm95 nor fvwm2 is available; 
    # fall back to failsafe settings
    [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
    if [ -x /usr/bin/xclock ] ; then
        /usr/bin/xclock -geometry 100x100-5+5 &
    elif [ -x /usr/bin/xclock ] ; then
        /usr/bin/xclock -geometry 100x100-5+5 &
    fi
    if [ -x /usr/bin/xterm ] ; then
        /usr/bin/xterm -geometry 60x25-130+50 &
    fi
    if [ -x /usr/bin/firefox -a -f /usr/share/doc/HTML/index.html ]; then
        /usr/bin/firefox /usr/share/doc/HTML/index.html &
    fi
    if [ -x /usr/bin/twm ] ; then
        exec /usr/bin/twm
    fi


Where I have it placed now doesn't work (after removing my edited xorg.conf, I get
the original resolution back).  So I must not understand where it should be placed.
Could you enlighten me, *pretty please*  :}

Nasa



More information about the Intel-gfx mailing list