mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   need help setting up CUDA drivers on Ubuntu 10.04 (https://www.mersenneforum.org/showthread.php?t=14504)

mdettweiler 2010-12-30 08:32

need help setting up CUDA drivers on Ubuntu 10.04
 
1 Attachment(s)
Hi all,

Anyone here have experience setting up the nVidia CUDA 3.1 (or later) drivers on Ubuntu 10.04? I'm trying to set up the drivers on a friend's (Gary a.k.a. gd_barnes on this forum) machine so he can use his GTX 460 for crunching. We had it working fine under Ubuntu 8.04 but have upgraded the machine to 10.04.1 since Ubuntu will be dropping support for 8.04 next spring.

As before when I set up the drivers on 8.04, I followed these steps to install the driver (per [url]https://help.ubuntu.com/community/NvidiaManual):[/url]

-Downloaded the 3.1 development driver. (That is, the file devdriver_3.1_linux_64_256.40.run.) I also downloaded cudatoolkit_3.1_linux_64_ubuntu9.10.run and gpucomputingsdk_3.1_linux.run, but in this case I didn't even get past installing the first one.

-Added the build-essential and linux-headers-[latest] packages.

-Removed the nvidia-glx, nvidia-glx-legacy, nvidia-glx-new, and nvidia-settings packages. (Some of these didn't exist in the first place, but they were all removed where applicable per the instructions linked above.) Also removed jockey-common, since that proved to be troublesome the last time around.

-Stopped the GUI: "sudo /etc/init.d/gdm stop" and then "sudo pkill X" and "sudo pkill x" (the latter two weren't in the instructions, but I've found they were needed to fully kill the GUI so the installer could run).

-Ran the installer: "cd ~/Desktop" then "sudo ./devdriver_3.1_linux_64_256.40.run".

The installer progressed fine at first (it got past the license agreement part, which means that it at least saw that the GUI was properly closed and that it could run), but then it gave me some error about a pre-installation script not being able to run. It gave me the choice of whether to continue at that point, and I selected Yes. The installer then hung for about 15 seconds or so, with the relevant part of the ncurses interface (that is, everything except the header that said "nVidia driver installer v3.1 etc...") completely blank. According to Gary who was watching the physical console at the time (I was on via SSH), there were a few cryptic errors being scrolled by on the screen over and over. (We didn't bother to record the errors since I suspected they wouldn't be of much help, but if they are needed I can try to get them.) After ~15 seconds, the errors stopped and I got the following error on my screen:
[code]
ERROR: If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.
[/code]
At first I thought it needed me to install the Linux kernel headers, but then I remembered that I already did that earlier (just as I had under 8.04, which never gave me this error). So I tried installing the full linux-source package as well, though that didn't end up making any difference.

At this point, I'm at a loss as to how to proceed. Hopefully somebody around here has done this before and will know what my problem is. :smile: I've attached the full contents of /var/log/nvidia-installer.log in case it's at all helpful.

Much thanks in advance for any help which can (hopefully) be provided!

Max :smile:

ckdo 2010-12-30 09:03

I was quite happy with [URL="http://www.nerdlabor.de/linux/cuda-sdk-code-beispiele-unter-ubuntu-10-04-32bit/"]these[/URL] instructions (German, sorry, but you should be able to follow).

I'm on Ubuntu 10.10 and used more recent versions of the .run files. Installation did [U]not[/U] require shutting down X beforehand.

It's a good idea to keep the .run files - the graphics driver was updated at one point, albeit to a non-CUDA version, and X would no longer start. Reinstalling the old devdriver worked fine for me.

xilman 2010-12-30 10:46

Here is what I do on RedHat / Fedora / Gentoo systems. I don't run Ubuntu but the information may be useful.

[code]updatedb
locate nvidia.ko
rm /lib/modules/2.6.34.7-61.fc13.x86_64/kernel/drivers/video/nvidia.ko
cd /usr/local/nvidia
sh devdriver_3.2_linux_64_260.24.run
[/code]To explain: some OS-installed kernel modules can be loaded before the CUDA installer tries to load new incompatible one(s). The lines above find out where it/they are and removes it/them before running the installer. Remember to substitute the correct file names as reported by locate(1) --- the above code is a lightly edited copy of a shell history file.

I also find it necessary to stop the X server. The easiest way, IMO, is to run "telinit 3" as root.

Oh yes, if you're running the "nouveau" module in your kernel, you probably shouldn't. I [I]think[/I] this is a RedHat / Fedora only situation and so not applicable to your Ubuntu system, but you may want to check out what Nvidia's site has to say about it.

Paul

amphoria 2010-12-30 12:32

I have successfully installed CUDA 3.0 to 3.2 on two versions of Ubuntu 9, 10.04 and 10.10. I didn't follow any of the instructions linked to above. I just shut down the X server using gdm stop and ran the Nvidia driver package. I also got the error about the pre-install script, but told the script to continue and it ran to completion with a few other questions to answer. This is probably not very helpful, other than to tell you that it does work.

One other difference is that I always log in as root to install the drivers rather than using sudo, If you want to try this you will need to enable root login first. Google it as I can't remember how I did it.

TheJudger 2010-12-30 12:38

Hi Max,

just some Linux generic ideas, I don't have an Ubuntu here.

first of all I would move to CUDA 3.2 as long as there is no serios reason to use CUDA 3.1. CUDA 3.2 is officially supported on Ubuntu 10.04.
[url]http://developer.nvidia.com/object/cuda_3_2_downloads.html[/url]

Did you check that the build-essential and linux-headers-[latest] packages have the same version than the currently running kernel (e.g. forgot to reboot after kernel update)?

Oliver

msft 2010-12-30 13:50

make kernel from source & install.:lol:

mdettweiler 2010-12-30 18:36

Thanks for all the tips! Hopefully something you guys have turned up will do the trick. :smile: I'll take a whack at it again as soon as I get the chance (hopefully later today) and report back here with how it turns out.

Last time I tried to set up the drivers, the CUDA Toolkit 3.2 was still in beta (or something like that; at any rate, it could only be downloaded by registered nVidia developers, and they didn't seem to find a "distributed computing project co-admin" worthy of that designation when I applied :wink:), hence why I had 3.1. Now I see 3.2 is generally available--thanks Oliver! That will be the first thing I'll try; perhaps the newer version will simply work with no fuss.

mdettweiler 2010-12-30 22:32

Okay, I tried it again with the 3.2 drivers, running directly as root per amphoria's suggestion (specifically, I used "sudo su" to become root but the effect should be the same as a direct root login).

This time, I didn't get the pre-install script error (actually, as I now recall, I didn't get that the last time either; that went away when I renamed some dummy preinstall script that was apparently put there by Ubuntu to prevent overwriting the default nVidia drivers), but I still got the other error about the kernel headers.

I've confirmed that build-essential is at the latest version, and linux-headers-2.6.32-27-generic is the same version as the installed kernel (per "uname -r")

The error message mentioned specifying the location of kernel headers using an environment variable; how would I go about doing that? I know how to set up environment variables, but am not entirely sure where on the system the headers would be in the first place. According to /var/log/nvidia-installer.log, it's looking in '/lib/modules/2.6.32-27-generic/build' for the headers; this is what I get when I run an ls of that directory:
[code]
gary@herford:/lib/modules/2.6.32-27-generic/build$ ls -l
total 648
drwxr-xr-x 3 root root 4096 2010-12-29 01:18 arch
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 block -> ../linux-headers-2.6.32-27/block
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 crypto -> ../linux-headers-2.6.32-27/crypto

lrwxrwxrwx 1 root root 40 2010-12-29 01:18 Documentation -> ../linux-headers-2.6.32-27/Documentation
lrwxrwxrwx 1 root root 34 2010-12-29 01:18 drivers -> ../linux-headers-2.6.32-27/drivers
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 firmware -> ../linux-headers-2.6.32-27/firmware
lrwxrwxrwx 1 root root 29 2010-12-29 01:18 fs -> ../linux-headers-2.6.32-27/fs
drwxr-xr-x 5 root root 4096 2010-12-29 01:18 include
lrwxrwxrwx 1 root root 31 2010-12-29 01:18 init -> ../linux-headers-2.6.32-27/init
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 ipc -> ../linux-headers-2.6.32-27/ipc
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 Kbuild -> ../linux-headers-2.6.32-27/Kbuild

drwxr-xr-x 2 root root 4096 2010-12-29 01:18 kernel
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 lib -> ../linux-headers-2.6.32-27/lib
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 Makefile -> ../linux-headers-2.6.32-27/Makefile
lrwxrwxrwx 1 root root 29 2010-12-29 01:18 mm -> ../linux-headers-2.6.32-27/mm
-rw-r--r-- 1 root root 646144 2010-12-01 22:51 Module.symvers
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 net -> ../linux-headers-2.6.32-27/net
lrwxrwxrwx 1 root root 34 2010-12-29 01:18 samples -> ../linux-headers-2.6.32-27/samples
drwxr-xr-x 7 root root 4096 2010-12-29 01:18 scripts
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 security -> ../linux-headers-2.6.32-27/security
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 sound -> ../linux-headers-2.6.32-27/sound
lrwxrwxrwx 1 root root 26 2010-12-29 01:18 source -> /build/buildd/linux-2.6.32
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 tools -> ../linux-headers-2.6.32-27/tools
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 ubuntu -> ../linux-headers-2.6.32-27/ubuntu

lrwxrwxrwx 1 root root 30 2010-12-29 01:18 usr -> ../linux-headers-2.6.32-27/usr
lrwxrwxrwx 1 root root 31 2010-12-29 01:18 virt -> ../linux-headers-2.6.32-27/virt
[/code]
Does that look like it's the right place for the installer to be looking for the headers? I notice that the item "source" is a symbolic link to "/build/buildd/linux-2.6.32", a path which does not exist; might that be a problem?

Thanks,
Max :smile:

saikirangvr 2013-07-29 09:53

[QUOTE=mdettweiler;244036]Okay, I tried it again with the 3.2 drivers, running directly as root per amphoria's suggestion (specifically, I used "sudo su" to become root but the effect should be the same as a direct root login).

This time, I didn't get the pre-install script error (actually, as I now recall, I didn't get that the last time either; that went away when I renamed some dummy preinstall script that was apparently put there by Ubuntu to prevent overwriting the default nVidia drivers), but I still got the other error about the kernel headers.

I've confirmed that build-essential is at the latest version, and linux-headers-2.6.32-27-generic is the same version as the installed kernel (per "uname -r")

The error message mentioned specifying the location of kernel headers using an environment variable; how would I go about doing that? I know how to set up environment variables, but am not entirely sure where on the system the headers would be in the first place. According to /var/log/nvidia-installer.log, it's looking in '/lib/modules/2.6.32-27-generic/build' for the headers; this is what I get when I run an ls of that directory:
[code]
gary@herford:/lib/modules/2.6.32-27-generic/build$ ls -l
total 648
drwxr-xr-x 3 root root 4096 2010-12-29 01:18 arch
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 block -> ../linux-headers-2.6.32-27/block
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 crypto -> ../linux-headers-2.6.32-27/crypto

lrwxrwxrwx 1 root root 40 2010-12-29 01:18 Documentation -> ../linux-headers-2.6.32-27/Documentation
lrwxrwxrwx 1 root root 34 2010-12-29 01:18 drivers -> ../linux-headers-2.6.32-27/drivers
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 firmware -> ../linux-headers-2.6.32-27/firmware
lrwxrwxrwx 1 root root 29 2010-12-29 01:18 fs -> ../linux-headers-2.6.32-27/fs
drwxr-xr-x 5 root root 4096 2010-12-29 01:18 include
lrwxrwxrwx 1 root root 31 2010-12-29 01:18 init -> ../linux-headers-2.6.32-27/init
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 ipc -> ../linux-headers-2.6.32-27/ipc
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 Kbuild -> ../linux-headers-2.6.32-27/Kbuild

drwxr-xr-x 2 root root 4096 2010-12-29 01:18 kernel
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 lib -> ../linux-headers-2.6.32-27/lib
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 Makefile -> ../linux-headers-2.6.32-27/Makefile
lrwxrwxrwx 1 root root 29 2010-12-29 01:18 mm -> ../linux-headers-2.6.32-27/mm
-rw-r--r-- 1 root root 646144 2010-12-01 22:51 Module.symvers
lrwxrwxrwx 1 root root 30 2010-12-29 01:18 net -> ../linux-headers-2.6.32-27/net
lrwxrwxrwx 1 root root 34 2010-12-29 01:18 samples -> ../linux-headers-2.6.32-27/samples
drwxr-xr-x 7 root root 4096 2010-12-29 01:18 scripts
lrwxrwxrwx 1 root root 35 2010-12-29 01:18 security -> ../linux-headers-2.6.32-27/security
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 sound -> ../linux-headers-2.6.32-27/sound
lrwxrwxrwx 1 root root 26 2010-12-29 01:18 source -> /build/buildd/linux-2.6.32
lrwxrwxrwx 1 root root 32 2010-12-29 01:18 tools -> ../linux-headers-2.6.32-27/tools
lrwxrwxrwx 1 root root 33 2010-12-29 01:18 ubuntu -> ../linux-headers-2.6.32-27/ubuntu

lrwxrwxrwx 1 root root 30 2010-12-29 01:18 usr -> ../linux-headers-2.6.32-27/usr
lrwxrwxrwx 1 root root 31 2010-12-29 01:18 virt -> ../linux-headers-2.6.32-27/virt
[/code]
Does that look like it's the right place for the installer to be looking for the headers? I notice that the item "source" is a symbolic link to "/build/buildd/linux-2.6.32", a path which does not exist; might that be a problem?

Thanks,
Max :smile:[/QUOTE]
I am new to ubuntu and I am also facing the same problem of kernels.....

Can you please elaborate how you rectified this problem.

saikirangvr 2013-07-29 09:56

cuda 3.2 kernel errors
 
I am new to ubuntu and I am also facing the same problem of kernels.....

Can you please elaborate how you rectified this problem.


All times are UTC. The time now is 23:29.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.