Cannot create Direct GLX Context... (Linux)

Hello  :smiley:

First off, my problem:

java.lang.Error: Cannot create window: Could not create a direct GLX context
        at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(Unknown Source)
        at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(Unknown Source)
        at Source)
        at gdnet.java4elements.main.Main.main(

My system is not able to do hardware acceleration, as it seems. I have a Toshiba A75 laptop, with a ATI Radeon Mobility 9000 (128 MB), running Fedora 5. I have installed livna repository's driver, kmod-fglrx-smp, but when I run:

glxinfo | grep direct

It outputs that the rendering is indirect (which is, no hardware acceleration). This is a nasty problem on Fedora + ATI + laptops running ATIs. So, I'm posting it on the hope someone here went through the same problem... I apologize in advance for doing so, since this clearly isn't a JME problem.

I heard that I would have to recompile my kernel, to enable agppart support... I've never done it before (recompiling the kernel), so if anyone could point me to a direction, I would gladly appreciate it.

Son Of Cain

Without hardware acceleration you will not be able to run jme apps

sorry, this won't be much help, but you could check if agpgart is running using "dmesg | grep agp". if you don't get any output, it is not integrated into the kernel, or the module is not loaded.  "modprobe -l agpgart" should then show you if the module is available. if yes, you can load it with the same command obmitting the -l. you must run (at least some) of these commands as root or via sudo. you should get some output though, since i can't imagine fedora shipping without agpgart support.

if everything fails you could try to install the kernel sources of fedora and hope that they come with a config file matching the default kernel, you would just have to enable agpgart there, compile/install and should be fine. if they don't come with a usable config, i guess it could get quite messy to build a kernel that fedora likes.

good luck.

@kman: yes, he's trying to enable hw acceleration to be able to do so. :slight_smile:

Thank you Pavel for your kind (and fast :slight_smile: response  :lol:

Well, running dmesg gives me output, it really detected the AGP part, as you predicted. But the module was not found. I guess this is all that is preventing me from having hardware acceleration, since everything else (I mean driver, xorg.conf…) seems to be correct.

I'll google hunt for info on how to "install the module", or make it work. But if you could help me with that, I would really appreciate. :wink:

@kman  I know that… that's why I'm struggling with Fedora :expressionless:

Son Of Cain

no need to look for the module. if dmesg gives you an output, but you can’t find the module, agpgart is compiled into the kernel and running.

i can’t give you much more help. i don’t run fedora and don’t have an ati card.

you may have a look at if you haven’t done so. i don’t know if this is the correct way to get it to work, but it was updated just recently, good sign. :slight_smile:

Ok, thanks dude, I'll see to it.

I went to that webpage when I first tried installing the driver and configuring the system, and I already wen through these steps. Still, the rendering is still indirect.

Just so you know, the output of commands you suggested are:

[root@blackbox ~]# dmesg | grep agp
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected Ati IGP9100/M chipset
agpgart: AGP aperture is 32M @ 0xd2000000
agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
agpgart: Putting AGP V3 device at 0000:01:05.0 into 8x mode

[root@blackbox ~]# modprobe -| agpgart
bash: agpgart: command not found
FATAL: Module _ not found.

Thanks again for your help.
Son Of Cain

no problem.

actually there was a small missunderstanding with the modprobe command.  its a small L not a… uh, don't know the english word for |. -l is the short form of --list. but you don't need that command anyway, since agpgart is running fine.

does "lsmod | grep fglrx" show an output? if not, the driver is not loaded and you could try to load it with "modprobe fglrx" and then restart X with ctrl-alt-backspace (save your work and close your programs first!!). i don't know if you would have to unload other drivers possibly accessing your videocard first.

one additional note. the mobility 9000 should be supported with 3d acceleration by’s own radeon driver.


"lsmod" shows output, so the driver is working fine.

By your last note, do you mean I should revert to the default driver provided by Fedora's installation? If so, it does not provide hw accel… at least, glxinfo did output indirect rendering for me, that's why I went with livna's kmod driver. And all the guides and tutorials mention I should use this livna's driver… oddly enough, no one seems to have problems with hw accel. :frowning:

Anyway, thanks for your patience in answering my posts, you're helping a lot :slight_smile:


could you post your xorg logfile & conffile?

should be /var/log/Xorg.0.log, the zero maybe a differnet number, just post the latest file.

edit: and yes, i meant that the "radeon" driver, most likely the default driver, should work according to the

Dude, it's big, 'cause DRM tries to open the device several times… It exceeds the maximum allowable post length here.

But grepping it for WW or EE (warning, error) gives me no output.

Son Of Cain

try a grep for ATI and/or fglrx (don'tknow), that shouldn't be that much. and maybe just the "Device" section of your conf.

My entire (uncommented) xorg.conf file:

Section "ServerLayout"
   Identifier     "Multihead layout"
   Screen      0  "Screen0" LeftOf "Screen1"
   Screen      1  "Screen1" 0 0
   InputDevice    "Keyboard0" "CoreKeyboard"
   InputDevice    "Synaptics" "CorePointer"
   InputDevice    "Mouse0" "AlwaysCore"
   Option       "Xinerama" "off"
   Option       "Clone" "on"

Section "Files"
   FontPath     "unix/:7100"

Section "Module"
   Load  "dbe"
   Load  "extmod"
   Load  "fbdevhw"
   Load  "glx"
   Load  "record"
   Load  "freetype"
   Load  "type1"
   Load  "synaptics"
   Load  "dri"

Section "InputDevice"

   Identifier  "Keyboard0"
   Driver      "kbd"
   Option       "XkbModel" "pc105"
   Option       "XkbLayout" "us"

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "IMPS/2"
   Option       "Device" "/dev/input/mice"
   Option       "ZAxisMapping" "4 5"
   Option       "Emulate3Buttons" "yes"

Section "InputDevice"
   Identifier  "Synaptics"
   Driver      "synaptics"
   Option       "Device" "/dev/input/mice"
   Option       "Protocol" "auto-dev"
   Option       "Emulate3Buttons" "yes"
   Option       "LeftEdge" "120"
   Option       "RightEdge" "830"
   Option       "TopEdge" "120"
   Option       "BottomEdge" "650"
   Option       "FingerLow" "14"
   Option       "FingerHigh" "15"
   Option       "MaxTapMove" "110"
   Option       "VertScrollDelta" "20"
   Option       "HorizScrollDelta" "20"
   Option       "MinSpeed" "0.3"
   Option       "MaxSpeed" "0.75"

Section "Monitor"

   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
   ModelName    "LCD Panel 1280x800"

   HorizSync    31.5 - 90.0
   VertRefresh  60.0 - 60.0
   Option       "dpms"

Section "Monitor"

   Identifier   "Monitor1"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor 1024x768"

   HorizSync    31.5 - 57.0
   VertRefresh  50.0 - 70.0
   Option       "dpms"

Section "Device"
   Identifier  "Videocard0"
   Driver      "fglrx"
   VendorName  "Videocard vendor"
   BoardName   "ATI Technologies Inc RS300M AGP [Radeon Mobility 9100IGP]"
   Option       "VideoOverlay" "on"

Section "Screen"
   Identifier "Screen0"
   Device     "Videocard0"
   Monitor    "Monitor0"
   DefaultDepth     24
   SubSection "Display"
      Viewport   0 0
      Depth     16
      Modes    "800x600" "640x480"
   SubSection "Display"
      Viewport   0 0
      Depth     24
      Modes    "1280x800"

Section "Screen"
   Identifier "Screen1"
   Device     "Videocard0"
   Monitor    "Monitor1"
   DefaultDepth     24
   SubSection "Display"
      Viewport   0 0
      Depth     24
      Modes    "1280x800"

Section "DRI"
   Group        0
   Mode         0666

Without hardware acceleration you will not be able to run jme apps
this isnt true, I was able to run jme on my pentium2 366 laptop with command line arg


its ugly and slow but it works :)
as for accelerated drivers, ive only done in debian many times before they made the installer and its a PITA. if its at all possible for you to switch OS ubuntu has the drivers in the repository and you can install with 2 commands.

well, i'm at my wit's end. i cannot test any of this and i'm running out of ideas.

you conf file looks good, but why do you load fbdevhw? i don't think it's needed. although i don't know if it could cause problems.

one thing i read somewhere: it seems sometimes switching the used agpgart will fix problems. to do this, add

Option "UseInternalAGPGART" "no"

to your device section if you haven't tried that already.

it also seems that the order in which modules are loaded is important. in your case, i don't know if ati-agp is a module or in the kernel, but if it is a module it must be loaded before fglrx.

"fglrxinfo" reports mesa, right?  i also read, that sometimes mesa will be prefered over ati's opengl for no obvious reason. you could try to uninstall the mesa drivers and then reinstall fglrx. there should only be libGLs in /usr/lib, none in /usr/X11R6/lib (which is empyt on my system except some fonts). please make backups before deleting anything, i don't want to be responsible for trashing your system. :slight_smile:

does "LIBGL_DEBUG=verbose glxinfo" report any errors?

Yes, it outputs the following errors:

libGL: XF86DRIGetClientDriverName: 8.26.18 on_igp9x00_we_do_not_support (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/
libGL error: dlopen /usr/X11R6/lib/modules/dri/ failed (/usr/X11R6/lib/modules/dri/ cannot open shared object file: No such file or directory)
libGL error: unable to find driver:
libGL: XF86DRIGetClientDriverName: 8.26.18 on_igp9x00_we_do_not_support (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/
libGL error: dlopen /usr/X11R6/lib/modules/dri/ failed (/usr/X11R6/lib/modules/dri/ cannot open shared object file: No such file or directory)
libGL error: unable to find driver:

I didn't know of that verbose option, thanks dude ;) I shall try your other tips later.
Thanks for all the support!

Son Of Cain

bad news… a look at the release note of your driver shows, that the driver for the 9100igp does support 2d acceleration only. :frowning: i should have checked that earlier… curse you, ati!

you should try to get the “radeon” driver provided with to run. a guy at the ubuntu forums using the same chipset claimed, that it worked with the xorg setting provided in this post:

it would be a good idea to uninstall fglrx before and maybe reinstall mesa and/or the xorg driver package or the whole xorg if fedora does not provide the modular xorg 7.

i’ll be on a heavy drinking session (a friend is leaving to russia for a semester) and probably won’t be back before sunday. good luck!

You can get DRI with the open source driver, but no 3D support:

Still, it should speed up software rendering a bit.

Thanks everybody for the help!  :D

But I gave up on Fedora... :cry:

I've tried every possible configuration and new driver installation you can imagine, but to no good. Nobody can say I haven't tried, and I not one fool of a user... I decided to install Ubuntu, because of this problem and also because I was curious to get to know it, since everybody is saying a lot of good things about it. And guess what? Direct rendering out of the box for my ATI chip. Didn't have to touch a thing. Too lazy to scroll back and see who suggested Ubuntu here, but thanks dude, I owe you one :wink:

I am a die hard fan of Fedora, it is a wonderful distribution... I hope they manage to fix these issues with video drivers really soon. But for the time being, I'll stick to Ubuntu. Now I can finally go back to work on my little game. :D

But one thing is certain... I did rather buy a new laptop than use windows again  :P :P :P

Thanks again dudes for all your support, you've lent me quite a hand, even this not being a JME issue! I really appreciate that.

Son Of Cain
Too lazy to scroll back and see who suggested Ubuntu here, but thanks dude, I owe you one wink
no prob , enjoy! :D