Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvidia-drivers-340.96 and kernel 4.6.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
brahici
n00b
n00b


Joined: 19 May 2016
Posts: 3

PostPosted: Thu May 19, 2016 8:23 pm    Post subject: nvidia-drivers-340.96 and kernel 4.6.0 Reply with quote

Hi

Here's a patch to compile nvidia-drivers-340.96 with kernel 4.6.x . Please notice that there are no kernel version checks (improvement to come).

The patch is available at https://zerobin.net/?ae22f4178dc9ce13#Jo9LWsDJchqEQonQzh9cRjC7douzReIulw1Nm8uHYDU= .
Save it in /etc/portage/patches/x11-drivers/nvidia-drivers under name 01-kernel-4.6.0.patch (or any other relevant name).
Run emerge nvidia-drivers (or emerge @module-rebuild).
Back to top
View user's profile Send private message
brahici
n00b
n00b


Joined: 19 May 2016
Posts: 3

PostPosted: Fri May 20, 2016 1:13 pm    Post subject: Reply with quote

Patch updated with kernel version checks. Tested with sys-kernel/gentoo-sources 4.5.4 and 4.6.0 .

https://zerobin.net/?b523bac5834ac4b4#pV2jeQ4DuzmIsmdLf2N8WlUHh2IWJ3sEZ+CIXzJzaUU= .
Back to top
View user's profile Send private message
therealpete
n00b
n00b


Joined: 02 Feb 2004
Posts: 6

PostPosted: Fri May 20, 2016 4:47 pm    Post subject: Reply with quote

Thanks very much!! Very much appreciated!!
Back to top
View user's profile Send private message
drbrezner
n00b
n00b


Joined: 21 May 2016
Posts: 17
Location: Germany

PostPosted: Sat May 21, 2016 8:12 am    Post subject: Reply with quote

hi

thanks for your work. usually those patches worked for me, too, in the past. but now
Code:
emerge =nvidia-driver-340.96-r5

still breaks:
Code:
/var/tmp/portage/x11-drivers/nvidia-drivers-340.96-r5/work/kernel/uvm/nvidia_uvm_lite.c:788:20: error: â undeclared (first use in this function)
         retValue = VM_FAULT_MINOR;

i compiled gentoo-sources-4.6.0 and use gcc-5.3.0. According to emerge output the patch is being applied. What could be wrong?
Back to top
View user's profile Send private message
hurricane
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2004
Posts: 107

PostPosted: Sat May 21, 2016 6:12 pm    Post subject: Reply with quote

Code:

/var/tmp/portage/x11-drivers/nvidia-drivers-340.96-r5/work/kernel/uvm/nvidia_uvm_lite.c:788:20: Error: »VM_FAULT_MINOR« not declared (first usage in this function)
         retValue = VM_FAULT_MINOR;
                    ^

Same problem here too.

It seems to me, like VM_FAULT_MINOR is deprecated and was always 0 anyway:
RE: [PATCH 03/12] mm: Remove VM_FAULT_MINOR


But I don’t know enough to be secure enough to just set
Code:
retValue = 0


Anyone…?
Back to top
View user's profile Send private message
hurricane
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2004
Posts: 107

PostPosted: Sat May 21, 2016 6:31 pm    Post subject: Reply with quote

Ok, in case it makes sense to replace VM_FAULT_MINOR by 0, I made this little additional patch:

VM_FAULT_MINOR=0.patch

It compiled here. But of course, I don’t make any guarantees that it won’t eat your children, found a church, or vote for the Trump-Cheney-Putin-Koch-Blankfein-Dragi-Kim-Yong-Un alliance :D
Back to top
View user's profile Send private message
brahici
n00b
n00b


Joined: 19 May 2016
Posts: 3

PostPosted: Sat May 21, 2016 7:00 pm    Post subject: Reply with quote

You may also disable uvm USE flag in case you don't need it.

This patch https://zerobin.net/?27df430e0cf437f6#7oQ8gEknTBY4Dor37ZwkASik6Prhtk4oe2f3N82fCx0= does the same as hurricane's one, but also checks kernel version (a bit overkill in this case).
Back to top
View user's profile Send private message
drbrezner
n00b
n00b


Joined: 21 May 2016
Posts: 17
Location: Germany

PostPosted: Sun May 22, 2016 8:39 am    Post subject: Reply with quote

Now the emerge works perfectly with both patches -- thanks a lot, guys!
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Thu May 26, 2016 7:49 pm    Post subject: Reply with quote

Thanks go to brahici and hurricane. I can confirm that nvidia-drivers-340.96-r5 emerges without error under kernel gentoo-sources-4.6.0 using both patches above.
Back to top
View user's profile Send private message
thunderrd
n00b
n00b


Joined: 20 Aug 2010
Posts: 59

PostPosted: Mon Jun 13, 2016 4:13 am    Post subject: Reply with quote

Yeah, thanks for the patches; I am using ck-sources:4.6.2 and they patched the driver and built fine.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Mon Jun 13, 2016 1:18 pm    Post subject: Reply with quote

Thanks! I have a Zotac box that cannot use nouveau because of lack of HDMI audio support.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Tue Jun 14, 2016 2:29 pm    Post subject: Reply with quote

Spoke too soon. Paste is here, just in case https://bpaste.net/show/18c63e089d6c
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Jun 19, 2016 7:11 pm    Post subject: Reply with quote

This worked with 4.6.2 kernel: https://git.archlinux.org/svntogit/packages.git/plain/trunk/linux-4.6.patch?h=packages/nvidia-340xx
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
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
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