Xgl Troubleshooting

From ArchWiki

Jump to: navigation, search


Contents

Intel: don't see pointer

The problem is that EXA accelleration is used by default now by the Intel driver and it's causing some problems. Try using XAA instead, i.e. put this in the device section: Code:

Section "Device"
   Identifier    "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
   Driver        "intel"
   BusID        "PCI:0:2:0"
       Option      "XAANoOffscreenPixmaps" "true"
       Option      "AllowGLXWithComposite" "true"
       Option      "AccelMethod" "XAA"
EndSection

from http://bbs.archlinux.org/viewtopic.php?pid=325176#p325176

Incompatible software

  • Java 1.5 and 1.6 with swing applications may show blank window, set the environment variable AWT_TOOLKIT=MToolkit to fix the problem.
  • Nero Linux shows an empty window frame after being closed. You have to restart compiz to make it disappear...
  • Blender, and other programs that uses OpenGL may kill your Xgl session (depending on your gfx driver). You can start them in Xnest, which is a "client-server" in X. It will start a windowed program without Xgl. Though, since we run it inside a Xgl session, the program window will still have some of the features of Xgl. Just run:
Xnest :1 & DISPLAY=":1" blender

in a terminal. A tips, set an alias for it in ~/.bashrc.

  • Xine's seek/controller bar is completely glitched. Movies play though.


Solution:
Edit the config file for Imlib:

gedit /etc/imrc

Set "SharedPixmaps" to "off" and this will workaround the problem.

  • Metamonitor seems to give some problems with Xgl

Make KDE systray work

update: it works fine now for me using kde 3.5.2 and the latest Xgl

Boot KDE inside Xgl, but without loading compiz. Once the systray is loaded, load compiz and gnome-window-decorator (kill kwin if needed).

WARNING: Avoid amarok. It makes konqueror not to load. Maybe some other programs will have similar consequences.

Support for non power of two textures missing

for ATI: Set all DISPLAY=:0 variables (in the created scripts) to DISPLAY=:1 ! after that it worked for me (ATI 9600 XT, custom fglrx-driver)

This problem appears when you use "Method 1 - GDM uses Xgl" to set up Xgl. Try "Method 2 - New GDM entry starts Xgl" instead. If it still doesn't work, try this:

ln -sf /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1

Xgl doesn't work with Xorg "ati" driver

Currently, Xgl does not work with the open source driver for ATI cards. You will need to use the proprietary fglrx driver instead. Refer to the ATI wiki for full details.

I use dock plugin and compiz very often crashes

Dock plugin is currently very unstable. To disable it, open Applications>System tools>Configuration Editor. Go to /apps/compiz/general/allscreens/options. Edit active_plugins and remove "dock" from there. Restart Compiz

Mousecursor disappearing

Is your mousecursor disappearing all the time? Make sure you have disabled SWcursor and CursorShadow in your xorg.conf

Xgl unexpectedly crashes

Check if you are using "GLcore" module in xorg.conf. If you're not, add this line:

Load  "GLcore"

in the "Module" section in your xorg.conf.

I have an ATI card, I can't run compiz and fglrxinfo says "Mesa GLX Indirect" is using

The problem is probably in /usr/lib/libGL.so.1. It is linked to a wrong lib: /usr/lib/libGL.so.1.2.R200 To fix this problem, run this: ln -sf /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1 See also "Direct_Rendering_Doesn't_Work"

OpenGL games are too slow

If you use Xgl as a nested server on top of normal X server, you can run OpenGL games in normal X while using Xgl. Just open terminal and run games as following:

ATI users:

DISPLAY=:0 mygame

NVidia users:

DISPLAY=:93 mygame

Xgl and (OpenGL) Games in Fullscreen Mode

Xgl is a really cool solution, for those who love eye candy. For gamers this seemed a little unsuitable, since Xgl does not allow games to be ran in fullscreen mode. Even though I run Xgl as a nested server on top of the original X server, using the variable mentioned above (DISPLAY=:93) resulted in an error message stating that no protocol was specified. I started asking a question about it in the #archlinux IRC chat room, soon enough I got a reply that this probably was not the place for such a Xgl specific question and so I started Googling (to Google). After a while I added "Gentoo" to my query and got "[TIP] Using xlaunch" (http://forums.gentoo.org/viewtopic-t-483004.html) as the first result, I read the page. It is about a script a user of Gentoo wrote which enables a Xgl user to run OpenGL applications in fullscreen mode. With a minor adjustment -to suit Arch Linux's system- I followed the tutorial. And now I am able to run my games (enemy-territory, blobwars (hot) and such) using fullscreen mode again.

Some technical background; the script launches the game on the normal X server, which is the same as the above mentioned command would have accomplished (if it simply worked).

Follow the tutorial ("III - The xlaunch script", on the original Gentoo forum page) with the following exception. When you get to the "/etc/profile-replacement" part, you will see that this does not suit the Arch Linux system, so instead of following this by the letter I did this:

Replace:

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"

With:

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/bin:/home/scripts"

Simply reboot your Archie box (because "source /etc/profile" did not pull off the trick as I expected).

You are now able to run your games again using xlaunch:

xlaunch blobwars

twosouls82

P.S. another nice thing about xlaunch is that the games launches in VC8, so you can switch between Xgl (your new Desktop X Server) and X (the xlaunch game server) using Ctrl+Alt+F7 and Ctrl+Alt+F8, respectively.

GDM reports problems with running Xgl

If you are getting errors like this:

/opt/gnome/etc/gdm/PreSession/Default: Registering your session with wtmp and utmp
/opt/gnome/etc/gdm/PreSession/Default: running: /usr/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/opt/gnome/var/gdm/:0.Xservers" -h "" -l ":0" "stjepan"
/opt/gnome/etc/gdm/Xsession: Beginning session setup...
/opt/gnome/etc/gdm/Xsession: ssh-agent not found!
/opt/gnome/etc/gdm/Xsession: Setup done, will execute: /usr/bin/startxgl-custom
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

open /usr/bin/startxgl-custom and add parameters "-nolisten tcp" to the Xgl command. Here's an example:

Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer -nolisten tcp & 

Resizing windows is very slow

This is a known problem. The problem is fixed in latest danimoth's xgl-git packages and PKGBUILD. Just make sure danimoth repository is in /etc/pacman.conf and then do pacman -Syu

Xgl giving segmentation faults

Does your Xgl segfault running the startxgl script? Make sure the following options in your xorg.conf are disabled:

  • NoRenderExtension
  • AllowGLXWithComposite

Also make sure that you dont have composite extension enabled:

Section "Extensions"
#       Option "Composite" "Enable"
        Option "RENDER" "Enable"
EndSection

Gnome Window Decoration Missing

If your Gnome title bars are missing after running compizrc with the gconf flag, you need to make sure that you have enabled them.

  • Run gconf-editor
  • Under apps > compiz > general > allscreens > options > active_plugins add 'decoration' to the list of active_plugins
  • Add any other compiz plugins you want enabled here as well, the full list being:
gconf, gconf-dump, miniwin, decoration, transset, state, wobbly, fade, minimize, cube, rotate, zoom, scale, move, resize, place, switcher, trailfocus, water, bs

The order of plugins is very important!

Xgl is unresponsive under high CPU load

The problem has disappeared from newer versions: xgl-cvs 20060608, xorg-server 1.0.2-3, kernel26 2.6.17.1

Renice/nice your busy applications or Xgl/Compiz doesn't help much, so you need to give Xgl real-time priority:

Xgl itself doesn't use much CPU resource, but giving it a higher "nice" priority doesn't help anyway. Beware the real-time Xgl may affect your sound daemons such as jackd.

Switcher Does Not Terminate

If Switcher does not terminate after activating it (ALT+TAB):

  • Run gconf-editor
  • Under apps > compiz > plugins > fade > screen0 > options > window_types remove 'Splash from the list of of window_types

System freeze with ATI Express cards

I had to edit /etc/xorg.conf to avoid a system freeze with my PCI-Express ATI X700:

     Section "Device"
       Identifier  "AtiGraphicsCard"
       Driver      "fglrx"
 
       # I had to add these 2 options
       Option      "UseInternalAGPGART" "no"
       Option      "KernelModuleParm" "agplock=0"
 
       BusID       "PCI:1:0:0"
     EndSection

I had to add those 2 Options to get it working properly. Other ATI PCI Express are reported to be affected too. (X200, X300, X600, X700, X1400... and possibly others)

Problems with special characters on foreign keyboards

If you are missing special characters that uses e.g the AltGr key, run setxkbmap and it should load the correct layout.

AltGr Key

Append to your ~/.Xmodmap file:

keycode 113 = Mode_switch

Then run:

xmodmap ./~.Xmodmap

NOTE: Make sure that this gets run while starting your desktop (modify .xinitrc for example)

Super(win) Key

Add next line to your /etc/X11/xorg.conf file at your keyboard section:

Section "InputDevice"
    Identifier  "Keyboard0" #or whatever your keyboard is called
    [...]
    Option    "XkbOptions" "altwin:super_win"
    [...]
EndSection

X Server crashes when Shift + Backspace are pressed

Quick fix:

     $ xmodmap -e "keycode 22 = BackSpace"

Unfortunately the above works on a per-session basis so the bug would reappear after a restart. If you use KDM, add the following line to "/opt/kde/share/config/kdm/Xstartup":

     $ sudo nano -w /opt/kde/share/config/kdm/Xstartup

For GDM users, add the aforementioned xmodmap line to your $HOME/.xprofile.

KDE crashes if Run Command applet is used

I had to remove the Run Command applet from panel because KDE crashes when the panel is loaded.

Missing GLX_EXT_texture_from_pixmaps when trying to run Compiz/Beryl on ATI

If you run into the follow error when trying to run Compiz/Beryl on an ATI card:

Missing GLX_EXT_texture_from_pixmap

This is because compiz or beryl's binary was compiled against Mesa's OpenGL library rather than ATI's OpenGL library (which is what you are using). Re-install libgl-dri (yes you will have to uninstall fglrx temporarily) to get Mesa's OpenGL library.

copy the library into a directory to keep it because ATI's drivers will over write it.

mkdir /lib/mesa
cp /usr/lib/libGL.so.1.2 /lib/mesa

Once you have it copied, you can reinstall your fglrx drivers (It should have been removed when you installed libgl-dri). Now you can start compiz or beryl using the following example syntax:

LD_PRELOAD=/lib/mesa/libGL.so.1.2 compiz --replace &
Personal tools