Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvidia-drivers, amd64, and kernel 2.6.32?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
watersb
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 297
Location: take a left turn in Tesuque

PostPosted: Fri Jan 15, 2010 3:00 am    Post subject: nvidia-drivers, amd64, and kernel 2.6.32? Reply with quote

Installation of the binary nvidia-drivers 190.53-r2 fails because it cannot determine my kernel version.

Yes, /usr/src/linux is a symlink to my gentoo-sources.
No, I'm not using a console framebuffer.

I will try to post more info soon, I'm not at the machine right now. But has anyone else come up against a failed nvidia-installer binary on a clean install with gentoo-sources 2.6.32 and nvidia 190.53-r2?

Thanks
Back to top
View user's profile Send private message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Fri Jan 15, 2010 8:21 am    Post subject: Reply with quote

In free time show:
Code:
emerge --info
lspci

_________________
gg: 525600
Back to top
View user's profile Send private message
sipingal
n00b
n00b


Joined: 12 May 2008
Posts: 62
Location: China

PostPosted: Fri Jan 15, 2010 9:04 am    Post subject: Reply with quote

I bet you the kernel source directory is new or it has been cleared. That caused the headers is not correct.

You can fix this problem with following steps.

1. copy your kernel configuration to the source directory
Code:
# zcat /proc/config.gz > /usr/src/linux/.config


2. run
Code:
# cd /usr/src/linux
# make menuconfig

then save and exit

3. run make
Code:
# make

until you can see something like(or wait 5 to 10 secs is fine):
Code:
init/initramfs.c: In function ‘populate_rootfs’:
init/initramfs.c:546: warning: format not a string literal and no format arguments
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
usr/gen_init_cpio.c: In function ‘cpio_mkfile’:
usr/gen_init_cpio.c:357: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o


press Ctrl+C to terminate it.


4. reinstall the nvidia-drivers.
Back to top
View user's profile Send private message
watersb
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 297
Location: take a left turn in Tesuque

PostPosted: Fri Jan 15, 2010 2:04 pm    Post subject: Reply with quote

sipingal wrote:
I bet you the kernel source directory is new or it has been cleared. That caused the headers is not correct.

You can fix this problem with following steps.

1. copy your kernel configuration to the source directory
2. run
Code:
# cd /usr/src/linux; make menuconfig
then save and exit
3. run make
4. reinstall the nvidia-drivers.



Thanks, that is a very good suggestion, and I did these steps before my initial post. So that 's not the problem: /usr/src/linux/.config exists and is well-formed. Is there another file I can look for that the nvidia installer is expecting?


Code:

# lspci
00:00.0 Host bridge: Intel Corporation Clarksfield/Lynnfield DMI (rev 11)
00:03.0 PCI bridge: Intel Corporation Clarksfield/Lynnfield PCI Express Root Port 1 (rev 11)
00:08.0 System peripheral: Intel Corporation Clarksfield/Lynnfield System Management Registers (rev 11)
00:08.1 System peripheral: Intel Corporation Clarksfield/Lynnfield Semaphore and Scratchpad Registers (rev 11)
00:08.2 System peripheral: Intel Corporation Clarksfield/Lynnfield System Control and Status Registers (rev 11)
00:08.3 System peripheral: Intel Corporation Clarksfield/Lynnfield Miscellaneous Registers (rev 11)
00:10.0 System peripheral: Intel Corporation QPI Link (rev 11)
00:10.1 System peripheral: Intel Corporation QPI Routing and Protocol Registers (rev 11)
00:1a.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation Ibex Peak High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 3 (rev 05)
00:1c.3 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 4 (rev 05)
00:1c.4 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 5 (rev 05)
00:1d.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Ibex Peak LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation Ibex Peak 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation Ibex Peak SMBus Controller (rev 05)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
02:00.0 SATA controller: JMicron Technology Corp. 20360/20363 Serial ATA Controller (rev 03)
02:00.1 IDE interface: JMicron Technology Corp. 20360/20363 Serial ATA Controller (rev 03)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
06:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306 Fire II IEEE 1394 OHCI Link Layer Controller (rev c0)
07:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9400 GT] (rev a1)




# emerge --info                                                                       
Portage 2.1.7.16 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.11-r1, 2.6.32-gentoo-r1 x86_64)                                                                                           
=================================================================                               
System uname: Linux-2.6.32-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.1                                                                                             
Timestamp of tree: Thu, 14 Jan 2010 21:35:01 +0000                                               
ccache version 2.4 [disabled]                                                                   
app-shells/bash:     4.0_p35                                                                     
dev-java/java-config: 2.1.10                                                                     
dev-lang/python:     2.6.4                                                                       
dev-util/ccache:     2.4-r8                                                                     
dev-util/cmake:      2.8.0                                                                       
sys-apps/baselayout: 2.0.1                                                                       
sys-apps/openrc:     0.6.0                                                                       
sys-apps/sandbox:    1.6-r2                                                                     
sys-devel/autoconf:  2.65                                                                       
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.2, 1.11.1                                         
sys-devel/binutils:  2.20                                                                       
sys-devel/gcc-config: 1.4.1                                                                     
sys-devel/libtool:   2.2.6b                                                                     
virtual/os-headers:  2.6.30-r1                                                                   
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                   
ACCEPT_LICENSE="* -@EULA"                                                                       
CBUILD="x86_64-pc-linux-gnu"                                                                     
CFLAGS="-O2 -pipe -march=native"                                                                 
CHOST="x86_64-pc-linux-gnu"                                                                     
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"                                       
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"                                     
CXXFLAGS="-O2 -pipe -march=native"                                                               
DISTDIR="/usr/portage/distfiles"                                                                 
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"                                                   
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://mirror.datapipe.net/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.llarian.net/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo caps cdr cleartype cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emacs emboss encode evo fam fftw firefox flac fortran gdbm gif gmp gnutls gpm gstreamer gtk hal hardened iconv ipv6 jpeg jpeg2k kde ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp openssl pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl semantic-desktop session smp spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd thunar tiff toolbar truetype unicode usb vorbis x264 xcomposite xml xorg xulrunner xv xvid yaz zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



# emerge -pqv =x11-drivers/nvidia-drivers-190.53-r1
[ebuild  N    ] x11-drivers/nvidia-drivers-190.53-r1  USE="acpi gtk (multilib) -custom-cflags"
[ebuild  N    ] media-video/nvidia-settings-190.53



# cat /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/temp/build.log
 * CPV:  x11-drivers/nvidia-drivers-190.53-r1                                       
 * REPO: gentoo                                                                     
 * USE:  acpi amd64 elibc_glibc gtk kernel_linux multilib userland_GNU               
 * Determining the location of the kernel source code                               
 * Found kernel source directory:                                                   
 *     /usr/src/linux                                                               
 * Found kernel object directory:                                                   
 *     /lib/modules/2.6.32-gentoo-r1/build                                           
 * Found sources for kernel version:                                                 
 *     2.6.32-gentoo-r1                                                             
 * Checking for MTRR support ...                                                           [ ok ]
>>> Unpacking source...                                                                         
>>> Unpacking NVIDIA-Linux-x86_64-190.53-pkg2.run to /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2                                                   
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work               
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2 ...                                                                           
 * Applying NVIDIA_glx-defines.patch ...                                                   [ ok ]
 * Applying NVIDIA_glx-glheader.patch ...                                                  [ ok ]
 * Converting NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/Makefile.kbuild to use M= instead of SUBDIRS= ...                                                                                  [ ok ]
>>> Source prepared.                                                                             
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2 ...                                                                         
>>> Source configured.                                                                           
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2 ...                                                                           
 * Preparing nvidia module                                                                       
make -j8 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.32-gentoo-r1/build HOST_CC=x86_64-pc-linux-gnu-gcc clean module                                                                       
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.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1


I also tried without the "-j8" flag applied to make. Same error.
Thanks!!
Back to top
View user's profile Send private message
Dr. Strangelove
Tux's lil' helper
Tux's lil' helper


Joined: 01 May 2006
Posts: 104
Location: Germania

PostPosted: Fri Jan 15, 2010 2:14 pm    Post subject: Reply with quote

Under Kernel 2.6.32/33, for nvidia-drivers-190.53 you need this patch:

NVIDIA-190.53.patch
Code:

Index: usr/src/nv/conftest.sh
===================================================================
--- usr/src/nv/conftest.sh
+++ usr/src/nv/conftest.sh   2009-12-20 04:15:47.194130196 +0200
@@ -111,7 +111,12 @@
     fi
 }
 
-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
+CONFTEST_PREAMBLE="#include <linux/version.h>
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+    #include <generated/autoconf.h>
+    #else
+    #include <linux/autoconf.h>
+    #endif
     #if defined(CONFIG_XEN) && \
         defined(CONFIG_XEN_INTERFACE_VERSION) &&  !defined(__XEN_INTERFACE_VERSION__)
     #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
Index: usr/src/nv/nvacpi.c
===================================================================
--- usr/src/nv/nvacpi.c
+++ usr/src/nv/nvacpi.c   2009-12-20 03:48:28.497758783 +0200
@@ -49,6 +49,10 @@
 };
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
+#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
+#endif
+
 static struct acpi_driver *nv_acpi_driver;
 static acpi_handle nvif_handle = NULL;
 static acpi_handle dsm_handle  = NULL;


For nvidia-drivers-195.30 this one:

NVIDIA-195.30.patch
Code:
Index: usr/src/nv/conftest.sh
===================================================================
--- usr/src/nv/conftest.sh
+++ usr/src/nv/conftest.sh   2009-12-20 04:15:47.194130196 +0200
@@ -111,7 +111,12 @@
     fi
 }
 
-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
+CONFTEST_PREAMBLE="#include <linux/version.h>
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+    #include <generated/autoconf.h>
+    #else
+    #include <linux/autoconf.h>
+    #endif
     #if defined(CONFIG_XEN) && \
         defined(CONFIG_XEN_INTERFACE_VERSION) &&  !defined(__XEN_INTERFACE_VERSION__)
     #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
Index: usr/src/nv/nvacpi.c
===================================================================
--- usr/src/nv/nvacpi.c
+++ usr/src/nv/nvacpi.c   2009-12-20 03:48:28.497758783 +0200
@@ -49,6 +49,10 @@
 };
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
+#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
+#endif
+
 static struct acpi_driver *nv_acpi_driver;
 static acpi_handle nvif_handle = NULL;
 static acpi_handle dsm_handle  = NULL;
Index: /usr/src/nv/makefile
===================================================================
--- usr/src/nv/makefile
+++ usr/src/nv/makefile   2009-12-20 04:15:47.194130196 +0200
@@ -37,9 +37,7 @@
 CC ?= cc
 HOST_CC ?= $(CC)

-ifndef ARCH
- ARCH := $(shell uname -m | sed -e 's/i.86/i386/')
-endif
+ARCH = $(shell uname -m | sed -e 's/i.86/i386/')

 CONFTEST := sh ./conftest.sh "$(CC)" "$(HOST_CC)" $(ARCH) $(KERNEL_SOURCES) $(KERNEL_OUTPUT)


Put these files in the FILES directory.
Then, in the ebuild, add the following line in the src_prepare(){} section, where the other patches are called:
Code:
# Adjust detection of linux kernel
   epatch "${FILESDIR}"/NVIDIA-${PV}.patch


Don't forget to do:
Code:
ebuild nvidia-drivers-190.53.ebuild manifest



EDIT:
Source
The patch is from Anssi, the Mandriva packager. For 195.30 I had to add the makefile patch.
Had both of these tested with 2.6.33* under ~amd64.

Good Luck!
Back to top
View user's profile Send private message
watersb
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 297
Location: take a left turn in Tesuque

PostPosted: Fri Jan 15, 2010 11:27 pm    Post subject: Reply with quote

labor_ratte wrote:
Under Kernel 2.6.32/33, for nvidia-drivers-190.53 you need this patch:
snip
EDIT:
Source
The patch is from Anssi, the Mandriva packager. For 195.30 I had to add the makefile patch.
Had both of these tested with 2.6.33* under ~amd64.

Good Luck!


Brilliant! Thanks very much!

I could NOT get this patch to work for me for nvidia-drivers-190.53 under 2.6.32-gentoo-r1

I WAS able to get a slightly modified patch to compile for me on 2.6.33-vanilla
Code:

===============================================================
--- usr/src/nv/conftest.sh   2009-12-09 19:41:17.000000000 -0500
+++ usr/src/nv/conftest.sh   2010-01-15 15:59:46.861160210 -0500
@@ -111,7 +111,12 @@
     fi
 }
 
-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
+CONFTEST_PREAMBLE="#include <linux/version.h>
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+    #include <generated/autoconf.h>
+    #else
+    #include <linux/autoconf.h>
+    #endif
     #if defined(CONFIG_XEN) && \
         defined(CONFIG_XEN_INTERFACE_VERSION) &&  !defined(__XEN_INTERFACE_VERSION__)
     #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
@@ -1229,7 +1234,7 @@
               }
             }" > conftest$$.c

-            $HOSTCC $CFLAGS -o conftest$$ conftest$$.c > /dev/null 2>&1
+            $HOSTCC $CFLAGS -fPIC -o conftest$$ conftest$$.c > /dev/null 2>&1
             rm -f conftest$$.c

             if [ -f conftest$$ ]; then
===============================================================
--- usr/src/nv/nvacpi.c   2009-12-09 19:41:15.000000000 -0500
+++ usr/src/nv/nvacpi.c   2010-01-15 16:01:30.718911606 -0500
@@ -49,6 +49,10 @@
 };
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
+#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
+#endif
+
 static struct acpi_driver *nv_acpi_driver;
 static acpi_handle nvif_handle = NULL;
 static acpi_handle dsm_handle  = NULL;



Has anyone filed a Gentoo Bug about this yet?
Back to top
View user's profile Send private message
Logge
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2004
Posts: 131
Location: Sweden

PostPosted: Mon Jan 18, 2010 12:29 am    Post subject: Reply with quote

watersb wrote:
Brilliant! Thanks very much!

I could NOT get this patch to work for me for nvidia-drivers-190.53 under 2.6.32-gentoo-r1

I WAS able to get a slightly modified patch to compile for me on 2.6.33-vanilla


Well, about that with 2.6.32... I bet it has something to do with:
Code:
.
.
.
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
.
.
.

Does it work to change that into 32 instead of 33??

Regards
Logge
_________________
I never stop to amaze about the advanced features of the human body's simplicity
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum