Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Patching nvidia-drivers-325.15 for kernel 3.11
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
devzero_DE
n00b
n00b


Joined: 06 Jun 2004
Posts: 36
Location: Cologne / Germany

PostPosted: Thu Sep 26, 2013 10:20 pm    Post subject: Reply with quote

Maybe there is something wrong with your copy & paste
You can download directly from pastebin with wget, there is a buton raw which gives you this:

http://pastebin.com/raw.php?i=qV30u23p

You can wget this link.

As sPHERE911 said, right path is /etc/portage/patches/x11-drivers/nvidia-drivers-325.15 for the patchfile (your path is also ok, but it is then for *ALL* nvidia-driver versions (it would be used also for upcoming release where its hopefully fixed)

Delete it in /etc/portage/patches/x11-drivers/nvidia-drivers and move to /etc/portage/patches/x11-drivers/nvidia-drivers-325.15

Maybe you have it put in both? That might also fail!
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Thu Sep 26, 2013 10:27 pm    Post subject: Reply with quote

devzero_DE wrote:
http://pastebin.com/raw.php?i=qV30u23p


Oddly enough that version of the patch fails on my system (~amd64 & sys-apps/portage-2.2.7 & sys-devel/patch-2.7.1-r2). The version I posted works just fine (at least here).
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
sPHERE911
n00b
n00b


Joined: 23 Mar 2008
Posts: 50

PostPosted: Fri Sep 27, 2013 2:39 pm    Post subject: Reply with quote

devzero_DE wrote:
Maybe there is something wrong with your copy & paste
You can download directly from pastebin with wget, there is a buton raw which gives you this:

http://pastebin.com/raw.php?i=qV30u23p

You can wget this link.

As sPHERE911 said, right path is /etc/portage/patches/x11-drivers/nvidia-drivers-325.15 for the patchfile (your path is also ok, but it is then for *ALL* nvidia-driver versions (it would be used also for upcoming release where its hopefully fixed)

Delete it in /etc/portage/patches/x11-drivers/nvidia-drivers and move to /etc/portage/patches/x11-drivers/nvidia-drivers-325.15

Maybe you have it put in both? That might also fail!


It now fails at the compile phase, not prepare phase.

Im gonna try the previous patches again now
Back to top
View user's profile Send private message
sPHERE911
n00b
n00b


Joined: 23 Mar 2008
Posts: 50

PostPosted: Fri Sep 27, 2013 2:44 pm    Post subject: Reply with quote

FINALLY!

It now compiled and installed successfully. I guess it must have had something to do with the naming of the directories or the patch.

Anyway, it's now solved!

Thanks everyone!

As a long time Arch user, recently moved to Gentoo, I must say that the community here is much better (aswell as the distribution itself).
Back to top
View user's profile Send private message
bwakkie
n00b
n00b


Joined: 17 Aug 2006
Posts: 14

PostPosted: Sat Sep 28, 2013 12:31 am    Post subject: /etc/portage/patches dir Reply with quote

I check my dir and even /etc/portage/patches does not exist on my system... I just create it bottum up?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Sep 28, 2013 12:34 am    Post subject: Reply with quote

Yup, mkdir and touch are your friends.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
bwakkie
n00b
n00b


Joined: 17 Aug 2006
Posts: 14

PostPosted: Sat Sep 28, 2013 1:07 am    Post subject: Reply with quote

thx compiled now...

I just had problems copy-pasting the patch ;-) vim skewed the layout up... and while correcting this I removed the first spaces of all lines which made the patch invalid I guess...
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Sat Sep 28, 2013 4:33 am    Post subject: Reply with quote

bwakkie wrote:
I just had problems copy-pasting the patch ;-) vim skewed the layout up

Put vim in paste mode - :set paste - before pasting and that wont happen.
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
pavel_prochazka
n00b
n00b


Joined: 29 Sep 2008
Posts: 26

PostPosted: Tue Oct 01, 2013 8:55 am    Post subject: Still cannot compile Reply with quote

I followed this advise:

darkphader wrote:
/etc/portage/patches/x11-drivers/nvidia-drivers-325.15/ is the proper path. Mine is named kernel.patch but anything.patch should work just fine.


that is

Code:

pajin@nemo:~$ cat /etc/portage/patches/x11-drivers/nvidia-drivers-325.15/kernel.patch
--- a/kernel/nv-linux.h
+++ b/kernel/nv-linux.h
@@ -957,7 +957,11 @@ static inline int nv_execute_on_all_cpus
 #endif
 
 #if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+#define NV_NUM_PHYSPAGES                get_num_physpages()
+#else
 #define NV_NUM_PHYSPAGES                num_physpages
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()pajin@nemo:~$


and then compiling of the nvidia-drivers fails with some wrong permissions, i.e.
Code:

emerge -av nvidia-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ~] x11-drivers/nvidia-drivers-325.15 [319.49] USE="X (multilib) tools -acpi -pax_kernel" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

>>> Verifying ebuild manifests
>>> Running pre-merge checks for x11-drivers/nvidia-drivers-325.15
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.11.2-gentoo/build
 * Found sources for kernel version:
 *     3.11.2-gentoo
 * Gentoo supports kernels which are supported by NVIDIA
 * which are limited to the following kernels:
 * <sys-kernel/gentoo-sources-3.11
 * <sys-kernel/vanilla-sources-3.11
 *
 * You are free to utilize epatch_user to provide whatever
 * support you feel is appropriate, but will not receive
 * support as a result of those changes.
 *
 * Do not file a bug report about this.
 * Checking for suitable kernel configuration options...                                   [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-325.15
 * NVIDIA-Linux-x86_64-325.15.run SHA256 SHA512 WHIRLPOOL size ;-) ...                     [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.11.2-gentoo/build
 * Found sources for kernel version:
 *     3.11.2-gentoo
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-325.15.run to /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work ...
 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers-325.15 ...
 *   kernel.patch ...                                                                      [ ok ]
 * Done with patching
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work ...

some compiling ....

/usr/src/linux-3.11.2-gentoo/Makefile:1422: .vmlinux.cmd: Permission denied
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
some compiling ....
compilation failure


Note that the advised "Run 'make oldconfig && make prepare' " did not change anything. The kernel was build conventionally by taking .config from my previous kernel, loading it into "make menuconfig" followed by "make && make modules_install". I also tried to set-up the kernel from scratch (make mrproper + make menuconfig) with the same result.

It is often written in the compilation (maybe also the reason of the failure)
Code:

/usr/src/linux-3.11.2-gentoo/include/linux/kconfig.h:4:32: fatal error: /usr/src/linux-3.11.2-gentoo/include/generated/autoconf.h: Permission denied


Corresponding permitions:
Code:

nemo src # l /usr/src/linux/include/generated/autoconf.h
-rw-r----- 1 root root 36207 Oct  1 13:14 linux/include/generated/autoconf.h


any suggestions, what is wrong?

Kernel configuration is http://pastebin.com/L4gscjEQ,

Thanks, Pavel
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Tue Oct 01, 2013 1:30 pm    Post subject: Reply with quote

I've seen that kernel message forever and just ignore it.
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
pavel_prochazka
n00b
n00b


Joined: 29 Sep 2008
Posts: 26

PostPosted: Tue Oct 01, 2013 1:41 pm    Post subject: Reply with quote

darkphader wrote:
I've seen that kernel message forever and just ignore it.


ok, but the problem is that the nvidia-drivers compilation results in failure. The kernel message was my suggestion about the reason of the failure.

Pavel
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Tue Oct 01, 2013 2:09 pm    Post subject: Reply with quote

pavel_prochazka wrote:
ok, but the problem is that the nvidia-drivers compilation results in failure. The kernel message was my suggestion about the reason of the failure.
Pavel


It's not that kernel message. I posted my patch earlier as well, you might want to try that one. The patch in the pastebin didn't apply properly for me.

Also I get this:
Code:
sartre ~ # cat /etc/portage/patches/x11-drivers/nvidia-drivers-325.15/kernel.patch
--- kernel/nv-linux.h.orig      2013-09-24 13:14:30.023159426 -0400
+++ kernel/nv-linux.h   2013-09-24 13:17:23.105718632 -0400
@@ -958,7 +958,11 @@
 #endif
 
 #if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+#define NV_NUM_PHYSPAGES                get_num_physpages()
+#else
 #define NV_NUM_PHYSPAGES                num_physpages
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()
sartre ~ #

In your output it looks like your shell prompt is part of your patch (last line at the end).
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
pavel_prochazka
n00b
n00b


Joined: 29 Sep 2008
Posts: 26

PostPosted: Wed Oct 02, 2013 11:02 am    Post subject: Reply with quote

The patch you wrote also does not help.
Code:

nemo pajin # cat /etc/portage/patches/x11-drivers/nvidia-drivers-325.15/kernel.patch
--- kernel/nv-linux.h.orig      2013-09-24 13:14:30.023159426 -0400
+++ kernel/nv-linux.h   2013-09-24 13:17:23.105718632 -0400
@@ -958,7 +958,11 @@
 #endif
 
 #if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+#define NV_NUM_PHYSPAGES                get_num_physpages()
+#else
 #define NV_NUM_PHYSPAGES                num_physpages
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()
nemo pajin #


The bash prompt was not part of the patch, I just wget the patch, which was not terminated by the line-break. I have resigned and switched to the noveau driver in kernel...

Pavel
Back to top
View user's profile Send private message
pavel_prochazka
n00b
n00b


Joined: 29 Sep 2008
Posts: 26

PostPosted: Wed Oct 02, 2013 1:38 pm    Post subject: Reply with quote

I finally compiled. I uninstalled the dev-util/nvidia-cuda-toolkit package (as I found on some nvidia forums - didn't work alone) and tried to avoid the wrong permissions by
Code:

chmod -R o+r /usr/src/linux
chmod -R o+r /lib/modules/3.11.2-gentoo/build/arch/x86/include/generated

and the compilation with the aforementioned patch works. Is there anything to corrupt by allowing to read the kernel settings for everybody excepting some potential security hacks?
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Wed Oct 02, 2013 1:52 pm    Post subject: Reply with quote

pavel_prochazka wrote:
I finally compiled. I uninstall the dev-util/nvidia-cuda-toolkit package (as I found on some nvidia forums - didn't work alone) and tried to avoid the wrong permissions by
Code:

chmod -R o+r /usr/src/linux
chmod -R o+r /lib/modules/3.11.2-gentoo/build/arch/x86/include/generated


And the compilation with the aforementioned patch works. Is there anything to corrupt by allowing to read the kernel settings for everybody excepting some potential security hacks?


That's the way my kernel (source and module) perms have always been - directories are 755 and files are 644. For the source that's what an emerge of gentoo-sources produces. Did you change them for some reason?
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
pavel_prochazka
n00b
n00b


Joined: 29 Sep 2008
Posts: 26

PostPosted: Wed Oct 02, 2013 3:32 pm    Post subject: Reply with quote

darkphader wrote:

That's the way my kernel (source and module) perms have always been - directories are 755 and files are 644. For the source that's what an emerge of gentoo-sources produces. Did you change them for some reason?

I'm not aware about any manual change of the perms in the usr/src/linux directory, I just
Code:

emerge -av gentoo-sources
eselect kenel set ...
cd /usr/src/linux
make menuconfig ...
make && make modules_install


Its fact that on my home laptop, I have the perms set correctly (directories 755 and files 644). I have really no idea why and when the perms were changed...
Back to top
View user's profile Send private message
jathlon
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2006
Posts: 89
Location: Canada

PostPosted: Sat Oct 05, 2013 4:52 pm    Post subject: Reply with quote

Just a quick heads up. The patch mentioned in the latter part of the thread seems to work allowing driver 331.13 to compile with linux-3.11.3. Of course you have to rename your patch directory under /etc/portage

later,

joe
Back to top
View user's profile Send private message
Tolstoi
l33t
l33t


Joined: 20 May 2004
Posts: 678

PostPosted: Tue Oct 15, 2013 5:29 pm    Post subject: Reply with quote

Just want to confirm that the patch worked here with kernel 3.11.5 and nvidia-drivers-331.13.
Thanks.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu Oct 17, 2013 10:03 am    Post subject: Reply with quote

Would be nice if someone files a bug report. This error occures in 325 and in 331. Should be fixed.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Oct 17, 2013 10:38 am    Post subject: Reply with quote

musv wrote:
Should be fixed.

Won't happen. The maintainer insists on supporting only those kernels which nvidia explicitly declares as supported.
Back to top
View user's profile Send private message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Sat Oct 19, 2013 3:59 am    Post subject: Reply with quote

Ok, I think I'm missing something here ... I make the dir and the patch on /etc/portage but when I emerge the drivers again it doesn't build. Do I need to do something else ? Like executing the patch ?
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Oct 19, 2013 5:13 am    Post subject: Reply with quote

Which directory did you make? Can you provide the exact path to the file? Maybe there's a typo? There is no need to execute it manually.
Back to top
View user's profile Send private message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Sat Oct 19, 2013 5:16 am    Post subject: Reply with quote

I created : /etc/portage/patches/nvidia-drivers/Linux-3.11.patch

And the patch itself contains :

Code:

--- a/kernel/nv-linux.h
+++ b/kernel/nv-linux.h
@@ -957,7 +957,11 @@ static inline int nv_execute_on_all_cpus
 #endif
 
 #if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+#define NV_NUM_PHYSPAGES                get_num_physpages()
+#else
 #define NV_NUM_PHYSPAGES                num_physpages
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Oct 19, 2013 5:23 am    Post subject: Reply with quote

chromaf wrote:
I created : /etc/portage/patches/nvidia-drivers/Linux-3.11.patch


This misses the category x11-drivers, try /etc/portage/patches/x11-drivers/nvidia-drivers/Linux-3.11.patch
Back to top
View user's profile Send private message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Sat Oct 19, 2013 5:27 am    Post subject: Reply with quote

Ups ... sorry ! Thank you :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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