# Accelerated rendering crashes Xorg



## w23 (Mar 21, 2010)

Just got finished bringing all of my installed ports up to date, only now any attempt to use direct rendering, such as glxgears or glxinfo, crashes Xorg.


----------



## w23 (Mar 21, 2010)

Crap, accidentally hit enter, stupid me.
The title is suppose to be "accelerated" not "ccelerated".

I'm using the nvidia binary drivers


```
> pkg_info | grep nvidia
nvidia-driver-96.43.16 NVidia graphics card binary drivers for hardware OpenGL rendering

> uname -a 
FreeBSD ignis 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     [email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```

The only, rather useless, error message I get is this:


```
Mar 21 06:13:40 ignis console-kit-daemon[1367]: GLib-GObject-CRITICAL: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Mar 21 06:13:40 ignis console-kit-daemon[1367]: GLib-GObject-CRITICAL: g_object_unref: assertion `G_IS_OBJECT (object)' failed
```

Any ideas?


----------



## richardpl (Mar 21, 2010)

How did you updated ports? Updating in wrong order could cause crash.


----------



## w23 (Mar 22, 2010)

Updated my ports using

```
# portmaster -a
```

Should I rebuild Xorg/Gnome/etc in a specific order?


----------



## w23 (Mar 22, 2010)

Okay, I half fixed it.  After rebuilding libGL, libGLU, and libglut I can now run glxgears without crashing anything, only my FPS is much lower than before the upgrade.  Before I was getting around 1000+ fps, but now I'm only getting around 100.  Ideas?


----------



## killwin (Apr 9, 2010)

*what's your driver ?*

Your driver, is it the private archive from nvidia ?

I don't like private archives, but with 3D, the nvidia driver works perfectly and fast.


----------



## DavidMarec (Apr 10, 2010)

w23 said:
			
		

> Okay, I half fixed it.  After rebuilding libGL, libGLU, and libglut I can now run glxgears without crashing anything, only my FPS is much lower than before the upgrade.  Before I was getting around 1000+ fps, but now I'm only getting around 100.  Ideas?



You are now using the Xorgs open source drivers.
Those are software acceleration. 

To use harware acceleration, you have to install again the Nvidia driver.
- choose the right one, designed for the GPU. -
Then configure Xorg:
ftp://download.nvidia.com/XFree86/FreeBSD-x86/195.36.15/README/editxconfig.html


> Remove the line:
> 
> Driver "nv"
> (or Driver "vesa")
> ...



You will have to do this each time Xorg is updated.


----------



## w23 (Apr 11, 2010)

killwin said:
			
		

> Your driver, is it the private archive from nvidia ?
> 
> I don't like private archives, but with 3D, the nvidia driver works perfectly and fast.



Yes, I'm using Nvidia's propriatary blob because I gotta have my dual monitors and as far as I know, I can't do that with the open source driver.  3D is really just a bonus for if I want to play a game or something.



			
				DavidMarec said:
			
		

> You are now using the Xorgs open source drivers.
> Those are software acceleration.
> 
> To use harware acceleration, you have to install again the Nvidia driver.
> ...



I don't think that's it.  My Xorg.conf hasn't been touched, and I already tried reinstalling the x11/nvidia-drivers-96 from ports and nothing changed.  

I do have dri loaded, but that was there before the update and it didn't cause any issues that I know of.  I'm compiling wireshark right now, so I can't restart Xorg to check, but I'll post back when I'm done.


```
[...snip...]

Section "Module"
        Load  "dri2"
        Load  "extmod"
        Load  "record"
        Load  "glx"
        Load  "dri"
        Load  "dbe"
EndSection

[...snip...]

Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        Option "NvAGP" "1"
        VendorName  "nVidia Corporation"
        BoardName   "NV28GL [Quadro4 980 XGL]"
        BusID       "AGP:1:0:0"
        Screen       0
        Option      "UseDisplayDevice" "DFP"
EndSection

Section "Device"
        Identifier  "Card1"
        Driver      "nvidia"
        Option "NvAGP" "1"
        VendorName  "nVidia Corporation"
        BoardName   "NV28GL [Quadro4 980 XGL]"
        BusID       "AGP:1:0:0"
        Screen       1
        Option      "UseDisplayDevice" "CRT"
EndSection

[...snip....]
```


I also just realized that running glxinfo causes a segfault/core dump near the end of it's output.

although running "glxinfo | grep rendering" gives


```
direct rendering: Yes
Segmentation fault (core dumped)
```

My understanding was that "direct rendering" == "hardware rendering".


----------



## w23 (Apr 11, 2010)

Just reloaded X with the "Load dri" and "Load dri2" lines commented out, and nothing changed.


----------



## adamk (Apr 11, 2010)

Haven you reinstalled the nvidia drivers yet?

Adam


----------



## expl (Apr 12, 2010)

Install Nvidia drivers from ports not from archive directly or your OGL libs will be misplaced by Nvidia installation script.


----------



## w23 (Apr 12, 2010)

adamk said:
			
		

> Haven you reinstalled the nvidia drivers yet?



Yup, tried that a few times, didn't help.



			
				expl said:
			
		

> Install Nvidia drivers from ports not from archive directly or your OGL libs will be misplaced by Nvidia installation script.



I'm using nvidia-driver-96 from ports, never used any archives or anything.


----------



## adamk (Apr 12, 2010)

Show us your /var/log/Xorg.0.log file, please.

Adam


----------



## expl (Apr 12, 2010)

Please post full output of your "glxinfo".


----------



## w23 (Apr 13, 2010)

The files were to large to post to the forums so I pastebin'ed them.

/var/log/Xorg.0.log

[CMD="glxinfo"].[/CMD]


----------



## adamk (Apr 14, 2010)

direct rendering does not mean 3D acceleration.  The Mesa software rasterizer provides direct rendering, but not 3D acceleration.


```
(II) Module glx: vendor="X.Org Foundation"
```

This is the source of your problem.  You are still using the Xorg glx module.  If you installed/upgraded the Xorg, libGL, or the dri ports/packages after installing the nvidia drivers, the drivers *must* be reinstalled.  If reinstalling the nvidia drivers doesn't help, then please post the output of 'pkg_info -L nvidia-driver\*'.

Adam


----------



## w23 (Apr 14, 2010)

*[Solved]*

Well, what do you know, it actually worked.  FPS is back up to around 4000 and glxinfo no longer crashes. :e 

I was sure I tried reinstalling the drivers at least once since I rebuilt libGL, libglu, libglut, but I guess I didn't. :r  Thanks for the help.


----------

