Thursday, January 21, 2010

Direct rendering for NVidia binary driver in Ubuntu Karmic

My desktop's display was sluggish like opening dialogue boxes (as in ctrl-s (control save) in firefox).  It was very slow playing 3D games and Celestia in my Ubuntu Karmic AMD64 box.

I have a GeForce 7300 video card and it should not be that slow.  I am using the Nvidia accelerated graphics driver version 185.  It was only while I was fiddling with OpenSim that I discovered what the problem was.  Initially I though it was the OpenSim server, then I suspected the Hippo OpenSim Viewer, so I installed the Open Metaverse Viewer.  I was really disappointed that the OpenSim + Hippo was running fast in WinXP but was slow in Ubuntu.  I was thinking that the developers didn't care for Ubuntu AMD64 users but later I realized I spoke too soon.

The problem was actually simpler than I thought.  My video driver is not using direct rendering.  When I opened a terminal box and ran glxinfo it says "direct rendering: No", also in the System Menu->Administration->NVIDIA X Server Settings->OpenGL/GLX Information.  But when I opened a root terminal and ran glxinfo direct rendering is enabled.  I also checked the xserver log and confirmed that DRI and DRI2 modules are loaded.  What happening here?

The problem is that my (NOT-root) user account does not have permission to the video group.

  1. So I simply opened System Menu->Administration->Users and Groups.  
  2. I selected my account and clicked the key button to make changes.
  3. Clicked on Properties. Then Use Priveleges tab
  4. Then I checked "Use video devices"
  5. I logged out and logged in back again.  Or restarted the system.
Sure enough when I looked at /etc/group I was listed in the video group i.e.


I rechecked glxinfo and the NVIDIA X Server Settings and both says:
"direct rendering: Yes"

Now my 3D applications are running way faster.  Including OpenSim on Hippo and the Open Metaverse viewers.

This is just one of those things that no one tells us ordinary Ubuntu users, I hope this helps others experiencing this problem.

No comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.