📜 ⬆️ ⬇️

Linux, ATI, Compiz-Fusion and games

Almost everyone knows that ATI graphics cards for Linux are not the best choice. But nevertheless, for some reason, many users of the video card of this particular company (I, for example, have an ATI X1300 in a laptop). I will not retell the whole situation with the drivers, I will only describe my problems (I use proprietary drivers): the first is video flickering when the composite window manager is on (in my case, compiz fusion), the second is 3D applications flickering, again with Compiz enabled. And if the problem with the video is solved almost immediately, then the games were harder. I had to either write a script that disables Compiz for the duration of the game, or do it manually. That is not very nice, you see.
The search for the solution led me to an interesting script - xgame and its xgame-gtk shell.

This script transfers the game to another X-session and already starts there. Accordingly, in another session, Compiz can be turned off with quite simple manipulations.

Everything below is partly a translation of the Xgame on Ubuntu Feisty Fawn article.

So, first we need to allow ourselves to run additional X sessions.
sudo sed -i -e "s / \ (allowed_users = \). * / \ 1anybody /" \
/etc/X11/Xwrapper.config

')
Now configure Xauth so that it sees the new session.
echo "list" | xauth | grep localhost | sed -e "s /.* [\ t] \ (. * \) $ / add: 1.0 MIT-MAGIC-COOKIE-1 \ 1 /"> /tmp/xauth.mine
cat /tmp/xauth.mine | xauth


We make a copy of our xorg.conf for all changes afterwards
sudo cp /etc/X11/xorg.conf /etc/X11/xorg_games.conf


And edit it as we need
sudo gedit /etc/X11/xorg_games.conf


I set myself up
Section "Extensions"
Option "Composite" "Disable"
Endsection


After that, download the xgame script itself and give it the right to run
# GUI version
wget --output-document = / tmp / xgame-gtk2 www.xs4all.nl/~masterpe/Perl/xgame-gtk2
sudo cp / tmp / xgame-gtk2 / usr / bin / xgame-gtk2
sudo chmod + x / usr / bin / xgame-gtk2

# Console version
wget --output-document = / tmp / xgame www.xs4all.nl/~masterpe/Perl/xgame
sudo cp / tmp / xgame / usr / bin / xgame
sudo chmod + x / usr / bin / xgame


Well, you can run the command
xgame-gtk2


There is some problem with games running in WINE. WINE starts as a background process and then stops. So it is necessary to make the WINE "permanent" process, for which you must perform the following:
sudo sh -c "echo \" # \! / bin / bash
wine \\\ "\\\ $ @ \\\"

while [-n \\\ "\\\` ps ax | egrep -v grep | egrep wineserver | sed -e 's / [] * \ (\ d * \) [\ t] *?. * / \ 1 / '\\\ `\\\"]; do
sleep 1s;
done \ "\
> / usr / bin / p-wine "
sudo chmod + x / usr / bin / p-wine

This script will stop only when the wine application stops.
Now you just need to change the launch of the wine games to p-wine in the lines (but just this didn’t work on my favorite Oni).

When you run the xgame script itself, you will need to set the name of the used xorg file in the settings. After that, "fill" his teams running games. I tested on openarena and warsow - it works perfectly. Nicely.
PS for qt lovers there is Qgamex.

Source: https://habr.com/ru/post/24438/


All Articles