LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   NVIDIA Driver Running, No OpenGL (https://www.linuxquestions.org/questions/linux-hardware-18/nvidia-driver-running-no-opengl-707824/)

jman82s 02-26-2009 03:57 PM

NVIDIA Driver Running, No OpenGL (solved)
 
Hello,

I am running Debian Lenny on an old box I recently inherited. It has a GeForce 2 GTS which uses the 71xx driver, which is no longer in the repos. I successfully installed the single binary blob from Nvidia's site.

My problem is that no opengl apps will work, and I get messages saying "OpenGL not supported," etc. when I attempt to run these programs. I get the Nvidia logo upon boot, and an 'lsmod' shows 'nvidia' and not the open source 'nv', so I'm pretty sure the driver is in fact running.

I don't have much experience running the proprietary Nvidia drivers on Linux, but looking at the package repos, it seems there are a few different packages for each driver. This makes me think perhaps I'm missing something. Some abstraction package that links the kernel module with opengl itself? Sorry for any lack of documentation; I'm not sure what to include. 'glxinfo' simply returns a "command not found".

If anyone could provide any input, please let me know!

Thanks in advance.

Edit: here is my xorg.conf file after running 'nvidia-xconfig'

Code:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildd@ninsei)  Fri Sep  5 22:23:08 UTC 2008

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath        "/usr/X11R6/lib/X11/rgb"
EndSection

Section "Module"
    Load          "dbe"
    Load          "extmod"
    Load          "type1"
    Load          "freetype"
    Load          "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier    "Mouse0"
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/psaux"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier    "Keyboard0"
    Driver        "kbd"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Unknown"
    HorizSync      30.0 - 110.0
    VertRefresh    50.0 - 150.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection


frieza 02-26-2009 04:19 PM

my recomendation would be to go to nvidia's site, download the latest version of the driver and install it manually
the link to download drivers for nvidia can be found here
you will get a .run file
then switch to virtual terminal using ctl-alt-f1, login as root (or as you userrname and su or sudo to root)
switch to any runlevel other then 1,2,6 or 0 (init 3 for instance)
make sure x is shutdown
cd to the directory where the run file was stored (usually /home/user/Desktop) then sh file.run
follow the instructions
reboot or init 2

http://www.nvidia.com/Download/index.aspx?lang=en-us

jman82s 02-26-2009 04:54 PM

Yes, that's actually what I did. This particular driver is not in the repos anymore. Now I recall that the readme did say that both the kernel module and nvidia-glx parts were contained in the .run archive.

One thing I believe is somewhat suspect is that it complained that I have gcc 4.3, and that my kernel was compiled with gcc 4.1. I actually have both installed, named as 'gcc-4.1' and 'gcc-4.3'. There is also a package installed called 'gcc' which is dependent on and points to gcc-4.3. I think the installer looks at just at this 'gcc' package, which points to 4.3, which gives the error. I just chose to 'ignore' and everything else seemed to finish fine.

Is there a way to get 'gcc'to point to the 4.1 version? Guess I'd have to roll up my sleeves and do some compiler compiling? *sigh*

If anyone wants to see my nvidia-installer log, I have it. But I warn you: it's verrrrrrrrrry long.

Thanks again.

Electro 02-27-2009 12:49 AM

You have two choices, downgrade the compiler and the kernel that is more compatible with the nVidia module (driver) or use the nv X11 driver with a lack of hardware 3D acceleration. The nv X11 driver does support 3D, but only with MESA3D. Downgrading the compiler is not easy and can screw up a lot of things.

The utility glxinfo is part of MESA3D utilities.

jman82s 02-27-2009 04:40 AM

Yeah, I'd really rather not mess with gcc. On that note, I have installed what appears to be all the relevant mesa packages:

libgl1-mesa-dri
libgl1-mesa-glx
libglu1-mesa
libglw1-mesa
mesa-utils

I reverted to the 'nv' driver in the appropriate xorg.conf section, but am still not seeing any gl rendering. When I start any gl app (I tried a few) in a console, it shows a segmentation fault, and the program never actually starts (no cpu spike even).

Is there anything else I need to do? Do I need to put a "mesa" entry in xorg.conf or something?

farslayer 02-27-2009 08:23 AM

mesa-utils supplies the glxinfo command you were looking for.

to get the system to compile without complaining you can make a temporary change that doesn't survive a reboot..
export CC=gcc4.1
the nvidia installer will run without making a peep about the compiler version. I've never had an issue with the nvidia drivers when using this 'fix'

You need the "nvidia" driver for OpenGL, the "nv" driver does not provide any 3D support for that.

with the nvidia driver installed and configured,

is direct rendering enabled ?
glxinfo | grep direct

DRI Troubleshooting

Is there any errors showing up in your Xorg log ?
cat /var/log/Xorg.0.log | grep EE

jman82s 02-27-2009 10:31 AM

Okay, I went ahead and tried "export CC=4.1". The command finished gracefully and without error, but the nvidia installer is still complaining. Somehow I think it's a different issue, though.

I actually installed an older version of Ubuntu (7.04) on some spare disk space, which does have the 71xx driver in the repos. I tried both installing it via the restricted drivers manager and through the repos, and both methods left me xgl-less. I had the "nvidia" statement in xorg.conf and everything. I'm thoroughly confused at this point. The card still works great in XP, so I'm pretty sure it's not a faulty card or anything.

Almost forgot, "cat /var/log/....." gives me this:

Code:

jman@cactuar:~$ cat /var/log/Xorg.0.log | grep EE
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(II) Loading extension MIT-SCREEN-SAVER
(EE) Failed to load module "type1" (module does not exist, 0)
(--) NVIDIA(0): MMIO registers at 0xEE000000
(EE) GLX is not supported with the Composite extension


jman82s 02-27-2009 11:26 AM

Update - after googling "GLX is not supported with the Composite extension," it seems this is a non-distro-specific bug, affecting even Solaris. Apparently this driver doesn't want to function with compositing enabled. The workaround is to add

Code:

Section "Extensions"
        Option "Composite" "Disable"

or (under "Device" section)

Code:

Option "AllowGLXWithComposite" "True"
to xorg.conf. I did this, but x fails to start at all. I manually scanned through the xorg log file, and didn't see any errors this time (aside from the obvious lack of any graphics on-screen). glx, nvidia, and dri loaded fine, according to it.

:scratch: Shooooooot.

farslayer 02-27-2009 02:48 PM

the command was
export CC=gcc4.1
not
export CC=4.1
You stripped "gcc" from the command.

But even worse than your error, I gave you bad information to start with, the command should have been
export CC=gcc-4.1

Sorry about that.

Quote:

user@it-lenny:~$ which gcc-4.1
/usr/bin/gcc-4.1
basically you are telling the compiler to use the gcc-4.1 to do the compile.


type1 is no longer used.. you can remove it or comment it out from the Modules section of your config so that error will go away.



I would use the first solution Option "Composite" "Disable" and not add that socond one to the config.
Quote:

Option "AllowGLXWithComposite" "boolean"

Enables GLX even when the Composite X extension is loaded. ENABLE AT YOUR OWN RISK. OpenGL applications will not display correctly in many circumstances with this setting enabled. Default: false (GLX is disabled when Composite is loaded).
Making this true it sort of saying enable Compositing..



Could you post your current xorg.conf ?

jman82s 02-27-2009 08:36 PM

Thanks a bunch for keeping tabs on my situation. Scrolling through my bash history, I did actually enter it as you first mentioned. But no matter....

I have successfully recompiled the module without any griping, then added the "Composite" "Disable" option in there.

And GL works now! I still can't get compiz to work, even with the "AllowGLXWithComposite", but that's another problem for another day. Every other GL app works wonderfully now.

Thanks for the tips!!!!

farslayer 02-27-2009 11:29 PM

Glad to hear you got it all sorted out :)


All times are GMT -5. The time now is 09:49 AM.