Page 1 of 15 12311 ... LastLast
Results 1 to 10 of 146

Thread: How to play openGL based games with full 3D acceleration on XGL/compiz

  1. #1
    arnieboy Guest

    How to play openGL based games with full 3D acceleration on XGL/compiz

    FULL credit goes to "jesper" from the compiz forums ( http://compiz.net ) for the following work. I have tested it and it works and hence warrants a complete howto here.
    The original howto is here

    CAVEAT:
    1) I have only tested this on GNOME.
    2) lithorus has reported that this does not work with the fglrx (ATI) driver. Trying the below with the same will result in an XGL crash.


    First of all, do the following:
    Code:
    sudo visudo
    and add the following to the end of the file:
    %user_name ALL=NOPASSWD: /usr/bin/Xorgallowlocal
    where user_name is the group to which your user_name belongs (generally they go by the same name on a default Dapper install)
    press ctrl-X and hit "Y" to save and exit.
    now do the following:
    Code:
    sudo gedit /usr/bin/Xorgallowlocal
    and paste the following:
    #!/bin/sh
    DISPLAY="$2" XAUTHORITY="$1" xhost local:
    save and exit and do the following:
    Code:
    sudo gedit /usr/bin/nonXgl
    and paste the following:
    #!/bin/sh

    DISPLAY=":93"

    if [ -z "$1" ]; then
    echo "Usage: nonXgl <command>"
    exit 1
    fi

    isdisplay=0; isauth=0; for test in $(ps ax | grep "$DISPLAY" | grep Xorg ); do if [ $isauth -eq 1 ]; then export XAUTHORITY="$test"; isauth=0; fi; if [ "$test" = "-auth" ]; then isauth=1; fi; done;


    sudo /usr/bin/Xorgallowlocal "$XAUTHORITY" "$DISPLAY"

    exec $@
    save and exit.
    IN the above one thing needs to be kept in mind. you need to be sure that your display number is indeed "93" (by default it is 93 on almost all systems). To double check however, do the following:
    Code:
    ps uax | grep Xorg | grep Xgl
    and look at the end of the line just before "terminate". There you will see your screen number. If it is anything other than 93, change the value of DISPLAY accordingly in "/usr/bin/nonXgl"

    Now do the folllowing:
    Code:
    sudo chmod 755 /usr/bin/nonXgl
    sudo chmod 755 /usr/bin/Xorgallowlocal
    Now you are all set.
    To run any openGL based game, play it as follows:
    Code:
    nonXgl <game>
    for example:
    Code:
    nonXgl ppracer
    and enjoy full 3D acceleration!

    If it works for you, you can go a step further and change the path of the game executable in your menu by using alacarte or some other way to be able to launch it from menu.

    We can get this thread stickied if it works for others.
    Last edited by arnieboy; May 15th, 2006 at 08:17 AM.

  2. #2
    Join Date
    Jan 2005
    Location
    Copenhagen, Denmark
    Beans
    173
    Distro
    Ubuntu Karmic Koala (testing)

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Would just like to add that this does NOT work with fglrx(ATI). Fglrx doesn't support acceleration on 2 X servers at once. If you try the above it'll just crash your XGL session...

  3. #3
    arnieboy Guest

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Quote Originally Posted by lithorus
    Would just like to add that this does NOT work with fglrx(ATI). Fglrx doesn't support acceleration on 2 X servers at once. If you try the above it'll just crash your XGL session...
    thanks for the update will add that.

  4. #4

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Realy awesome! Never thought how I could solve the ploblem: eye candy with compiz/xgl and still have the possibility to play ET!
    Thanks!

  5. #5
    Join Date
    Feb 2005
    Location
    Cincinnati, OH, USA
    Beans
    145
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    I've added the files remotely, I am so going to test this tonight when I get home from work!
    "If the real Jesus Christ were to stand up today
    He'd be gunned down cold by the CIA"

    - Armageddon Days are Here Again - The The

  6. #6
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Ubuntu 6.10 Edgy

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Would just like to add that this does NOT work with fglrx(ATI). Fglrx doesn't support acceleration on 2 X servers at once. If you try the above it'll just crash your XGL session...
    Maybe fixed in the latest drivers :

    ATI 8.25.18 drivers
    Resolved Issues

    The following section provide a brief description of resolved issues with the latest version of the ATI Proprietary Linux driver. These include:

    * Running two X servers simultaneously no longer results in the system failing to respond. Further details can be found in topic number 737-220
    [...]

  7. #7
    Join Date
    Dec 2004
    Beans
    743
    Distro
    Edgy Eft Testing

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    That truly is a thing of beauty! Also another great reason to use an nVidia card over ATI. Anyone tested the latest ATI drivers to see if it will work on it?

    Hopefully now that AIGLX stuff is fully in X.org 7.1, the next revision of all the nVidia and ATI drivers will have the proper extensions, and the next release of Ubuntu will have native XGL.

    Speaking of which, I'm sure this has been discussed elsewhere, but with Dapper's delay, does that mean that the next Ubuntu release will be in December?

    Leech
    Wah! Wah! Life was more entertaining when I had 64KB of RAM in my computer.
    Neverwinter Nights Platinum HowTo

  8. #8
    Join Date
    Oct 2005
    Location
    Western Canada
    Beans
    146
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Quote Originally Posted by arnieboy
    First of all, do the following:
    Code:
    sudo visudo
    ...
    press ctrl-X and hit "Y" to save and exit.
    this only works if nano or pico is called by visudo, but by default visudo uses vi, as the name implies. So to ensure that nano is used, your instuctions *must* look like this
    Code:
    export VISUAL="nano"
    sudo visudo
    otherwise nice, thanks.
    I like cheese upon crackers. Liver upon crackers, however, is disgusting.

  9. #9
    arnieboy Guest

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    Quote Originally Posted by SqRt7744
    this only works if nano or pico is called by visudo, but by default visudo uses vi, as the name implies. So to ensure that nano is used, your instuctions *must* look like this
    Code:
    export VISUAL="nano"
    sudo visudo
    otherwise nice, thanks.
    on Ubuntu, visudo does indeed call nano (not vi/vim).

  10. #10
    Join Date
    Dec 2005
    Beans
    31

    Re: How to play openGL based games with full 3D acceleration on XGL/compiz

    I just tried integrating this into Cedega, I do say that direct rendering DOES indeed function, but it doesn't exactly work and look how I would like it (I didn't have time to boot up a game, but the menu alone looked sorry to say the least).

Page 1 of 15 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •