You are not logged in.

#1 2008-11-18 04:48:50

tonyisnt
Member
Registered: 2008-03-18
Posts: 158

Looking for help getting xorg working just right

I'd been a relatively happy Gnome user for a few years, but I recently changed to Openbox.  I'm happy with the switch, but mysteriously, one problem popped up from nowhere and seems to persist.  For the life of me I can't find a perfect fix.

Even while I was using Gnome I was using xorg-server version 1.3.0.0 because the newer versions of X didn't place nice with a few games I was playing regularly at the time—ET:QW and RTCW, namely.  The problem was that whenever I'd use the scrollwheel—when switching weapons or when zooming in and out with binocs/sniper rifles, for instance—things would go haywire.  It was simple enough to use an old version since I didn't notice any difference.

When I stopped using Gnome I suddenly ran into a problem, though.  Now, for some reason, from time to time DPMS features would be disable and my monitor would stay on forever.  I narrowed it down and figured out that it was a bug with re-enabling the screensaver.  After running mplayer with the stop-xscreensaver option it re-enable the screensaver just fine but didn't turn DPMS back on correctly.  Manually using xset +dmps didn't work quite right, either.

I found this link, which detailed the bug and also offered a fix.  I couldn't get it to compile correctly at first and couldn't find a PKGBUILD for 1.3.0.0, so I gave up pretty quicklky.  We'll come back to this, though.

The bug was fixed in later versions.  In the current version in the repos, 1.4.2, the DPMS works fine, but, as mentioned before, it makes my games play kind of cruddy.  I revisited the issue after a while, living with the DPMS problem, and was met with something that was kind of a solution but that would require me to change my habits (possible but I don't see a reason for it; I should be able to get it working in a way that fits into my life as-is).

In this thread:

Anyways, the export SDL_VIDEO_X11_DGAMOUSE=0 method fixes things for me... sort of.  You see, I'm one of the people who opens up my games in a new xserver, and I can't figure out a way to get that to apply to the new server.  Any help in that department?

Last week I gave in and tried my hand at compiling 1.3.0.0 once again, with success.  I found this PKGBUILD, which I used as a base, and modified it to my needs.  I added SetScreenSaverTimer(); to dpms.c as suggested in one of the links above, added two patches, and changed the PKGBUILD until it compiled and installed correctly.

The PKGBUILD looks like this:

# $Id: PKGBUILD,v 1.22 2007/08/16 18:40:09 kth5 Exp $
# Maintainer: Alexander Baldeck <kth5@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=xorg-server
pkgver=1.3.0.0
pkgrel=abs
_mesaver=7.0.3
pkgdesc="X.Org X servers"
arch=('i686' 'x86_64' 'ppc')
url="http://xorg.freedesktop.org"
depends=('gcc' 'libxkbui' 'ncurses' 'libxi' 'libxxf86misc' 'libxfont'
         'libxrender' 'libdmx' 'libxaw' 'libxxf86vm' 'xcursor-themes'
     'xkeyboard-config' 'xorg-server-utils' 'xorg-utils' 'libdrm>=2.3.0' 
     'libxfixes' 'xorg-fonts-misc' 'libxres')
makedepends=('pkgconfig' 'xtrans' 'imake' 'xorg-util-macros')
options=('!libtool')
provides=('x-server')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  ./configure --prefix=/usr \
              --enable-ipv6 \
          --enable-dri \
          --enable-dmx \
          --enable-xvfb \
          --enable-xnest \
          --enable-composite \
          --enable-xcsecurity \
          --enable-xorg \
          --enable-xtrap \
          --enable-xevie \
          --disable-xephyr \
          --disable-kdrive \
          --enable-glx-tls \
          --enable-install-setuid \
          --disable-xprint \
          --sysconfdir=/etc/X11 \
          --localstatedir=/var \
          --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
          --with-rgb-path=/usr/share/X11/rgb \
          --with-xkb-path=/usr/share/X11/xkb \
          --with-xkb-output=/usr/share/X11/xkb/compiled \
          --with-dri-driver-path=/usr/lib/xorg/modules/dri \
          --disable-static
  make || return 1
  make DESTDIR=${startdir}/pkg install || return 1
  mkdir -p ${startdir}/pkg/etc/X11
  mkdir -p ${startdir}/pkg/var/lib
  mv ${startdir}/pkg/usr/share/X11/xkb/compiled ${startdir}/pkg/var/lib/xkb
  ln -sf /var/lib/xkb ${startdir}/pkg/usr/share/X11/xkb/compiled
}

This worked; I was happy; I thought I'd solved all of my problems.  But I didn't.

For more than a week I hadn't had any problems.  In the little bit of testing I did the mouse worked fine in games.  And after watching a few movies, my monitor turned off after the 15 minutes I'd specified.  For some reason in the past few days it's back to staying on forever again, though.  I can't quite identify why, but my hunch was that it has something to do with playing lots of ET:QW in another Xserver.  Suspecting this, I changed my launch script slightly:

#!/bin/bash
ETQW="/mnt/games/quake_wars/etqw"
SERVER=`echo ${1} | cut -d "/" -f 3`

xset -dpms
xinit $ETQW +connect $SERVER -- :1 &&
xset +dpms

To test I used xset to five seconds, just opened the game and closed it, and saw if my monitor turned off.  It did.  But it seems like when it's set to 15 minutes, and I play the game for more than 15 minutes, it doesn't want to play nice.  And actually I'm not sure it has anything to do with the game at this point.  Earlier in the day I set it to what I usually have it set at (900 seconds), and the monitor just stayed on.  xset +dpms by itself doesn't seem like it wants to work, either.

So to wrap this rather long post up, is there anything I can do to get things working just right?  The version in testing, 1.5.3, doesn't seem to work for me, and I can't get xorg-server-git in AUR to compile right to know if that one will fix anything.  Am I just hopeless?

Offline

#2 2008-11-18 20:54:14

tonyisnt
Member
Registered: 2008-03-18
Posts: 158

Re: Looking for help getting xorg working just right

This bug report on Gentoo seems to be related, but I don't know how to translate it into something I can understand/do.  http://bugs.gentoo.org/209400

From what I can gather they're saying that the default sources don't allow --disable-video-x11-dgamouse, only enable.  I've never  used Gentoo and don't know ebuilds, but if someone else does, is there a way to apply a patch of some sort to the sources to allow the disable option?  I've compiled sdl with ABS and added the option, but I didn't notices a difference, so I think a patch of some sort is required.

Last edited by tonyisnt (2008-11-18 22:07:15)

Offline

Board footer

Powered by FluxBB