Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Hello Meino, On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: [..] >WHOW! Thanks a lot for the patch! As this issue has just come up on gentoo-dev as well, has the patch worked for you (so far)? Please give a report if it worked or not. I've been unable to run/test my system with that patch for longer to really have an opinion (no idea when that code actually gets called while running the driver). TIA, -dnh -- Ugga Ugga ! Nognog! Dadadadada! [Woko° in dag°]
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Hello, On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: >David Haller[16-07-30 13:24]: [..] >> I've got it working with the attached patch in >> /etc/portage/patches/x11-drivers/nvidia-drivers-367.35/ [..] >Short qyestion: How can I apply it...I mean...as soon as I do an >emerge, either the original source will be unpacked or my package >will be rejected for being modified an different from the one, which >does not compile... In this case: just create the dir mkdir -p /etc/portage/patches/x11-drivers/nvidia-drivers-367.35/ and save the patch there. The rest works "as if by magic" thanks to the epatch-user in the ebuild. The version in the directory-name makes it only get applied to that version of the driver. HTH, -dnh -- If you fall and break your legs, don't come running to me. -- Samuel Goldwyn
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
james[16-07-30 20:52]: > On 07/30/2016 01:15 PM, meino.cra...@gmx.de wrote: > > >>>Short qyestion: How can I apply it...I mean...as soon as I do an > >>>emerge, either the original source will be unpacked or my package > >>>will be rejected for being modified an different from the one, which > >>>does not compile... > > >>http://tinyurl.com/jur3t8v > > >Meino > > I think that is true for EAPI-5. EAPI-6 or later ebuilds should only > require the patch be located in the dir with the sources > (/usr/portage or /usr/local/portage/, I think. > (epatch-users is good to google on. There might be a bit more to it, > but just google. Also, there are some eclasses that help this out a bit > for more complicated hacks. [1] > > 1] https://devmanual.gentoo.org/eclass-reference/ > > > Usually, the best thing to do is put (your) patches and a full copy of > the ebuild into /usr/local/portage, for a guy like you who is hacking > at ebuilds for embedded boards anyway. > > > proxy-maint folks are the best to answer these question and help you, > cause there are always twists and bumps along the way, like > dependencies slightly changed and thus requiring a tweak. Unfortunately > they are only available on the irc channel. Hopefully on of the devs > will clear this up even further, as last time I looked, this is a > subject that the devManual has not fully documented, or anyone compiled > a few examples for user to look at. It's a moving target depending on > the EAPI-level of the ebuild. > > > hth, > James > > Hi James, thanks for your help ! :) Will check that... ;) Best regards, Meino
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
On 07/30/2016 01:15 PM, meino.cra...@gmx.de wrote: Short qyestion: How can I apply it...I mean...as soon as I do an emerge, either the original source will be unpacked or my package will be rejected for being modified an different from the one, which does not compile... http://tinyurl.com/jur3t8v Meino I think that is true for EAPI-5. EAPI-6 or later ebuilds should only require the patch be located in the dir with the sources (/usr/portage or /usr/local/portage/, I think. (epatch-users is good to google on. There might be a bit more to it, but just google. Also, there are some eclasses that help this out a bit for more complicated hacks. [1] 1] https://devmanual.gentoo.org/eclass-reference/ Usually, the best thing to do is put (your) patches and a full copy of the ebuild into /usr/local/portage, for a guy like you who is hacking at ebuilds for embedded boards anyway. proxy-maint folks are the best to answer these question and help you, cause there are always twists and bumps along the way, like dependencies slightly changed and thus requiring a tweak. Unfortunately they are only available on the irc channel. Hopefully on of the devs will clear this up even further, as last time I looked, this is a subject that the devManual has not fully documented, or anyone compiled a few examples for user to look at. It's a moving target depending on the EAPI-level of the ebuild. hth, James
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Andrew Lowe[16-07-30 20:12]: > On 31/07/2016 1:54 AM, meino.cra...@gmx.de wrote: > >David Haller [16-07-30 13:24]: > >>Hello, > >> > >>On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: > >>>trying the new kernel linux-4.7 (vanilla, downloaded from > > [snip] > > > > >Short qyestion: How can I apply it...I mean...as soon as I do an > >emerge, either the original source will be unpacked or my package > >will be rejected for being modified an different from the one, which > >does not compile... > > > >? > > > >Best regards, > >Meino > > It's currently 2am Perth time and I've been staring at a screen for > too long trying to get a portable Win32 dev environmet for Uni students > working. I've consumed a fair amount of chocolate so the usual grain of > salt proviso applies. If I've understood the question correctly, this > link may be of help: > > http://tinyurl.com/jur3t8v > > Andrew > > Hi Andrew, :) Thanks a lot for your help! Best Meino
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
On 31/07/2016 1:54 AM, meino.cra...@gmx.de wrote: David Haller[16-07-30 13:24]: Hello, On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: trying the new kernel linux-4.7 (vanilla, downloaded from [snip] Short qyestion: How can I apply it...I mean...as soon as I do an emerge, either the original source will be unpacked or my package will be rejected for being modified an different from the one, which does not compile... ? Best regards, Meino It's currently 2am Perth time and I've been staring at a screen for too long trying to get a portable Win32 dev environmet for Uni students working. I've consumed a fair amount of chocolate so the usual grain of salt proviso applies. If I've understood the question correctly, this link may be of help: http://tinyurl.com/jur3t8v Andrew
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
David Haller[16-07-30 13:24]: > Hello, > > On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: > >trying the new kernel linux-4.7 (vanilla, downloaded from > >ftp.kernel.org) with nvidia drivers > >(Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms > >multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools > >-wayland KERNEL="linux -FreeBSD")). > >The kernel compiled fine, the nvidia-drivers does not. > > > >Anuone else with the same problem (read: This has to be > >fixed by nvidia/Linus) or am I the only one (so it is > >my problem...which does not neccessarily imply that I > >know how to fix that ... ;) ??? > > I've got it working with the attached patch in > /etc/portage/patches/x11-drivers/nvidia-drivers-367.35/ > > I've no idea though, if I hit that codepath yet. Should work though, > as the patch makes the module use the kernel function and what I read > about radix_tree_gang_lookup() it should be ok this way. > > But do not expect anything to work ;) > > I'm courious what the official patch will be ;) The first part > (patching kernel/nvidia-drm/nvidia-drm-{fb,gem}.c) I've found online. > > HTH, > -dnh > > -- > Please do not think so much about licenses, it will just make your head > explode if not carefully studied over the years ;) > -- Marcus Meissner Content-Description: /etc/portage/patches/x11-drivers/nvidia-drivers-367.35/nvidia-drivers-367.35-kernel-4.7.0.patch > diff -purN a/kernel/nvidia-drm/nvidia-drm-fb.c > b/kernel/nvidia-drm/nvidia-drm-fb.c > --- a/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-12 06:53:45.0 > +0200 > +++ b/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-28 09:43:11.494515158 > +0200 > @@ -32,6 +32,8 @@ > > #include > > +#include > + > static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb) > { > struct nvidia_drm_device *nv_dev = fb->dev->dev_private; > @@ -114,7 +116,11 @@ static struct drm_framebuffer *internal_ > * We don't support any planar format, pick up first buffer only. > */ > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) > +gem = drm_gem_object_lookup(file, cmd->handles[0]); > +#else > gem = drm_gem_object_lookup(dev, file, cmd->handles[0]); > +#endif > > if (gem == NULL) > { > diff -purN a/kernel/nvidia-drm/nvidia-drm-gem.c > b/kernel/nvidia-drm/nvidia-drm-gem.c > --- a/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-12 06:53:45.0 > +0200 > +++ b/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-28 09:27:24.610637573 > +0200 > @@ -28,6 +28,8 @@ > #include "nvidia-drm-ioctl.h" > #include "nvidia-drm-gem.h" > > +#include > + > static struct nvidia_drm_gem_object *nvidia_drm_gem_new > ( > struct drm_file *file_priv, > @@ -408,7 +410,11 @@ int nvidia_drm_dumb_map_offset > > mutex_lock(>struct_mutex); > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) > +gem = drm_gem_object_lookup(file, handle); > +#else > gem = drm_gem_object_lookup(dev, file, handle); > +#endif > > if (gem == NULL) > { > diff -purN a/kernel/nvidia-uvm/uvm_linux.h b/kernel/nvidia-uvm/uvm_linux.h > --- a/kernel/nvidia-uvm/uvm_linux.h 2016-07-12 06:52:17.0 +0200 > +++ b/kernel/nvidia-uvm/uvm_linux.h 2016-07-28 09:29:21.096322608 +0200 > @@ -554,11 +554,13 @@ static void uvm_init_radix_tree_preloada > INIT_RADIX_TREE(tree, GFP_NOWAIT); > } > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) > static bool radix_tree_empty(struct radix_tree_root *tree) > { > void *dummy; > return radix_tree_gang_lookup(tree, , 0, 1) == 0; > } > +#endif > > > #if !defined(NV_USLEEP_RANGE_PRESENT) Hi David, WHOW! Thanks a lot for the patch! Short qyestion: How can I apply it...I mean...as soon as I do an emerge, either the original source will be unpacked or my package will be rejected for being modified an different from the one, which does not compile... ? Best regards, Meino
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Hello, On Sat, 30 Jul 2016, meino.cra...@gmx.de wrote: >trying the new kernel linux-4.7 (vanilla, downloaded from >ftp.kernel.org) with nvidia drivers >(Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms >multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools >-wayland KERNEL="linux -FreeBSD")). >The kernel compiled fine, the nvidia-drivers does not. > >Anuone else with the same problem (read: This has to be >fixed by nvidia/Linus) or am I the only one (so it is >my problem...which does not neccessarily imply that I >know how to fix that ... ;) ??? I've got it working with the attached patch in /etc/portage/patches/x11-drivers/nvidia-drivers-367.35/ I've no idea though, if I hit that codepath yet. Should work though, as the patch makes the module use the kernel function and what I read about radix_tree_gang_lookup() it should be ok this way. But do not expect anything to work ;) I'm courious what the official patch will be ;) The first part (patching kernel/nvidia-drm/nvidia-drm-{fb,gem}.c) I've found online. HTH, -dnh -- Please do not think so much about licenses, it will just make your head explode if not carefully studied over the years ;) -- Marcus Meissnerdiff -purN a/kernel/nvidia-drm/nvidia-drm-fb.c b/kernel/nvidia-drm/nvidia-drm-fb.c --- a/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-12 06:53:45.0 +0200 +++ b/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-28 09:43:11.494515158 +0200 @@ -32,6 +32,8 @@ #include +#include + static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb) { struct nvidia_drm_device *nv_dev = fb->dev->dev_private; @@ -114,7 +116,11 @@ static struct drm_framebuffer *internal_ * We don't support any planar format, pick up first buffer only. */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) +gem = drm_gem_object_lookup(file, cmd->handles[0]); +#else gem = drm_gem_object_lookup(dev, file, cmd->handles[0]); +#endif if (gem == NULL) { diff -purN a/kernel/nvidia-drm/nvidia-drm-gem.c b/kernel/nvidia-drm/nvidia-drm-gem.c --- a/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-12 06:53:45.0 +0200 +++ b/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-28 09:27:24.610637573 +0200 @@ -28,6 +28,8 @@ #include "nvidia-drm-ioctl.h" #include "nvidia-drm-gem.h" +#include + static struct nvidia_drm_gem_object *nvidia_drm_gem_new ( struct drm_file *file_priv, @@ -408,7 +410,11 @@ int nvidia_drm_dumb_map_offset mutex_lock(>struct_mutex); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) +gem = drm_gem_object_lookup(file, handle); +#else gem = drm_gem_object_lookup(dev, file, handle); +#endif if (gem == NULL) { diff -purN a/kernel/nvidia-uvm/uvm_linux.h b/kernel/nvidia-uvm/uvm_linux.h --- a/kernel/nvidia-uvm/uvm_linux.h 2016-07-12 06:52:17.0 +0200 +++ b/kernel/nvidia-uvm/uvm_linux.h 2016-07-28 09:29:21.096322608 +0200 @@ -554,11 +554,13 @@ static void uvm_init_radix_tree_preloada INIT_RADIX_TREE(tree, GFP_NOWAIT); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) static bool radix_tree_empty(struct radix_tree_root *tree) { void *dummy; return radix_tree_gang_lookup(tree, , 0, 1) == 0; } +#endif #if !defined(NV_USLEEP_RANGE_PRESENT)
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Andrew Lowe[16-07-30 08:44]: > On 30/07/16 14:09, meino.cra...@gmx.de wrote: > >Hi, > > > >thank you for your reply ! :) > >I have to use the nvidia drivers, because I am using Blender, which > >renders via CUDA on the GPU... > > > >Best regards > >Meino > > > > > > > > > >Jigme Datse Yli-RAsku [16-07-30 > >08:04]: > >>I have an earlier version of the x11-drivers/nvidia-drivers installed > >>(361.28), but if I recall, I couldn't get x11 to use them. Or maybe > >>they are already using them, but I don't know it (but I believe I > >>couldn't get the tools to recognize that they were being used). My > >>understanding is that using the correct framebuffer drivers is as > >>good, if not better than using the official nvidia ones. But as I > >>don't believe I have had the opportunity to do so, I can't really > >>say. > >> > >>Jigme Datse Yli-Rasku > >> > >>On 2016-07-29 22:36, meino.cra...@gmx.de wrote: > >>>Hi, > >>> > >>>trying the new kernel linux-4.7 (vanilla, downloaded from > >>>ftp.kernel.org) with nvidia drivers > >>>(Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms > >>>multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools > >>>-wayland KERNEL="linux -FreeBSD")). > >>>The kernel compiled fine, the nvidia-drivers does not. > >>> > >>>Anuone else with the same problem (read: This has to be > >>>fixed by nvidia/Linus) or am I the only one (so it is > >>>my problem...which does not neccessarily imply that I > >>>know how to fix that ... ;) ??? > >>> > >>>Best regards > >>>Meino > > There is a duplicate definition of a function[1], the kernel > apparently has a function and a certain parameter list and then someone > at nVidia managed to use the same name but a different parameter list - > hence the duplicate definition. > > I hit this last night, went back one kernel but the latest nvidia > driver only works with the 4.7 series kernel so had to go one back with > the drivers as well. It's known so just hang tight a day or two and all > should be well. > > Andrew > > [1] From memory at 2am and after a lot of chocolate so could be > slightly wrong here > Hi, thanks a lot for the good news! Fingers crossed...waiting in front of my monitor, compiler engines started and ready to accelerate... The compiler will go where no men has ever compiled before... ;) Best regards, Meino
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
On 30/07/16 14:09, meino.cra...@gmx.de wrote: Hi, thank you for your reply ! :) I have to use the nvidia drivers, because I am using Blender, which renders via CUDA on the GPU... Best regards Meino Jigme Datse Yli-RAsku[16-07-30 08:04]: I have an earlier version of the x11-drivers/nvidia-drivers installed (361.28), but if I recall, I couldn't get x11 to use them. Or maybe they are already using them, but I don't know it (but I believe I couldn't get the tools to recognize that they were being used). My understanding is that using the correct framebuffer drivers is as good, if not better than using the official nvidia ones. But as I don't believe I have had the opportunity to do so, I can't really say. Jigme Datse Yli-Rasku On 2016-07-29 22:36, meino.cra...@gmx.de wrote: Hi, trying the new kernel linux-4.7 (vanilla, downloaded from ftp.kernel.org) with nvidia drivers (Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools -wayland KERNEL="linux -FreeBSD")). The kernel compiled fine, the nvidia-drivers does not. Anuone else with the same problem (read: This has to be fixed by nvidia/Linus) or am I the only one (so it is my problem...which does not neccessarily imply that I know how to fix that ... ;) ??? Best regards Meino There is a duplicate definition of a function[1], the kernel apparently has a function and a certain parameter list and then someone at nVidia managed to use the same name but a different parameter list - hence the duplicate definition. I hit this last night, went back one kernel but the latest nvidia driver only works with the 4.7 series kernel so had to go one back with the drivers as well. It's known so just hang tight a day or two and all should be well. Andrew [1] From memory at 2am and after a lot of chocolate so could be slightly wrong here
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Hi, thank you for your reply ! :) I have to use the nvidia drivers, because I am using Blender, which renders via CUDA on the GPU... Best regards Meino Jigme Datse Yli-RAsku[16-07-30 08:04]: > I have an earlier version of the x11-drivers/nvidia-drivers installed > (361.28), but if I recall, I couldn't get x11 to use them. Or maybe they are > already using them, but I don't know it (but I believe I couldn't get the > tools to recognize that they were being used). My understanding is that > using the correct framebuffer drivers is as good, if not better than using > the official nvidia ones. But as I don't believe I have had the opportunity > to do so, I can't really say. > > Jigme Datse Yli-Rasku > > On 2016-07-29 22:36, meino.cra...@gmx.de wrote: > > Hi, > > > > trying the new kernel linux-4.7 (vanilla, downloaded from > > ftp.kernel.org) with nvidia drivers > > (Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms > > multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools > > -wayland KERNEL="linux -FreeBSD")). > > The kernel compiled fine, the nvidia-drivers does not. > > > > Anuone else with the same problem (read: This has to be > > fixed by nvidia/Linus) or am I the only one (so it is > > my problem...which does not neccessarily imply that I > > know how to fix that ... ;) ??? > > > > Best regards > > Meino > > > > > > > > > > -- > Jigme Datse Yli-Rasku > jigme.da...@datsemultimedia.com (Preferred address for new messages) > 250-505-6117 > > Jigme Datse Yli-Rasku > PO Box 270 > Rossland, BC V0G 1Y0 > Canada > > ... > ... This message should be electronically signed, and if the sender ... > ... has your public key, may also be encrypted. ... > ... If you have any questions about this, please email, or call. ... > ... ... > ... Note, unknown calls likely will go to voicemail. ... > ... Please leave a message if you get voicemail. ... > ... > > > >
Re: [gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
I have an earlier version of the x11-drivers/nvidia-drivers installed (361.28), but if I recall, I couldn't get x11 to use them. Or maybe they are already using them, but I don't know it (but I believe I couldn't get the tools to recognize that they were being used). My understanding is that using the correct framebuffer drivers is as good, if not better than using the official nvidia ones. But as I don't believe I have had the opportunity to do so, I can't really say. Jigme Datse Yli-Rasku On 2016-07-29 22:36, meino.cra...@gmx.de wrote: > Hi, > > trying the new kernel linux-4.7 (vanilla, downloaded from > ftp.kernel.org) with nvidia drivers > (Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms > multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools > -wayland KERNEL="linux -FreeBSD")). > The kernel compiled fine, the nvidia-drivers does not. > > Anuone else with the same problem (read: This has to be > fixed by nvidia/Linus) or am I the only one (so it is > my problem...which does not neccessarily imply that I > know how to fix that ... ;) ??? > > Best regards > Meino > > > > -- Jigme Datse Yli-Rasku jigme.da...@datsemultimedia.com (Preferred address for new messages) 250-505-6117 Jigme Datse Yli-Rasku PO Box 270 Rossland, BC V0G 1Y0 Canada ... ... This message should be electronically signed, and if the sender ... ... has your public key, may also be encrypted. ... ... If you have any questions about this, please email, or call. ... ... ... ... Note, unknown calls likely will go to voicemail. ... ... Please leave a message if you get voicemail. ... ...
[gentoo-user] NVidia drivers and vanilla kernel Linux 4.7.0 anyone?
Hi, trying the new kernel linux-4.7 (vanilla, downloaded from ftp.kernel.org) with nvidia drivers (Installed versions: 367.35-r1^md(03:00:46 07/30/16)(X driver kms multilib uvm -acpi -compat -gtk3 -pax_kernel -static-libs -tools -wayland KERNEL="linux -FreeBSD")). The kernel compiled fine, the nvidia-drivers does not. Anuone else with the same problem (read: This has to be fixed by nvidia/Linus) or am I the only one (so it is my problem...which does not neccessarily imply that I know how to fix that ... ;) ??? Best regards Meino